just try to detect cancelled orders. For this, i use
All this in an expert advisor. Detection of cancellation is done on every trade.
Now the problem: in OnInit, from is initialized with TimeCurrent.
When i place an order and cancel it, on trade reports always 0 == HistoryOrdersTotal();.
But the order was placed and cancelled AFTER advisor was attached.
When i call
So from == 0, i get a bunch of unwanted orders and last one is that cancellation i am looking for.
So from seems not to work if > 0.
Anyone can help ?thank you
Solved: Is hould have used TimeTradeServer() instead of CurrentTime().