HELP WHO CAN !!! - page 3

 
PPC:

Would a base like this work? It always works 100% for me:

if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES)==true)
{
if(OrderSymbol()==Symbol())
{

...and so on...

}

}

So it doesn't change the point... same thing.
 
sllawa3, I also asked a question, please answer
 
Techno:

By the way, is this how it's supposed to be?


so yes... a market one appeared, delete the opposite pending one (one of the pending ones triggered...)
 
sllawa3:
it doesn't change the point... same thing


So put the selector inside:

if(OrdersTotal()> 0) {... SELECTOR with all the required stuff...}

 
PPC:


well put the selector inside:

if(OrdersTotal()>0) {... SELECTOR with all the required stuff ...}


I've already tried all the variants in any case if the selector doesn't start because there is no pose the value of the last variable will remain
 
oops... The code is wildly incorrect... The only advice here is to first determine which orders exist (in the same loop), and then separately close, modify, etc., with the existing orders.
 
Techno:
oops... The code is wildly incorrect... The only advice here is to first determine which orders exist (in one cycle), and then close, modify, etc., separately with the existing orders.

If it were correct, it would work correctly and there would be no topic...
 
sllawa3:

Yeah, I've already tried all the options

Well I don't know. If there are no open positions, then the construct if(OrdersTotal()>0) {......} will do nothing. Or do you mean that you have several positions open, with the last one closed, and the selector continues to detect it? - This has never happened to me.
 
PPC:

Well I don't know. If there are no open positions, then the construct if(OrdersTotal()>0) {......} will do nothing. Or do you mean that you have several positions open, with the last one closed, and the selector continues to detect it? - this has never happened to me.

it doesn't, it just doesn't start... it just leaves the last one open.
 
PPC:

Well, I don't know. If there are no open positions, then the construct if(OrdersTotal()>0) {......} will do nothing. Or do you mean that you have several positions open, with the last one closed, and the selector continues to detect it? - this has never happened to me.
What he means is that all operations on all orders are mixed up in one loop, and the result of one iteration depends significantly on the result of the other, and he can't understand why it all doesn't work.