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
string Last; for(int i = OrdersHistoryTotal() - 1; i >= 0; i--) { if(!OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) continue; if(OrderSymbol() != Symbol()) continue; if(OrderProfit() == 0) continue; // Skip pending order. The profit of Cancelled pending order is zero. if(OrderProfit() > 0) Last = "Profit"; if(OrderProfit() < 0) Last = "Loss"; break; } Print("Last Order is ",Last,", Symbol: ",OrderSymbol()," Profit / Loss: ",OrderProfit());