How to find new candle (new bar) use MQL programming?
Here are two ways to identify a new candlestick using MQL for MetaTrader. static int BARS; bool IsNewCandle() { if (BARS != Bars(Symbol(), PERIOD_CURRENT)) { BARS = Bars(Symbol(), PERIOD_CURRENT); return (true); } return (false); } datetime NewCandleTime = TimeCurrent(); bool IsNewCandle() { if (NewCandleTime == iTime(Symbol(), 0, 0)) return false; else { NewCandleTime = iTime(Symbol(), […]
How to find new candle (new bar) use MQL programming? Read More »