Calculation timing and variable state
TradeStation documents bar-close evaluation as the default. With Intrabar Order Generation enabled, a live strategy evaluates each tick. On historical bars, IOG alone evaluates the open, high, low, and close; Look-Inside-Bar Backtesting supplies more detailed data. It does not automatically reconstruct every historical tick. Pine strategies also calculate at bar close by default. Pine indicators normally update on realtime ticks, while strategies require calc_on_every_tick for that behavior.
| Concern | EasyLanguage | Pine Script |
|---|---|---|
| Values within an open bar | IntrabarPersist lets a variable retain updates on each tick; ordinary variables update at bar close. | Rollback restores ordinary variable state before realtime recalculation. var persists across bars but does not escape rollback; varip does. |
| Historical intrabar data | IOG and Look-Inside-Bar settings determine available calculation detail. | Bar Magnifier uses lower-timeframe prices for simulated fills. It does not turn strategy logic into historical tick-by-tick calculation. |
| Extra recalculations | Record the strategy calculation settings before translating rules. | calc_on_every_tick affects realtime updates; calc_on_order_fills adds calculations after simulated fills. Neither is a universal equivalent of IOG. |