Bar Magnifier: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
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. | 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. | ||
<div | <div class="note">We suggest to use tick data because it is most precise.</div> | ||
<br>To use the feature: | <br>To use the feature: | ||
Line 22: | Line 22: | ||
# 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). | # 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). | ||
<div | <div class="note">If a strategy is based on volume, then selecting this box may disrupt the volume calculations.</div> | ||
<br> | <br> | ||
[[Category:Backtesting]] | [[Category:Backtesting]] |
Revision as of 12:02, 19 July 2024
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.
To use the feature:
- Open the Strategy Properties window.
To open the Strategy Properties window:- 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 Pointerchanges into a Hand
, right-click the label and then click Format Signals.
- Select the Signals tab.
- Click Properties button to open the Strategy Properties window.
- Open the Format Objects window.
- Select the Backtesting tab.
- In the Backtesting Precision section, select the Use Bar Magnifier checkbox.
- 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.
- 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.
- 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).