Indicator and data availability¶
Price helpers and provider calculations are different surfaces. Core helpers such as mean, highest and lowest are available in strategy functions. Additional indicators require the relevant provider in the running environment.
Use sma(close, 20)[0] or rsi(close, 14)[0] for the current value of a series-returning indicator. ATR needs OHLC bars, for example atr(bars, 14)[0], rather than a single price series.
Scores, event fields, Greeks and advanced allocations need their corresponding inputs. A recognised name does not promise available data. Resolve unknown-name diagnostics and check the selected market/runtime before relying on them.
Use indicators or browse the indicator reference.
Identify what your rule depends on¶
| Input | What to confirm |
|---|---|
| Price/volume history | Exact instrument, interval, fields and enough completed observations. |
| Core helpers | Input series, lookback and scalar return convention. |
| Provider indicators | Installed/supplied calculation, correct arguments and result shape. |
| Factor scores | Historical factor values for every eligible name. |
| Events | An event feed with the required timestamps and fields. |
| Options/composites | Supported contracts, chains, grouped positions and execution lifecycle. |
The function name may validate while a required value or provider is absent at run time. Read the first missing-input error and confirm the dependency before adjusting trading thresholds to compensate.
Move between Python and TradeScript carefully¶
TradeScript may supply a price input implicitly (ema(20)). Python uses an explicit input (ema(close, 20)) and a series result's current value ([0]). ATR needs full bars. Core scalar helpers such as mean(close, 20) already return a numeric value and do not use [0].
A score named momentum is not automatically the same calculation as a percentage-return ranking helper. Use its documented units and return shape when combining scores. Data availability is independent of whether a name appears in a catalog.
Reproduce a missing-input problem¶
Keep the minimal function call, exact symbol and timeframe, requested history, execution mode and error message. A smaller rule makes it easier to distinguish an unavailable calculation from a malformed argument or insufficient warmup.
Imports in checked strategy drafts¶
Use the supplied vocabulary for price reads and order actions. Additional imports must pass the current strategy validator. Strategy-facing atom.library/atom.helpers modules and vetted calculation packages are allowed; engine modules are outside the authoring surface. A Python standard-library module is not automatically allowed: the current gate rejects datetime imports with TS003. Use supplied bar timestamps and HH:MM strings for ordinary time filters.
A callable that exists on a Python object can still be rejected by checked authoring rules. For example, .to_dict() currently triggers TS005 even on the parameter/state proxies. Use their documented validated access patterns. Resolve the diagnostic rather than bypassing validation in a user strategy.