- www.mql5.com
I'm going to redo this q:
How can I make this SuperTrend indicator, with this ATR - EMA indicator (supertrend uses ATR with MA and whant to change it for EMA)
I'm going to redo this q:
How can I make this SuperTrend indicator, with this ATR - EMA indicator (supertrend uses ATR with MA and whant to change it for EMA)
Here I made it for you...
I simply used the iEma function created by a user here called Mladen Rakic
I added this custom logic where you can activate or deactivate the ATR (it's activated by default)
Enjoy...
Is this using an ATR with exponential MA? where do I see the exponential ema?
Yes look at the bottom of the script, I included the "iEma" function which is for making the exponential moving average.
to change it from MA to EMA I simply change the middle band from this:
Middle[i]=(high[i]+low[i])/2;
to this (function call):
Middle[i] = iEma(close[i], EMA_Period, i, rates_total, 0);
On the ATR section I cleaned up the code, and allowed you to enable or disable the ATR with this:
if(Activate_ATR){ if(!CopyBuffer(atrHandle,0,0,to_copy,Atr)){ Print("Atr failed! Error"); } } else{ ArrayResize(Atr, 0); }
which I thought would be a cool addition to turn it from a Supertrend indicator into a EMA, and back
Thank you very much
I don't know why at this moment, have to look at it better ... but when using the indicator in the strat with the tester, mt5 hangs.
I didn't find any hanging issues, maybe try restarting the application. Check your log files as well, they can go up to 500mb and will causes issues if they do, so you should delete them
File -> Open data folder -> logs
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi,