Is there a fault in the EA's code or a broker issue? - page 2 12 New comment Daniel George 2019.04.07 17:41 #11 Icham Aidibe: It continues to place many orders ? Yes, sometimes 2. However, not very often and definitely not with every broker (I'm testing a few). Icham Aidibe 2019.04.07 18:15 #12 Daniel George: Yes, sometimes 2. However, not very often and definitely not with every broker (I'm testing a few).It shouldn't. Try to clean that also : void PlaceOrder() { while(IsTradeAllowed()==false) Sleep(100); RefreshRates(); TheOrder=OrderSend(Symbol(),OP_SELLSTOP,NormalizeLots(CalcLots),NormalizePrice(SellPendingLevel),int(Slippage*PipValue),0,0,TradeComment,MagicNumber,0); return; } to ... void PlaceOrder() { if(IsTradeAllowed()==true) { RefreshRates(); TheOrder=OrderSend(Symbol(),OP_SELLSTOP,NormalizeLots(CalcLots),NormalizePrice(SellPendingLevel),int(Slippage*PipValue),0,0,TradeComment,MagicNumber,0); } } Sleep() shouldn't be used unwisely. Daniel George 2019.04.09 12:11 #13 Icham Aidibe: It shouldn't. Try to clean that also : to ... Sleep() shouldn't be used unwisely.Thank you, I'll give it a try. Can you please explain why while(IsTradeAllowed()==false) Sleep(100); is not recommended here? I thought it is better to have it, as a filter to send the order only if trade is allowed. Daniel George 2021.02.25 20:11 #14 Can this be a broker issue? And if so, can someone explain how it is possible to happen? 12 New comment
It continues to place many orders ?
Yes, sometimes 2. However, not very often and definitely not with every broker (I'm testing a few).
Yes, sometimes 2. However, not very often and definitely not with every broker (I'm testing a few).
It shouldn't. Try to clean that also :
to ...
Sleep() shouldn't be used unwisely.
It shouldn't. Try to clean that also :
to ...
Sleep() shouldn't be used unwisely.
Thank you, I'll give it a try.
Can you please explain why
is not recommended here?
I thought it is better to have it, as a filter to send the order only if trade is allowed.