the errors are about the moving averages - they both appear as horizontal lines (no matter the period)
0.0000000000000000000000000000000001 is to avoid dividing by zero and not complicate the code at the same time
[img]http://charts.mql5.com/3/437/eurusd-m5-alpari-limited.png[/img]
for (i=0; i<=Bars; i++) wantedcutvalue[i] = iMAOnArray(currentbarvalue,0,wantedbars,0,0,0); for (i=0; i<=Bars; i++) benchmarkvalue[i] = iMAOnArray(currentbarvalue,0,benchmarkbars,0,0,0);
Why do you want every arrayvalue filled with same result ??
deVries:
Why do you want every arrayvalue filled with same result ??
thanks alot for the reply
I don't want that, actually... I thought that with that last zero I am not shifting anything...
thanks alot, deVries, with the "i" instead of the zero it looks quite correct :))))))))))))))))
ku43to: I thought that with that last zero I am not shifting anything...
Exactly. "Not shifting anything" means the same value.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
this code is supposed to caclulate the realtive lenght of the whick versus the body of the candle - and after that calculate and visualize an average for a short and a longer period of that
I am very new to coding (I suppose I couldn't hide it even if I wanted :)))))) ) - so please show me the errors and/or incompleteness :))))))))