//+------------------------------------------------------------------+ //| Get Rich or Die Traying GBP.mq4 | //| Carlos Gomes | //| | //+------------------------------------------------------------------+ extern double TakeProfit = 100; extern double TakeProfit2 = 40; extern double Stoploss = 100; extern double Lots = 1.0; extern double TrailingStop = 30; extern double per=18; extern double per2=8; extern double chas=2; extern double totalt=1000; extern double mm=0; extern double risk=10; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { int cnt, ticket, total; if(Bars<100) { Print("bars less than 100"); return(0); } if(TakeProfit<0) { Print("TakeProfit less than 10"); return(0); // check TakeProfit } double Lotsi; if (mm!=0) { Lotsi=NormalizeDouble(AccountFreeMargin()*risk/100001,1); if (Lotsi<0.1) Lotsi=0.1; } else Lotsi=Lots; //if ((CurTime()-OrderOpenTime())<61) return(0); int up, down; up=0; down=0; for(cnt=1;cntClose[cnt]) up=up+1; for(cnt=1;cnt=TakeProfit2*Point) { OrderClose(OrderTicket(),OrderLots(),Bid,0,Violet); return(0); } if(TrailingStop>0) { if(Bid-OrderOpenPrice()>Point*TrailingStop) { if(OrderStopLoss()=TakeProfit2*Point) { OrderClose(OrderTicket(),OrderLots(),Ask,0,Violet); return(0); } if(TrailingStop>0) { if((OrderOpenPrice()-Ask)>(Point*TrailingStop)) { if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0)) { OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red); return(0); } } } } } } if (totaldown && (22+(chas)==Hour()|| 19+(chas)==Hour()) &&Minute()<5)// && j==1) { OrderSend(Symbol(),OP_BUY,Lotsi,Ask,0,Bid-Stoploss*Point,Ask+TakeProfit*Point,"jk_prof",16384,0,Green); return(0); } if(up