Ví Dụ Indicator
Các oscillator sub-panel, minh họa runtime surface, và các mẫu indicator cho ATK PyneScript V6.
Ví Dụ Sub-Panel#
Các indicator nằm bên dưới giá — RSI, MACD, họ stochastic, và các panel volume tùy chỉnh. Phù hợp để nghiên cứu các mẫu multi-line, histogram, và renderer kết hợp.
| Tệp | Nội dung minh họa | Mẫu | Tải xuống |
|---|---|---|---|
pynescript_rsi_indicator.py | RSI sub-panel với source fallback an toàn. | Frame builder thuần túy. | Tải xuống |
pynescript_histogram_sub_indicator.py | ATK histogram rendering trong sub-panel. | Dữ liệu visual theo hàng. | Tải xuống |
pynescript_macd_sub_indicator.py | MACD cộng màu histogram. | Sub-panel đa visual. | Tải xuống |
pynescript_kdj.py | Oscillator K, D, J với các đường ngưỡng. | Oscillator đa đường. | Tải xuống |
pynescript_stoch.py | Stochastic oscillator. | Oscillator hai đường. | Tải xuống |
pynescript_stochrsi.py | StochRSI với xử lý source. | Oscillator linh hoạt source. | Tải xuống |
pynescript_volume_with_ma.py | Volume histogram cộng đường trung bình động trong sub-panel. | Panel ATK bridge render kép. | Tải xuống |
pynescript_candlestick_subchart.py | Candle trong sub-panel. | ATK candlestick bridge. | Tải xuống |
Ví Dụ Runtime Surface#
Bao gồm các runtime surface chưa có ví dụ hướng dẫn riêng. Chọn những ví dụ này khi bạn đã hiểu các script khởi đầu và cần tham chiếu tập trung cho một namespace cụ thể.
| Tệp | Nội dung minh họa | Sử dụng tốt nhất | Tải xuống |
|---|---|---|---|
pynescript_input_interactions_indicator.py | Họ input mở rộng, xác nhận metadata, và ghép cặp input thời gian/giá. | Viết input nâng cao. | Tải xuống |
pynescript_barstate_log_indicator.py | barstate.from_index(...) cộng log.info/log.warning. | Chẩn đoán runtime và cờ vòng đời từng bar. | Tải xuống |
pynescript_plot_visual_surface_indicator.py | plotbar, plotchar, plotarrow, barcolor, và bgcolor. | Tham chiếu chuyển đổi họ plot. | Tải xuống |
pynescript_native_table_indicator.py | table.new, table.cell gốc, và ctx.table.new. | Widget table quản lý không qua ATK bridge. | Tải xuống |
pynescript_request_seed_runtime_indicator.py | request.seed(...) với dữ liệu seed có cấu trúc inline. | Luồng dữ liệu phụ trợ dựa trên seed. | Tải xuống |
pynescript_map_runtime_indicator.py | map.new, map.put, map.get, map.keys, và map.size. | Tham chiếu bundle runtime có khóa. | Tải xuống |
pynescript_matrix_runtime_indicator.py | matrix.new, đọc hàng/cột, và tổng hợp 2D đơn giản. | Tham chiếu matrix runtime. | Tải xuống |
pynescript_library_enum_utils.py + pynescript_library_enum_import_indicator.py | Xuất bản library có phiên bản, export enum, và liên kết import chọn lọc. | Viết và tái sử dụng library. | Tải xuống |
pynescript_strategy_intent_surface.py | Các helper payload strategy.entry/order/exit/close/cancel* được hỗ trợ cùng với thực thi ánh xạ chuẩn. | Tham chiếu intent-helper. | Tải xuống |
pynescript_alert_strategy.py + pynescript_strategy_alert_template_strategy.py | Các lệnh gọi alert, alert mẫu strategy, tag ánh xạ, và metadata trade thân thiện với alert. | Viết alert và thiết kế payload. | Tải xuống |