/*[[ Name := AdaptTS Notes := eur/usd m15 Lots := 1 Stop Loss := 0 Take Profit := 70 Trailing Stop := 0 ]]*/ extern int Lots=1; extern double StopLos=0; extern int TakeProfit=70; extern int TrainingStop=0; extern int MiniForex=1; extern int Slippage=5; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //|------------------------------------------------------------------| int init() { return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } int start() { int Timer=600; //inteval between the modifications int PerTS=10; //period ATR for calculation TS/SL double Kts=7.5; //ATR for calculating the level TS/SL int risk=13; //% risk from available capital int lotsi=0; int i=0; double HD=0; double LD=0; int PrBuy=0; int cnt=0; int w,x,y,z; double p=Point(); bool found=false; int DolPunkt=5; if (Symbol()=="EURUSD") DolPunkt = 10; if (Symbol()=="GBPUSD") DolPunkt = 7; if(Bars<100) {Print("Bars less than 100"); return(0);} if(AccountFreeMargin()<100) {Print("We have no money"); return(0);} for(cnt=0;cnt((Ask+(StopLos*p))+(10*p)) || OrderStopLoss()==0) { //ModifyOrder(Ord(1,VAL_TICKET),Ord(1,VAL_OPENPRICE), Ask+(StopLos*p),0,Yellow); OrderModify(OrderTicket(),OrderOpenPrice(),Ask+(StopLos*p),OrderTakeProfit(),0,Red); return(0); } } return(0); } //start()