//#property show_inputs double RiskPercent = 0.50; //INCREASE OR DECREASE RISK HEAR, MUST BE IN 0.0 FORMAT //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { int SpreadPointss = MarketInfo(Symbol(),MODE_SPREAD); double GetBid = MarketInfo(Symbol(),MODE_BID); double SpreadPoints = (SpreadPointss*Point); double OnePoint = (1*Point); double Risk = RiskPercent / 100; double MyStopLoss = ( (High[1]+(SpreadPoints + OnePoint)) - (Low[1]- OnePoint) ) / Point; double GetTarget = ( (High[1]+(SpreadPoints + OnePoint)) - (Low[1]- OnePoint) ) ; double TargetLong = NormalizeDouble((High[1]+GetTarget),Digits);//testing Digits double Lots = NormalizeDouble( AccountBalance()*Risk/MyStopLoss/(MarketInfo(Symbol(), MODE_TICKVALUE)),2); double Allowable = (OnePoint*3); double EntryPrice; double BIDANDPOINTS = (GetBid +SpreadPoints+OnePoint); double HIGHANDPOINTS = (High[1]+SpreadPoints+OnePoint); if (BIDANDPOINTS > HIGHANDPOINTS-Allowable) { EntryPrice = BIDANDPOINTS+Allowable; } else { EntryPrice = HIGHANDPOINTS; } if(Lots > 0) OrderSend(Symbol(),OP_BUYSTOP, Lots, EntryPrice,3,(Low[1]-OnePoint), 0, "Let it Play out", 0, NULL, LimeGreen); return(0); } //+------------------------------------------------------------------+