Skip to content

API Reference


API Reference / StrategyContext

Interface: StrategyContext

Defined in: src/backtest/types.ts:133

Properties

index

index: number

Defined in: src/backtest/types.ts:134


candles

candles: Candle[]

Defined in: src/backtest/types.ts:136

candles[0..index] — the closed bar the strategy is reacting to, and nothing after it.


position?

optional position?: OpenPosition

Defined in: src/backtest/types.ts:138

undefined when flat.


indicators

indicators: IndicatorAccessors

Defined in: src/backtest/types.ts:139

Community project — not affiliated with Dhan. MIT License.