Skip to main content
ATK Pine Script®

Runtime Model

How ATK PyneScript compiles and executes scripts — what the runtime does, what it does not do, and why scripts must be valid Python.

Runtime Model#

ATK PyneScript is not a Pine parser. Scripts must be valid Python. Pine-like APIs are exposed as Python functions and namespaces.

What ATK does#

  • Records declarations, inputs, visuals, alerts, and library imports into module context.
  • Compiles declaration modules into managed wrappers based on BaseIndicator, BaseSubIndicator, or BaseStrategy.
  • Builds a managed visual snapshot and routes it through ATK visual adapters.
  • Lets users author visual logic without touching Qt scene code directly.

What ATK does not do#

  • It does not execute Pine syntax that is invalid Python.
  • It does not promise full TradingView parity for all display or intrabar semantics.
  • It does not want heavy compute inside build_visuals() or build_trade_frame().
  • It does not require users to implement low-level graphic items for common visual workflows.