Bar Magnifier

From MultiCharts
Jump to navigation Jump to search

The Bar Magnifier backtest feature is important for precise backtesting. Bar magnifier can be considered as a replay of the way a bar was formed. The user can choose a replay frequency that is based on number of ticks or number of minutes.

There is a tradeoff between the level of precision in a replay and memory requirements. Tick-by-tick replay is the most precise, but it also requires the most memory. If the strategy does not require high precision, then replays based on n-ticks or n-minutes may be sufficient.

For example, Bar Magnifier is helpful when both the profit target and stop loss occurred on the same bar. In this situation, it is unclear whether the profit target or the stop loss occurred first. With Bar Magnifier, MultiCharts is able to see how the bar was formed to determine whether the profit target or the stop loss occurred first.

Note: We suggest to use tick data because it is most precise.


To use the feature:

  1. Open the Strategy Properties window.

    To open the Strategy Properties window:
    1. Open the Format Objects window.

      To open the Format Objects window, right-click on an empty area of the chart and then click Format Signals.

      The Format Objects window can also be opened by one of the following methods:
        - Select Format in the main menu and click Signal.
        - Double-click any one of the signal's labels on the chart.
        - Position the mouse pointer over any one of the signal's labels on the chart; once the Pointer Pointer.png changes into a Hand Hand.png, right-click the label and then click Format Signals.

    2. Select the Signals tab.
    3. Click Properties button to open the Strategy Properties window.
  2. Select the Backtesting tab.
  3. In the Backtesting Precision section, select the Use Bar Magnifier checkbox.
  4. MultiCharts will break down each bar into a series of lower resolution bars so that it can look to see how the bar was formed:
    • Select the Tick radio button if the chart has tick-based resolution. Enter the number of ticks for the lower resolution bars. The number of ticks must be at a lower resolution than the chart resolution, or
    • Select the Intra-day radio button if the chart has minute resolution or daily resolution. Enter the number of minutes for the lower resolution bars. The number of minutes must be at a lower resolution than the resolution of the chart, or
    • Select the Daily radio button if the chart has weekly resolution or higher. MultiCharts will break down each bar into daily bars to see how the bar was formed.
  5. Check the Skip ticks with identical prices checkbox for faster backtesting. MultiCharts will skip ticks with identical prices when it constructs the lower resolution bars.
  6. Check the Enable access to intra-bar time for calculation in Intra-Bar Order Generation mode checkbox to make intra-bar time (timestamps of the detailed data series selected in Bar Magnifier) available from PowerLanguage script (Date, Time and Time_s keywords).
Note: If a strategy is based volume, then selecting this box may disrupt the volume calculations.