Hi,
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);
Sleep (200000000);
}
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
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);
Sleep (200000000);
}