extern int MagicNumber=454; extern double Lots=0.01; extern double Factor=1.55; extern double Trailing_Stop=350; extern double CCILevel1=50; extern double CCILevel2=190; int start() { //---- int i,ordini; for (i=0;iVolume[2]*Factor) if (iCCI(NULL, NULL,14,PRICE_TYPICAL,0)>CCILevel1) if (iCCI(NULL, NULL,14,PRICE_TYPICAL,0) Trailing_Stop*Point && OrderMagicNumber()==MagicNumber && OrderStopLoss()< Bid - Trailing_Stop*Point ) { OrderModify(OrderTicket(),OrderOpenPrice(),Bid - Trailing_Stop*Point,OrderTakeProfit(),0,Blue); Sleep(10000); } if(OrderType()==OP_SELL && OrderOpenPrice()-Ask > Trailing_Stop*Point && OrderMagicNumber()==MagicNumber && OrderStopLoss()> Ask + Trailing_Stop*Point) { OrderModify(OrderTicket(),OrderOpenPrice(),Bid + Trailing_Stop*Point,OrderTakeProfit(),0,Blue); Sleep(10000); } return(0); }