//+------------------------------------------------------------------+ //| cd.mq4 | //| neo | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "neo" #property link "http://www.metaquotes.net" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 MediumSeaGreen extern int SHORTPERIOD=20; extern int LONGPERIOD=200; //---- buffers double KK[]; double MM[]; double JC[]; double SC[]; int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexBuffer(0,JC); SetIndexStyle(1,DRAW_ARROW); SetIndexBuffer(1,SC); SetIndexArrow(0,233); SetIndexArrow(1,234); SetIndexLabel(0,"upcross"); SetIndexLabel(1,"downcross"); return(0); } int deinit() { //---- //---- return(0); } int start() { int counted_bars=IndicatorCounted(); int limit; if(counted_bars<0) return(-1); if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //----------------------------------------------------------------- for(int i=0; i0; n--) { if(KK[n]>100 && KK[n+1]MM[n]) JC[n]=Close[n]; if(KK[n]>100 && KK[n+1]>MM[n+1] && KK[n]