Direct answer
MT5 Charts are “calculated” by converting raw price data into a sequence of chart points (typically bars) for a selected timeframe, then optionally applying indicator math (if you view an indicator rather than only the price chart). The key idea is simple: a chart needs (1) a timeline (timeframe), (2) a rule that maps many price updates into one bar value, and (3) optional transformation rules for indicators.
Mechanism: what “calculated” means in a chart
A price chart usually shows candlesticks or OHLC bars. For each bar, MT5 must determine four values from the underlying data within that bar’s time interval:
- Open: the first available price in the interval
- High: the maximum price in the interval
- Low: the minimum price in the interval
- Close: the last available price in the interval
These values are computed from time-ordered price observations that fall within the bar’s start and end times. The exact set of observations depends on the data feed and how that feed records prices (for example, tick-by-tick versus already-aggregated bars). If you change the timeframe (for example, 1 minute versus 5 minutes), the bar boundaries change, so the OHLC aggregation changes even if the underlying market is the same.
Material parameters and assumptions
To explain or reproduce the calculation, you need these parameters and assumptions:
- Timeframe: the bar length (e.g., N seconds/minutes). This defines the binning of time.
- Price type: whether the chart uses bid, ask, last, or another price stream (many systems allow selection; the chosen stream changes OHLC values).
- Data granularity: whether the system processes ticks, or whether it receives pre-formed bars.
- Session/timezone alignment: which clock and cutoffs define “the start” of each bar. Misalignment can shift where prices fall into bars.
A simple, checkable model for OHLC bar formation is:
- Partition time into consecutive intervals of length T.
- For bar k, consider all price observations p(t) with times t in interval k.
- Compute:
- Open = p at the earliest t in the interval
- Close = p at the latest t in the interval
- High = max p over the interval
- Low = min p over the interval
If the interval contains no observations (possible when data is sparse), the system must use a fallback rule (for example, carrying forward the last known value or leaving the bar incomplete). Different providers or historical data feeds may make this behavior differ.
Evidence or example you can verify
You can verify the core OHLC calculation using a “same data, same rules” approach. For a chosen timeframe T:
- Pick a specific bar window (for example, a single 5-minute interval).
- Gather the price observations that occur inside that exact time window, using the same price type and the same broker/platform data feed.
- Compute OHLC with the max/min/first/last rules above.
- Compare the computed OHLC to the chart’s displayed candle for that bar.
This test works because the OHLC formation is deterministic given a fixed input stream and bar definition. The uncertainty comes from whether you truly matched the same input stream and timestamps. Even small mismatches—like using bid instead of last—will change OHLC.
If you view an indicator, the “calculation” also includes the indicator’s formula applied to a rolling window of past bars. In that case, changing any of these will change the result:
- indicator parameters (window length, smoothing method)
- the bar values (which already depend on timeframe and price type)
- the historical history included (missing bars or different feed history)
Limitations and risks (what can go wrong)
Several failure modes affect how “calculated” chart values should be interpreted:
- Data availability and gaps: If a timeframe interval has missing observations, OHLC can be incomplete or produced by fallback rules. This makes replication harder.
- Provider and feed differences: Two data sources can differ in timestamps, tick density, and whether prices are interpolated or truncated. Historical reconstructions may not match.
- Bar alignment and timezone: Bar boundaries depend on how time is defined. A one-hour offset can completely change which ticks belong to each bar.
- Costs and execution reality: OHLC bars reflect observed prices in the data stream, not necessarily executable prices at the moment you would trade. Slippage, spreads, and execution model are separate from the chart math.
- Historical relationships don’t validate forward results: Even if an indicator formula matches past chart behavior, it does not guarantee similar behavior in the future.
Verification and next question
A reliable way to independently verify MT5 chart calculations is to focus on the deterministic parts first: the timeframe, the bar OHLC aggregation rules (first/last/max/min within each interval), and the exact price stream used by the chart. Once those match, you can then verify indicators by applying their published formulas to the same historical bar series.
If you want, tell me which chart element you mean by “MT5 Charts” (the price candlesticks only, or a specific indicator), and the timeframe and price type you use. Then I can restate the required inputs and the exact calculation steps for that specific element.