# find the average range of last xbars and y timeframe

Do you want to write a trading robot? Find solution in MQL5 Reference!
208
2014.04.16 17:56
Can some body tell me hw to find the average range of x bars and y time frame ????
14518
2014.04.16 19:53
ankityadav: Can some body tell me hw to find the average range of x bars and y time frame ????
1. (Sum i=1 to High[i]-Low[i] )/x current TF
2. (Sum iHigh(NULL, y, i) - iLow(NULL, y, i) /x y time frame
3. or use iATR
208
2014.04.16 19:55
WHRoeder:
1. (Sum High[i]-Low[i] )/n current TF
2. (Sum iHigh(NULL, y, i) - iLow(NULL, y, i) /n y time frame
3. or use iATR
hi but what the average this function take ???iATR
208
2014.04.16 20:02
WHRoeder:
1. (Sum i=1 to High[i]-Low[i] )/x current TF
2. (Sum iHigh(NULL, y, i) - iLow(NULL, y, i) /x y time frame
3. or use iATR
Hi can you explain this what it really applied for ??
1. (Sum i=1 to High[i]-Low[i] )/x current TF
2. (Sum iHigh(NULL, y, i) - iLow(NULL, y, i) /x y time frame
14518
2014.04.16 21:33

You asked how do you find an average. I told you how to compute the average. I did not post a function, and "really applied for" is meaningless. You asked how, I answered that. I did not code it for you.

learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.