Processing Flows
The runtime pipelines for indicator, strategy, and library scripts — how each declaration type flows from inputs through to execution or rendering.
Indicator, Strategy, and Library Processing Flows#
Indicator flow#
Use this when the script computes analysis series and then renders them through static declarations or a render-only build_visuals(...).
indicator(...)
-> input.* defaults register into module context
-> build_indicator_frame(df, params)
-> frame columns + optional static attrs config
-> static plot declarations and/or build_visuals(frame, params, ctx)
-> managed visual snapshot
-> ATK visual router and adaptersStrategy flow#
Use this when the script emits canonical trade-frame fields that ATK will normalize into execution intents for backtest, replay, and live runtimes.
strategy(...)
-> input.* defaults register into module context
-> build_signal_frame(df, params)
-> entry_* / sl / tp / trail_* prepared
-> build_trade_frame(signal_df, params, styles)
-> build_mapped_trade_frame(signal_df) or equivalent mapping-only normalization
-> normalized trade frame
-> execution intent model
-> backtest / replay / live execution pathLibrary flow#
Use this when the script exists only to export reusable functions, constants, or enum types for other PyneScript modules.
library(...)
-> exported callables and enum types discovered from the module
-> publish metadata and dependency reports generated
-> importing script calls import_library(...) or library_import(...)
-> selected exports resolve into a namespace object
-> indicator or strategy script reuses the helpers in its own builders