As in your other topic, is there a point here?
for(int i=OrdersHistoryTotal();i >= 0;i--){ OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if (OrderMagicNumber() == magic) break;You are assuming that history is orders, it isn't. Go through all orders and remember the last closed one and it's profit (=OrderProfit()+OrderSwap()+OrderCommission())
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register