How to store the highest and lowest point from indicator?
-
Hello,... I am still finding how can I store the highest and lowest point from indicator. Let say ATR indicator, I want to use those when the ATR in the meddle value between highest and lowest point then close partially 50%.
And what about other indicator? will they use the same method?
Very apricate.
-
@windsor-2003 You can create a custom loop searching for those values in ther past. How many candles in the past are you supposed to look at?
-
@l-andorrà what should it be!! I am not sure about the candle stick

but I want to store the highest and lowest ATR values starting from the highest point (marked by the first red arrow) to the lowest point (marked by the second red arrow). How can I achieve this in my EA?
So if this way request candle stick ,could you recommend to me what it suppose to be to store the highest and lowest point from indicator ATR.
-
The problem is how many candles in the past are to be searched. You need to limit that number in order to make the bot functional. Will they be 20 candles in the past? 50? 100? If you make it unlimited you will get many highs amd many lows, and the bot will simply be unoptimizable because of the huge information to be processed. Probably what you need is a custom indicator doing that search on it's own instead of embedding it on the bot. I don't know any indicator doing that, but I'm pretty sure you can find some on mql5.com.
-
@l-andorrà Let say 200 candle... then how could it be
-
@windsor-2003 This would be the structure for the highest value:
https://fxdreema.com/shared/wobfy3JZd
But please remember that you will need to restat that variable somewehere else in your bot.
-
@l-andorrà Thank you so much
-
You're welcome.