- Is it possible? Building EA based on overlay indicator in window 1
- == operation
- How i add 2 indicators in the same window?
Drag the MA onto the SD window and select price as previous indicator.
To do it programmatically, you have to "program" it.
One would copy the Standard Deviation values into an array and then apply a moving average on the array with iMAOnArray() to obtain the average of the Standard Deviation. Then one would compare the two values.
This is however, not the most efficient. The more efficient way would be to code something using incremental calculations, but that might be too mathematical for must users.
![iMAOnArray - Technical Indicators - MQL4 Reference iMAOnArray - Technical Indicators - MQL4 Reference](https://c.mql5.com/36/60/imaonarray-technical-indicators.png)
- docs.mql4.com
You must make an indicator which makes the calculation properly – so calculate STD and then calculate MA on those calculated buffer. I think it can be done in the simple indicator – just must be programmed properly. Then you can compare them as you want.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use