Forum

Array outside the OnTick function

hey guys, got a problem here: I want my EA to do a price level calculation exactly once per day and compare it to the prize level from the day before. I also want the time the calculation happens to be a user input, as well as it working on multiple timeframes. The way i am doing this is basically

mql5 help: for-loop for finding swing highs

Hi there! I was playing around programming some EAs that work with swing highs/lows. The way i detect swing highs/lows is (obviously) through the iHighest function. Now: I want to implement a user input lookback period, for example 20 bars, so that the EA finds the highest from the last 20 bars