how do you monitor pending orders?

 

Hallo experts,

few days ago my EA sent a pending (buy stop) order for EURUSD, see the blue line in the attached account history, that should have been triggered one or two periods later, the chart shows the price going up quite a bit immediately after, but it never was executed

Neither seems it to have been canceled, the comment column was not changed by the broker to "canceled" as it happens (at least when I explicitly cancel orders)

My program checks available margin and stoplevel before entering a trade, also checks for errors coming from the broker whenever sending an order/command. None of these was a problem and the entry in the account history is in fact there to show that the order was taken

The question is: what could have happened such that the pending order was not triggered and how would I monitor/remedy that from code? (if that's possible)

thanks in advance,

Luigi

Files:
disappeared.PNG  124 kb
 

I don't know why Oanda do it, but when a pending order is triggered, they give it a new ticket number.

This messes up a lot of EAs that check whether a pending order has triggered by ticket number.

Check open orders and see if there is a buy ticket open for the same symbol and lot size.

 
luigisimoncini: few days ago my EA sent a pending (buy stop) order for EURUSD, see the blue line in the attached account history, that should have been triggered one or two periods later, the chart shows the price going up quite a bit immediately after, but it never was executed
I have seen this also on Oanda also. Restarting the terminal removes the bug.
 
William Roeder:
I have seen this also on Oanda also. Restarting the terminal removes the bug.

wow, thats's frightening! But very good input, will start debugging/forward testing my EA on two brokers at the same time, Thank you!

Reason: