What's wrong with this?, total = CountTrades(); if (total == 0) flag = TRUE; for (cnt = OrdersTotal() - 1; cnt >= 0; cnt--) { OrderSelect(0, SELECT_BY_POS); if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue; if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) { if (OrderType() == OP_BUY) { LongTrade = TRUE; ShortTrade = FALSE; break; I get the message "return value of 'OrderSelect' should be checked". Thanks, Ed
- Expert Stopped any one can please check this code
- programming question
- Trouble with Trade Functions
Ed1210: What's wrong with this?,total = CountTrades();if (total == 0) flag = TRUE;for (cnt = OrdersTotal() - 1; cnt >= 0; cnt--) {OrderSelect(0, SELECT_BY_POS);if (OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue;if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {if (OrderType() == OP_BUY) {LongTrade = TRUE;ShortTrade = FALSE;break;I get the message "return value of 'OrderSelect' should be checked".Thanks, Ed |
|
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