Do or do not, there is no try.
Perhaps you should read the manual. iHigh
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
you are reinventing the wheel
https://www.mql5.com/en/docs/series/ihigh
https://www.mql5.com/en/docs/series/ilow

- www.mql5.com
void OnTick() { double TestMax = iHigh(_Symbol, PERIOD_CURRENT, 0); double TestMin = iLow(_Symbol, PERIOD_CURRENT, 0); }
Thanks.
iTime, iOpen, iHigh, iLow, iClose, iVolume, iBars, iBarShift, iLowest, iHighest, iRealVolume, iTickVolume, iSpread were added in
New MetaTrader 5 Platform build 1860: MQL5 functions for operations with bars and Strategy Tester improvements - MQL5 programming forum 2018.06.14
MQL5 Reference → Timeseries and Indicators Access
Perhaps you should read the manual.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Good morning everyone I will like to know how to specify next candle index ... I tried the below syntax
double open_current = iOpen(Symbol(),Period(),0); // open price of current candle double close_current = iClose(Symbol(),Period(),0); // close price of current candle double open_next = iOpen(Symbol(),Period(),-1); // open price of the candle next double close_next = iClose(Symbol(),Period(),-1); // close price of candle next
I also want to know if I can set take profit at opening price of the next candle
Thanks in advance

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use