Buy if value is over the maximum of last 5 candles
-
Hi I'm new here and hae been checking for the Q&A but haven't quite figure it out.
If you want an EA that is able to BUY if the price goes higher than the maximum of the last 5 candles how would you do that?

(Need to check the maximum price of last 5 candles and whenever the current price goes over it then BUY)
I understand that you would need to start "on tick"
And then use "Market Properties" - Highest price (Start Candle ID 1 & End 5) using price ValueHow would you compare it to current price. Is using "Ask"?

I tried but doesn't work.
https://fxdreema.com/shared/uokB86w0d
Thanks in advance
-
Sorry finally it does work and it was a Question not a Tutorial.
As it works it can be kept as a tutorial in case anyone else wants to know how to build a BUY in case the price is over a number of candles.
-
What is it that's not working? alert or delay?
-
Everything works fine now. I was just a mess with ask/bid prices. Thanks for checking.