- You have the trade's OrderOpenTime and OrderCloseTime.
- Use iBarShift to find the chart's indexes.
- Use iHighest, iLowest to find the index of the most extreme bar in the timeframe.
- Get the price.
WHRoeder:
WhRoeder, thanks!!! The iHighest & iLowest has escaped my notice.
- You have the trade's OrderOpenTime and OrderCloseTime.
- Use iBarShift to find the chart's indexes.
- Use iHighest, iLowest to find the index of the most extreme bar in the timeframe.
- Get the price.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I like to get candles highs & lows to calculate mfe&mae. I have written a script wich is getiing trade infos from history after magic number and symbol. The script is working properly until the code arrives to get the candle highs&lows.
Here is the code, I have a problem with
for ...
I am printing out the variables and I see difference between counter2 and bar_number[0]. In the bar_number array are the closed trades bar numbers wich I get from the closed trades opening time with iBarShift.
Maybe in the code are more failure, I don't know coz the script is stoping work properly after for operator.
Thanks in advance for help
Cheers
Gabor