if ( OrderSymbol() != MY_SYMBOL ) { continue; }
hasayama:
Where does that get inserted into the code? Also, isn't != actually mean "not"????
Yes, if order symbol is not what you expect it to be, select next order.
Insert right after OrderSelect().
for(int pos = OrdersTotal()-1; pos >= 0 ; pos--) if ( OrderSelect(pos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == Magic.Number // my magic number && OrderSymbol() == Symbol() ){ // and period and symbol

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
}
---------------------------------------------------------------------------------------
For the above, how can I make this only close an order for a certain currency pair? Thank you forum! Daniel