Forum

How to use one indicators values to create a moving average in mql4 (for an EA) without calculating it muanually

Evening gents, I've been trying to do a calculation where it takes the values of an indicator and then creates a moving average from that. I can do this by using a horrible for-loop and use the shift function to add up and then divide by the amount I shifted it. ex: for ( int i = 2 ; i <= lookback;