How to avoid duplicated orders? - page 2

 
        if ( DYN_XS + GAP*Point >= OrderOpenPrice() && OrderOpenPrice() >= DYN_XS - GAP*Point ) // if the order is found;
          break; // Terminate the loop, and
          EXE_LG = False; // Block sending any buy orders

change this into

        if ( DYN_XS + GAP*Point >= OrderOpenPrice() && OrderOpenPrice() >= DYN_XS - GAP*Point ) // if the order is found;
          {
           EXE_LG = False; // Block sending any buy orders 
           break; // Terminate the loop,
          }
        
Do this also for sell procedure
 
deVries:

change this into

Do this also for sell procedure

I did, but no response!

still repeats the orders

Also, I've changed my triggers EXE_LG & EXE_SH into global scope variables, and the same behavior.

I don't know where the problem.

It could be because of the limited range assigned by GAP parameter, I'll check it

 
OmegaFX:

I did, but no response!

still repeats the orders

Also, I've changed my triggers EXE_LG & EXE_SH into global scope variables, and the same behavior.

I don't know where the problem.

It could be because of the limited range assigned by GAP parameter, I'll check it


make GAP atleast 2 * size Slippage
Reason: