I am currently working on my EA and ran into some trouble. Part of my script is below. My EA keeps producing a buy order when it is within the price range I have specified below, despite me putting
a sleep function there for a long time. Is there an alternative way that is more efficient or works cause mine doesn't.
I have a five digit broker.
if(Bid > PriceBid - 15*Point && Bid < PriceBid + 15*Point)
int ticket ;
ticket = OrderSend (OrderSymbol(), OP_BUYSTOP, Lots, Buystop, 15, StopLoss, TakeProfit ,NULL);