“New Candle” Problem in MetaTrader

MetaTrader is a great software for charting, analyzing, trading, and testing. It has many useful features and supports many tools that make the life of the Forex trader much easier. But when it comes to drawing the new candles/bars on the chart there is a tricky part of MetaTrader.
Both in MT4 and MT5, the candles are drawn depending on the ticks (each tick is a moment when a new quote from the broker comes) rather than on the time, while the charts themselves are displayed based on  the time. The problem is that the new candle will not be drawn on the chart exactly at its expected start time. You will have to wait for the next tick after that start time, and only then the candle is displayed on the chart.
For example, you can look at the M1 chart. It is quite obvious that 13:45:59 is the last second of the previous candle, the next candle should be available at 13:46:00, but you may still end up looking at the previous candle even at 13:46:05 or later (depending on the market volatility). If the tick comes on 13:46:22, the new candle will be drawn at that time with the Open value at the price which came with the tick.

So why should it matter? What consequences such behavior has for trading? First, the candle charts look different because of it. Often, Close value of the previous candle is not the same as the Open value of the next candle — we have to wait for the new quote, and the new quote often means a new price. Second, we cannot base our trading solely on time, especially if we try to be precise up to a second. All scripts, expert advisors, and indicators have to rely on the time of the last tick rather than on the exact time.
So how do you avoid being affected by all this? When you trade based on the candle/bar charts in MetaTrader, always keep in mind that the candles depend on ticks, not on time. If you trade on longer timeframes, it will not be difficult, especially if the Forex market is slow. If you trade on M1/M5, pay attention to prevClose/Open difference when trying to apply the candlestick chart patterns. If you code an indicator (or some other MetaTrader program), try to avoid relying on the round time values, remember that the system is tick-based, use the “>=” comparison instead of the strict “=” when dealing with the seconds.

If you have any questions or comments regarding this problem of the MetaTrader Forex platform, please, reply using the form below.

Leave a Reply

Your email address will not be published. Required fields are marked *

forty + = forty nine