coding moving average

 

Hi

I am lookong to code an exponential moving average 14. I know a litttle about coding and I am trying to use the Moving Average ea that comes with the mt4 download as a guide. 

that one is set at 12. How do you decifer simple ma from exponential in the code, and what is extern double MovingShift = 6; mean how would I apply to new ea?

I also want to put stop loss and profit target inputs

Thanks. 

Documentation on MQL5: Math Functions / MathExp
  • www.mql5.com
Math Functions / MathExp - Documentation on MQL5