This coding was to eliminate only pending buy and sell stop orders. It unfortunately is deleting both the pending buy and sell stop orders, but also the orders that are active and in play. How can I change this to only eliminate the pending and not the active buy and sell stops that are in play? Your ideas will be greatly appreciated.
Dave 77, TGIF
For cnt=1 to TotalTrades
If mode>OP_SELL then
If (Minute>58)then // Delete pending Sell Stops.
If mode>OP_BUY then
If (Minute>58)then // Delete pending Buy Stops.