Multi-Timeframe Analysis#
In live trading, a single timeframe is often not enough. You might want to use the daily chart to gauge trend while using the 5-minute chart for entries, or compare a stock against its index. MultiCharts lets you load several data series onto one chart, and a script can read all of them.
Data Series Numbering#
The main chart symbol is Data1 — this is what scripts read by default. Additional series are numbered Data2, Data3, and so on, up to Data50 in current MultiCharts versions.
- When a script writes
Close,High, orVolume, it reads fromData1by default. - To read from another series, append
of dataN, e.g.Close of data2,High of data2.
Adding a Data Series#
Right-click the chart → Format → Add Symbol (or Insert → Symbol, depending on version) → pick the symbol and resolution → assign it to Data2 (or a higher number). The new series appears as a subchart or overlay.
Reading Data2#
| |
Bar Synchronization#
When the chart holds resolutions of different sizes (e.g. Data1 = 5-minute, Data2 = daily), the smaller resolution drives script execution. What Data2 returns depends on the Realtime-History Matching (RHM) option.
Where to find it: Format Indicator/Signal → Properties (Backtesting for signals) → Advanced → Realtime-History Matching checkbox. It is enabled by default.
Why RHM Exists#
In backtesting, every bar is already closed; the script walks forward bar by bar, and each Data1 bar reads a Data2 value that is already completed at that moment in time. In real time, however, Data1 and Data2 tick at different rhythms — reading Data2’s current (possibly unfinished) value produces results that do not match backtest output. RHM controls whether real-time calculation should imitate backtest behavior (time-aligned, closed bars only) so that the two stay consistent.
RHM Enabled (default)#
The script is calculated on the latest bar of Data1 and the currently completed bar of Data2.
With Data1 = 5-minute, Data2 = daily:
- The script runs once per 5-minute bar.
- Throughout today’s 5-minute bars,
Close of data2returns yesterday’s daily close and does not change tick by tick. - Only after today’s daily bar closes does
Close of data2update to today’s close.
This is the most common and easiest-to-reason-about mode, and it keeps backtest and real-time results aligned.
RHM Disabled#
The script is calculated on the latest bar of Data1 and the current (completed or not) bar of Data2.
In the same scenario, Close of data2 refers to the currently forming daily bar; its value updates with every new tick on Data1. This reacts faster but can produce mismatches between backtest (which only has closed historical bars) and real-time results.
Multi-Timeframe Example#
Use the daily chart for trend direction and the 5-minute chart for entries. Go long on the 5-minute chart only when the daily close is above its 20-day MA.
| |
Relative Strength Example#
Compare the main symbol with a benchmark index. Enter long when the stock outperforms the index over the lookback window.
| |
Notes#
- Alignment: Different symbols may have different sessions and holidays. When
Data1has a bar butData2does not, price functions onData2return the prior bar’s value. - Backtest speed: More data series means slower backtests. Two or three series are usually enough for most strategies.
- Order routing: By default, buy and sell commands execute on the data series the signal is applied to (normally
Data1). To tradeData2, apply the signal directly toData2. - RHM setting: RHM is on by default; keeping it on minimizes backtest/real-time divergence. Only turn it off if the strategy genuinely needs intraday values from the forming higher-timeframe bar.
Reference#
https://www.multicharts.com/trading-software/index.php?title=Multiple_Data_Series
https://www.multicharts.com/trading-software/index.php?title=Of_Data
https://www.multicharts.com/trading-software/index.php?title=Realtime-History_Matching