How can iClose value is possible for Current candle because ones the candle is closed, it became previous candle. ?
The close price of the current candle is always equal to the bid
I don't quite understand what you're talking about. Have you ever seen those prices not being equal to each other?
I don't quite understand what you're talking about. Have you ever seen those prices not being equal to each other?
Yes, especially when the bid-ask spread is high. Have you seen what a bid price can be compared to the current close price during news events with extremely high volume?
FYI, every single OHLC price is lagging, on every timeframe as well. A 1 tick timeframe is actually going to give more accurate representation of the market than a 1 second timeframe, and this is why tick charts are valid and respected in the software
I may not understand exactly what you mean but I think you are talking about different things.
The second bar is static , the first bar is dynamic and reflects the movement of the ontick and is in a state of flux until the time comes for a new bar to form, after which the bar is fixed as the second bar and becomes static.
Hello,
Article : https://www.mql5.com/en/docs/series/iclose
iClose, iHigh, iLow, iOpen these values provide the current/Live/real-time candle information or previously closed candle information?. How can iClose value is possible for Current candle because ones the candle is closed, it became previous candle. ?
back to the original question: iClose, iHigh, iLow, iOpen provides both. The first bar is real-time and the others are historical.
But for fast live trading it makes more sense to look bid and ask prices also. iXXX functions are very good for looking at historical timeseries data starting from the second (the first closed) bar.
- shift = 0 → Refers to the current (unfinished) candle.
- shift = 1 → Refers to the last closed candle.
- shift = 2 → Refers to the candle before the last closed candle.
double close_price = iClose(Symbol(), PERIOD_M1, 0);
You might think that iClose should only work for closed candles. However, when requesting the closing price of an ongoing candle (shift = 0), MQL5 returns the last updated price.
It's not the actual close price but the current price, which will become the close price when the candle finishes.
For the current (unfinished) candle (shift=0):
- iClose → Last updated price (not final close price yet).
- iHigh → Highest price reached so far.
- iLow → Lowest price reached so far.
- iOpen → Open price (fixed at the start of the candle).
For a closed candle (shift=1, 2, ...):
- iClose → Final closed price.
- iHigh, iLow, iOpen → Fixed values for that completed candle.
- shift = 0 → Refers to the current (unfinished) candle.
- shift = 1 → Refers to the last closed candle.
- shift = 2 → Refers to the candle before the last closed candle.
You might think that iClose should only work for closed candles. However, when requesting the closing price of an ongoing candle (shift = 0), MQL5 returns the last updated price.
It's not the actual close price but the current price, which will become the close price when the candle finishes.
For the current (unfinished) candle (shift=0):
- iClose → Last updated price (not final close price yet).
- iHigh → Highest price reached so far.
- iLow → Lowest price reached so far.
- iOpen → Open price (fixed at the start of the candle).
For a closed candle (shift=1, 2, ...):
- iClose → Final closed price.
- iHigh, iLow, iOpen → Fixed values for that completed candle.
exactly like that - very accurate review :) !

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Article : https://www.mql5.com/en/docs/series/iclose
iClose, iHigh, iLow, iOpen these values provide the current/Live/real-time candle information or previously closed candle information?. How can iClose value is possible for Current candle because ones the candle is closed, it became previous candle. ?