How to test HISTORIC results?
You will need to loop down through the history pool from OrdersHistoryTotal()-1 to 0, checking the sign of OrderProfit() - and OrderCloseTime() if you need to.
If the account could possibly have manual orders etc, then you'll need to identify those placed by your EA using OrderSymbol(), OrderComment(), OrderMagicNumber() etc.
CB
If the account could possibly have manual orders etc, then you'll need to identify those placed by your EA using OrderSymbol(), OrderComment(), OrderMagicNumber() etc.
CB
How can I do that?
Using:
OrderSelect(0, SELECT_BY_POS, MODE_HISTORY)
doesn't seems to bring last close trade...
Thanks