//============================================= //По вопросам заказа советников обращаться на // ICQ 155553959 //============================================= extern string НАСТРОЙКИ= "Главные настройки" ; extern int Slip = 50 ; extern int MagicNumber = 227 ; extern double Lots = 0.1 ; //============================================= extern int FastEMA =15 ; extern int SlowEMA =45 ; extern int RSIPeriod =3 ; //============================================= int t1,t2 ; int start () { //================================================================================= double SID1 = iMA (NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,0); double SID2 = iMA (NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,0); double RSIS = iRSI (NULL,0,RSIPeriod, PRICE_CLOSE, 0); //================================================================================= //НАЧАЛО //================================================================================= int siup=0; int sidw=0; double pipdiffCurrent=SID1-SID2; if (pipdiffCurrent>0 && RSIS>50) {siup = 1; } else if (pipdiffCurrent<0 && RSIS<50) {sidw = 1; } //================================================================================= //================================================================================= if (OrdersTotal() == 0) { if(siup==1) { //===============================================================================================================================// t1=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,Digits),Slip,0,0,NULL,MagicNumber,0,CLR_NONE); } if(sidw==1) { t2=OrderSend(Symbol(),OP_SELL,Lots,NormalizeDouble(Bid,Digits),Slip,0,0,NULL,MagicNumber,0,CLR_NONE); } } //===============================================================================================================================// if (OrdersTotal() == 1) { if(siup==1) { //===============================================================================================================================// if(t2>0) { OrderClose(t2,Lots,Ask,Slip,Red); } } if(sidw==1) { if(t1>0) { OrderClose(t1,Lots,Bid,Slip,Red); } } } return(0);}