//+------------------------------------------------------------------+ //| MMR.mq4 | //| Based on a strategy by cmillion | //| EMA5+LWMA85 crossover with MACD and RSI confirmation | //+------------------------------------------------------------------+ #property copyright "Copyright @ 2011, downspin" #property link "mg@downspin.de" int deinit(){return(0);} #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 DodgerBlue #property indicator_color2 Green #property indicator_color3 Red #property indicator_level1 0 #property indicator_levelcolor DarkSlateGray extern int mac_fast_ma=12, mac_slow_ma=26, mac_signal=9, rsi_period=14, ema_period=5, lwma_period=85; double long1[], short1[], val[]; int init(){ SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,val); SetIndexStyle(1,DRAW_HISTOGRAM,EMPTY,5); SetIndexBuffer(1,long1); SetIndexStyle(2,DRAW_HISTOGRAM,EMPTY,5); SetIndexBuffer(2,short1); return(0); } int start(){ double ema,lwma,rsi,mac; for(int i=0;ilwma)&&(rsi>10)&&(mac>0)){ long1[i]=val[i]-10; } if((ema