is it possible to just update Variation.mq4
similar indicator on mq5 https://www.mql5.com/en/code/27
In MT4 there was and is such a function
iMAOnArray(ExtMapBuffer2,0,IdArray,0,MODE_SMA,i)
maybe this is the issue ? https://www.mql5.com/en/docs/indicators/ima

Detrended Price Oscillator (DPO)
- www.mql5.com
Осциллятор бестрендовой цены (Detrended Price Oscillator, DPO) устраняет эффект направленности в движении цен. Это значительно упрощает процесс выявления циклов и уровней перекуплености/перепроданности. Долгосрочные циклы состоят из ряда более коротких. Анализ таких краткосрочных составляющих помогает определять важные переломные пункты в...
none of your codes work worse off with your include file not sure what you stand to benefit by positing half baked codes

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
Variation:
This trend indicator shows the current trend direction and moments for closing of the opened position.
There are 3 variants of the indicator:
Author: Nikolay Kositsin