Documentation for Deptle Terminal.
Guides for setup, scripting, troubleshooting, and more.
The tick
tick is the market event passed to every on_tick call. All fields are whole numbers.
tick.price— last trade price.tick.qty— trade quantity in base units.tick.time_ns— event time, Unix nanoseconds.tick.count— trade/event counter.tick.flags— venue-defined bit flags.tick.asset_id— which stream this tick belongs to in multi-asset runs.
The sys context
Add sys to your on_tick signature for runtime information beyond the market event. Every field is a whole number.
- Engine:
tick_index,source_tick_index,strategy_index,strategy_slot,strategy_count,asset_id,asset_count. - Account:
position_base(current position size) andequity_quote(current equity). - Portfolio:
portfolio_sync_epoch,portfolio_score,portfolio_rank_desc,portfolio_rank_asc. - Randomness:
rng_seed_lo,rng_seed_hi.
sys.portfolio_score (the attribute) is the current asset's frozen score for the sync epoch. To look up a different asset, call the portfolio_score(asset_id) function.
Field names are exact: sys.position_base, not sys.position; sys.equity_quote, not sys.equity. A misspelling lists every valid field and suggests the closest match.
Looking up other assets
Compare one asset against the rest of the portfolio.
portfolio_score_live(asset_id)— the up-to-the-moment score for an asset.portfolio_score(asset_id)— the frozen score for this sync epoch.portfolio_rank_desc(asset_id)— rank with the highest score first (1 = best).portfolio_rank_asc(asset_id)— rank with the lowest score first (1 = worst).- Each also works as a method on
sys(for examplesys.portfolio_score(asset_id)).
Working in bars instead of ticks
Pick bar data in the Optimizer and the same tick fields carry bar values.
There is no separate bar entry point. Aggregation is set in the Optimizer feed controls, not in strategy code.
tick.priceis the bar close.tick.qtyis the aggregated bar volume.tick.countis the aggregated bar trade count.tick.time_nsis the bar's close-boundary timestamp (UTC).
If launch fails, include your loader version, OS, and latest crash log so support can reproduce the issue quickly.