In this article
After this article, you can
- Calculate actual bar duration from its two timestamps.
- Separate candle count from session time coverage.
Terms at hand: Trading Plan · Trading Journal · Commission · ESMA regulation · spread (bid-ask spread)
A timeframe groups observations into candles. It does not set how many trades you must make, how long a position stays open, or how much spread you pay. Decode the units, reconstruct OHLC aggregation and preserve session timestamps before comparing signals or costs.
Three closed H1 bars need not cover three hours
The interval code alone cannot calculate time. A session boundary may close the final bar before its nominal duration.
Scroll sideways to see the full diagram
Original technical model, not assigned to a real broker or market. Assume a 09:00–11:30 UTC session, ordinary H1 time bars aligned to session opening and the final bar closing at session end. No prices or open position are shown. The document TradingView — Time supports a shorter final time-chart bar due to session alignment.
Keep both timestamps in the export and calculate duration as end minus start. Do not fill the final bar with invented quotes to complete an hour. A rule based on candle count must not later be described as a fixed calendar duration.
What do the codes M1, H1, D1 and MN actually mean?
A timeframe specifies the nominal time interval used to build bars. A full M5 bar normally spans five minutes, but session boundaries and data settings can produce a shorter final bar. Keep both opening and closing timestamps and distinguish nominal length from actual covered time. This is why three closed H1 bars in the diagram can cover 150 minutes.
In MetaTrader notation, M1/M5/M15/M30 count minutes, H1/H4 hours, D1 a day, W1 a week and MN/MN1 a calendar month, not necessarily 30 days. MT5 offers 21 periods including M2 and H8. Codes and availability can differ across applications; a zoom change enlarges the same bars, while a timeframe change groups observations differently. The single Japanese candlestick guide explains the OHLC fields.
Three M5 bars and one aligned M15
Use hypothetical ordinary EUR/USD Bid bars in UTC, with complete data and left-closed/right-open intervals. The M5 OHLC rows for 10:00–10:05, 10:05–10:10 and 10:10–10:15 are respectively 1.1000/1.1020/1.0990/1.1010; 1.1010/1.1030/1.1005/1.1025; and 1.1025/1.1028/1.0985/1.0995. Aligned M15 is 1.1000/1.1030/1.0985/1.0995: first open, maximum high, minimum low, final close. It is bearish despite two bullish M5 bodies. Aggregation does not preserve every intrabar turn or the ordering of extremes.
Compare costs with the intended price move using actual account terms. In a hypothetical example, spreads of 0.1–1.2 pips divided by moves of 4–6 pips span about 1.7% to 30%, not uniformly one fifth to one third. Commission and financing may add costs, and a longer timeframe does not eliminate them.
Practical takeaway: A timeframe aggregates observations into intervals; the session boundary determines how those intervals are built.
Aligned boundaries and information time
At 10:07, the M15 bar ending at 10:15 has not supplied its final Close. Using that final historical value for a decision at 10:07 introduces later information. A bar’s nominal period and the timezone label alone do not establish matching boundaries, completion or the same source observations.
Compare actual decision timing and order requirements in scalping as a trading style and the basics of swing trading. More bars on screen do not require more entries or establish the highest costs or psychological pressure. Any frequency and cost comparison needs defined trades.
A shared label H4 can hide different windows: 08:00–12:00 UTC and 09:00–13:00 UTC use different observations. Save the opening and closing timestamps, feed, instrument and Bid/Ask/Last field. In TradingView, changing the chart timezone changes displayed time, not Pine script time calculations or automatically the bar grouping.
How does the same move look on M5 versus H4?
Over an assumed complete eight-hour interval, M5 gives 96 aligned bars and H4 two. An endpoint change from EUR/USD 1.0820 to 1.0860 is 40 pips at 0.0001, but those endpoints alone do not determine each H4 body or the intrabar path. Switching the view creates no transaction and charges no spread.
An intermediate timeframe can lose the detail needed for another alignment. In a separate arbitrary-unit model, M10 10:00–10:10 is 100/103/99/100. The following M10 is 100/110/100/109 in both variants. It can consist of M5 pair A: 100/105/100/104 then 104/110/104/109, or pair B: 100/109/100/108 then 108/110/104/109. M15 ending at 10:15 becomes 100/105/99/104 in A and 100/109/99/108 in B. Identical M10 cannot determine which M15 is correct; copying Close from 10:20 would also use later information.
In a separate USD-account cash-flow model, buy 10,000 EUR at Ask 1.1001 with Bid 1.1000 and total commission USD 2, excluding funding and conversion. Bid exit 1.1005 gives +USD 4 before commission and +USD 2 after; Bid exit 1.1050 gives +USD 49 and +USD 47. Spread is already in these prices. Spread plus commission is USD 3, or 60% of a 5-pip Bid move and 6% of a 50-pip move. The chart timeframe does not guarantee either move. Multiple timeframe analysis and the technical analysis section expand these data and rule distinctions.
What to do tomorrow
- Reconstruct one aggregation. In the M5 table, change only the third High to 1.1040 and its Close to 1.1015. The M15 OHLC becomes 1.1000/1.1040/1.0985/1.1015 with a bullish body. Its four prices still do not reveal every move in the quarter-hour.
- Save both bar timestamps. The fictional 09:00–11:30 UTC session uses H1 bars of 60, 60 and 30 minutes, total 150. The final bar is complete at session end; do not add invented prices to make it one hour.
- Calculate transaction costs. Use actual hypothetical entry/exit prices, volume, commissions and applicable funding. A chosen 5- or 70-pip move can illustrate a fraction; it is not a typical movement established merely by naming M5 or H4.
- Define the observation process. Choose when you can evaluate the recorded condition, whether it needs closed candles, and how orders are handled. If adding a second timeframe, assign its role in advance and compare complete simulations rather than assume a better result.
Check your understanding
One short exercise
About 2 min · you can try again
Three H1 bars closed during 09:00–10:00, 10:00–11:00 and 11:00–11:30 in the specified session. How much time do they cover?
- 180 minutes: every H1 must last an hour.
- 120 minutes: exclude the shorter final bar.
- 150 minutes: the durations are 60, 60 and 30 minutes.
Check the answer and explanation
150 minutes: the durations are 60, 60 and 30 minutes.
09:00 to 11:30 spans 150 minutes. There are three bars, but their durations are not identical.
Frequently asked
What is the difference between a timeframe and an investment horizon?
These are two different things that are easy to confuse. A timeframe is a technical chart setting — how much time a single candle represents, for example five minutes on M5 or four hours on H4. An investment horizon, by contrast, is how long you plan to keep a position open, regardless of which chart you analyse it on. You can analyse the market on the H1 timeframe and hold a position for two weeks. In practice, though, the two often go together: a scalper watches M1 and closes within minutes, while a position trader reads D1 or W1 and holds for weeks. Your timeframe should therefore match your real horizon, not the other way around.
Can I trade profitably using just one timeframe?
A strategy may use one or several timeframes, but their number does not establish profitability. Define each view’s role, candle completion and available information before testing the entry and exit rules with costs. A higher-timeframe downtrend does not by itself explain or guarantee the result of a particular lower-timeframe trade.
Why does the same candle look different when I change the timeframe?
With complete data and aligned boundaries, an H1 OHLC can be formed from twelve M5 bars: first open, maximum high, minimum low and final close. It loses the other intermediate opens/closes and intrabar ordering. Session gaps, missing bars or a shorter final period require checking, so “nothing is lost” is incorrect.
What do unusual timeframes like M2, H8 or W1 mean?
In MT5 notation M2 is two minutes, H8 eight hours and W1 one week; MN1 is a calendar month. The MQL5 enumeration contains 21 fixed periods. Availability and labels are platform-specific; an unusual period does not by itself establish an edge, and a familiar one does not establish reliability.
Sources & bibliography
-
MetaQuotes / MetaTrader 5 View and Configure Charts — MetaTrader 5 Help · Explains chart timeframes and the intervals available in MetaTrader 5, from minute-based to monthly charts. www.metatrader5.com ↗
-
MetaQuotes / MetaTrader 5 Charts — MetaTrader 5 for Android Help · Documents the platform's chart-interval codes, including minute, hour, daily, weekly and monthly units. www.metatrader5.com ↗
-
CME Group Trading Simulator How-To Guide: Chart Time Frames · An educational guide to choosing chart timeframes in CME's trading simulator. www.cmegroup.com ↗
-
StockCharts ChartSchool What Are Charts? · Explains chart-data aggregation across intraday, daily, weekly and monthly timeframes and how aggregation changes the analysis. chartschool.stockcharts.com ↗
-
MetaQuotes MQL5 Reference — Chart Timeframes · The 21 MT5 period identifiers and their minute, hour, daily, weekly and monthly units; labels are platform-specific. www.mql5.com ↗
-
TradingView Pine Script documentation — Time · Bar opening/closing timestamps, display timezone versus script time, and session-aligned shorter final bars. The article’s UTC session is hypothetical. www.tradingview.com ↗
