//+------------------------------------------------------------------+ //| TrendEMA.mq4 | //| FxPars | //| http://www.fxpars.com | //+------------------------------------------------------------------+ #property copyright "FxPars" #property link "http://www.fxpars.com" #property indicator_chart_window extern int LargeEMA=48; extern int MediumEMA=24; extern int LowEMA=16; double Lma=0; double Mma=0; double Nma=0; double pp=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- Lma=iMA(NULL,PERIOD_M30,LargeEMA,0,MODE_EMA,PRICE_CLOSE,1); Mma=iMA(NULL,PERIOD_M30,MediumEMA,0,MODE_EMA,PRICE_CLOSE,1); Nma=iMA(NULL,PERIOD_M30,LowEMA,0,MODE_EMA,PRICE_CLOSE,1); if (Lma>Mma && Mma>Nma) { Comment("DownTrend " + "\nLargeEMA= " + Lma + "\nMediumEMA= " + Mma + "\nLowEMA= " + Nma); } else if (Lma<Mma && Mma<Nma) { Comment("UpTrend " + "\nLargeEMA= " + Lma + "\nMediumEMA= " + Mma + "\nLowEMA= " + Nma); } else { Comment("Sideway " + "\nLargeEMA= " + Lma + "\nMediumEMA= " + Mma + "\nLowEMA= " + Nma); } //---- return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Indicator Curves created:
Indicators Used:
Moving average indicator
Custom Indicators Used:
Order Management characteristics:
Other Features: