Getting averages over multiple bars/days
3件の返信
I want to get an average of the last 4 days high – open. Does EA Wizard have any shortcut to get things like this done without meticulously coding out a very long equation day1 day2 day3 day4… ? What if I wanted a 100 or 200 day average? Is there a short way to go about this?
Should be simplified.
Such as:
AVERAGE: bars 4 (with timeframe option): High-open
0
Will try to find a solution for this and let you know but this will probably require a custom function. Don’t know build-in function that could do this
0
こんにちは、,
I made the function for you. You need to
1) copy code into Wizard / code / CustomFunctions.mq4
double averageHighOpenRange(int period) {
double sum = 0;
for (int i = 1; i <= period; i++) {
sum += High[i] - Open[i];
}
return(sum / period);
}
2) use it in Wizard like I did on screenshot
0
Thanks, I’ll let you know when I try it out.
0
3件の返信を表示中 - 1 - 3件目 (全3件中)