Detalization and execution

Bar detalization is a setting that controls the number of simulated intra-bar ticks used during historical backtesting. It determines how finely each historical bar is subdivided for tick-level simulation.

How it works

The Bar detalization control is located in the Detalization and Execution section of strategy settings. It is presented as a dropdown with two options. The setting only affects historical bar simulation — it defines how many ticks each historical bar is replayed as during backtesting.

Detalization modes

  • Default (4 ticks per bar): Each historical bar is replayed as exactly 4 sequential price ticks using the bar's OHLC values: Open, High, Low, and Close. The order of the middle two ticks (High and Low) depends on the bar's price path — OHLC if the High was reached before the Low, or OLHC if the Low was reached first. This is the standard simulation model and is active by default.
    See also: Script executions → On history bar tick: price visibility rules for details on how OHLC and OLHC tick order is determined.
  • High (~60 ticks per bar) (Premium): The number of ticks per bar is determined dynamically based on the chart resolution and an internal resolution-to-tick mapping table. The platform selects an appropriate intrabar timeframe, divides the chart bar duration by it, and multiplies the result by 4. This produces a significantly higher tick count, improving simulation granularity.

Resolution-to-tick mapping table

The number of ticks per bar depends on the chart resolution and the corresponding intrabar timeframe used for tick simulation.

Chart resolution

Intrabar TF

Division

Bars

Ticks per bar

1T

1T

1 / 1

1

4

100T

10T

100 / 10

10

40

1000T

100T

1000 / 100

10

40

1s

1s

1 / 1

1

4

30s

5s

30 / 5

6

24

1m

10s

60 / 10

6

24

5m

30s

300 / 30

10

40

10m

1m

10 / 1

10

40

15m

2m

15 / 2

7 

28

30m

5m

30 / 5

6

24

60m (1h)

10m

60 / 10

6

24

240m (4h)

30m

240 / 30

8

32

1D

60m

1440 / 60

24

96

3D

240m

4320 / 240

18

72

1W

1D

10080 / 1440

7

28

! Note: Edge case — 15m. The division 15 / 2 yields 7.5 bars, which is rounded down to 7. Total ticks: 28.

Runs a simulation using lower-timeframe values. The number of ticks may vary due to calculation factors.

Main use cases

  • Standard backtesting: Use Default (4 ticks per bar) for most strategies. It provides consistent, resolution-independent tick simulation with low computational overhead.
  • Higher intra-bar precision: Enable High when your strategy relies on intra-bar price movement and you want more realistic simulation of price behavior within each bar. More ticks reduce the impact of bar-path assumptions on backtest results.
  • Comparing simulation fidelity: Run the same strategy in both Default and High modes to assess how sensitive your results are to tick granularity. A significant difference in performance may indicate that your entry or exit logic is fragile under finer price simulation.

Premium workflows: High mode is a Premium feature — use it when the additional simulation detail justifies the computational cost, particularly for strategies with tight stop-losses or precise intra-bar exit conditions.


Script execution is a setting that controls when the strategy script is recalculated relative to bar lifecycle events. By default, the script runs once per bar at its close. Additional modes allow you to trigger recalculation on order fills, on every realtime tick, or on every simulated historical tick. The number of executions in the latter mode depends on the Bar detalization setting: the more ticks are available per bar, the more frequently the script runs.

How it works

The Script executions control is located in the Detalization and Execution section of strategy settings. It is presented as a dropdown with multiple independent checkboxes. On bar close is always active and cannot be disabled — all other modes are additive.

Execution modes

  • On bar close (default): The standard execution model. The script is calculated once at the close of each bar — both historical and realtime. This is the baseline mode and is always enabled.
  • On order fill: An additional recalculation triggered immediately after a trade fill. This mode provides fast access to the updated account state right after an order is executed, without waiting for the next bar to close.
  • On realtime bar tick: For realtime bars only: the script is recalculated on every incoming tick within the current open bar. Has no effect on historical data.
  • On history bar tick (Premium): For historical bars: simulates intra-bar tick execution by replaying each bar as a sequence of price ticks. The number of ticks per bar — and therefore the number of script executions — depends on the Bar detalization setting. Price visibility corrections ensure the script can only "see" prices that have already occurred within that bar, maximizing backtesting realism. See also: Bar detalization.

! Note: On history bar tick is available on standard candlestick charts only. It is not available on Heikin Ashi or other non-standard chart types.

On history bar tick: When this mode is active, each historical bar is replayed as 4 sequential ticks. The order of ticks depends on the bar's price path (OHLC or OLHC). On each tick, only the prices that have "already happened" are visible — future prices within the bar are masked.

See also: Bar detalization → Resolution-to-tick mapping table for details on how the number of simulated ticks per bar is determined based on chart resolution.

How it works 

Tick

Open

High

Low

Close

Open

✅​

​= Open​

​= Open​​

​= Open​​

High

✅​

​✅

​= Open​​

​= High​​

Low

​✅

​✅

​✅

​​= ​Low​

Close

​✅

​✅

​✅

​✅


Main use cases

  • Higher execution precision on fills: Enable On order fill if your strategy logic needs to react immediately after a trade is executed — for example, to place a protective stop right after entry without waiting for the next bar.
  • Realtime responsiveness: Use On realtime bar tick when the strategy must respond to every price update on the live bar, such as for scalping or tick-sensitive exit logic.
  • Realistic historical simulation: Enable On history bar tick to stress-test strategies that rely on intra-bar price movement. The price visibility model prevents look-ahead bias, making backtests more conservative and realistic.

Diagnosing exit quality: Compare results with and without On history bar tick to identify if your exits are sensitive to the exact tick sequence within a bar. A significant performance difference between OHLC and OLHC modes may indicate fragile exit logic.