pb double order...

 

hello !

my EA seed several same orders (generated by onTick() ) although my first lines are :


if (PositionSelect(_SYMBOL)==true){
   Modify_Order();
}else{
   Send__Order();
}

 

i think it's a problem of waiting time on the queue server.

may i treat my first order in OntradeTransaction event?

an other solution ? 

best regards. 

 

are you talking about this?

https://www.mql5.com/en/forum/16492

My EA does a double entry
My EA does a double entry
  • www.mql5.com
01 EURUSD at market placed for execution in 331 ms.
 

yes.

thank you, i'm going to read this topic..

do you know how disable asynchronous mode?

best regards 

 
zartan:

yes.

thank you, i'm going to read this topic..

do you know how disable asynchronous mode?

best regards 

You can't and this is the problem. Synchronous mode is only partially synchronous. You have to deal with and use a workaround.
 
Can be this workaround some code in OnTradeTransaction, sleeping while the order is really confirmed (or failed)?
 
zartan:
Can be this workaround some code in OnTradeTransaction, sleeping while the order is really confirmed (or failed)?
It's a possibility.
 
Are there other  possibilities ,   please  :-) .
 
zartan:
Are there other  possibilities ,   please  :-) .
Yes, some are explain in the above mentioned thread. There are more, allow your imagination to find them.
 

ok, thank you both :

 ps :where can i find the smileys ? 

 
zartan:

ok, thank you both :

 ps :where can i find the smileys ? 

Smilies are only picture, you can save it and use it. See here.
 
Cool !  
Reason: