pending delete code (help) - page 2

 
asta:

suppose after one hour I make a another order sell automatically I need a another stop loss in my case that s mean I need a another buy stop

in this point I have 2 sell orders and 2 buy stop pending orders

There is no point doing that.

Either the new sell stop is below the current thus the old one will trigger first. Don't create the second pair.

Or the new one will be above the old one. Delete the original pair.

Actually there is no point in using stops and limit orders at all with an EA. Human can't watch the screen 24/5, an EA can. Simply wait for the market to reach your sell level and open one.

Reason: