- The easiest MA is exponential alpha=2.0/(length+1); new=old + alpha(value-old)
- For the current candle, decide if it's up or down, update the appropriate buffer.
William Roeder:
- The easiest MA is exponential alpha=2.0/(length+1); new=old + alpha(value-old)
- For the current candle, decide if it's up or down, update the appropriate buffer.
Thanks..one more question.
another task that i would like to do is looping to average every other bar, can you give me an example.
1. display moving average of even bar (0,2,4,6,8...)
2. display moving average of odds bar (1,3,5,7,9....)
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 all,
I am learning mql code at the moment, and I am stuck at this problem, not ideas how to loop it , can any one please give me a sample code.
basically, I would like to create a separate indicator display 2 data series as following.
1. display simple moving average of x bar for only UP CANDLE of Open price
1. display simple moving average of x bar for only DOWN CANDLE of Open price
thanks