Foed,
You need to show your code to know exactly what happened ... There are many cases one can consider ...
Like, if the 2 orders are different or the same ?
In case if they are different, the biggest probability is that you need to direct the program flow after each OrderSend( )
to the beginning of the start( ) function using return(0); ... This is only a guess.
Foed,
You need to show your code to know exactly what happened ... There are many cases one can consider ...
Like, if the 2 orders are different or the same ?
In case if they are different, the biggest probability is that you need to direct the program flow after each OrderSend( )
to the beginning of the start( ) function using return(0); ... This is only a guess.
Thank you for your reaction.
My code is
{
int tiket=-1;
tiket=OrderSend(Symbol(),OP_BUYSTOP,in_volume,NormalizeDouble(in_price,Digits),0,0,0,"BUYSTOP",MagicNumber,0,clrBlue);
}
where in_price and in_volume are doubles.
Yes, it opens two ABSOLUTELLY SAME orders :/
Not always, but during stronger moves on instrument.Thank you for your reaction.
My code is
{
int tiket=-1;
tiket=OrderSend(Symbol(),OP_BUYSTOP,in_volume,NormalizeDouble(in_price,Digits),0,0,0,"BUYSTOP",MagicNumber,0,clrBlue);
}
where in_price and in_volume are doubles.
Yes, it opens two ABSOLUTELLY SAME orders :/
Not always, but during stronger moves on instrument.frantisek-fanda: Yes, it opens two ABSOLUTELLY SAME orders :/Not always, but during stronger moves on instrument.
| Same EA running on two charts. The if becomes a race condition. Restart the terminal and look at the log. |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have code like if(OrdersTotal()==0): orderSend(Symbol()... OP_BUYSTOP....)
Sometimes it happens that 2 positions are opened in same time. How is that even posible? Is it because new tick comes immediatelly after first one? I mean like OrderSend is just being send somewehere and in new tick OrdersTotal is yet equal 0?
Thank you