|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Quote:
1- Go to: http://www.metatrader.info/node/158 2- Download the Close All purposes script. 3- Set the option parameter to close by the magic number. (Note: You have to set the magic_number variable) 4- Show me your smile! |
|
||||
|
u may can put something like this before your order
this isnt tested so i dont know if syntax is 100% for (int i=0; i<OrdersTotal(); i++) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic) { OrderClose(OrderTicket(), OrderLots(), Bid, 100, Red); } }}} for (int i=0; i<OrdersTotal(); i++) { if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) { if (OrderSymbol()==Symbol()) { if (OrderMagicNumber()==Magic) { OrderClose(OrderTicket(), OrderLots(), Bid, 100, Red); |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Close Open Trades EAs based on Equity | Tradinator | Expert Advisors - Metatrader 4 | 15 | 07-06-2008 10:46 AM |
| Magic | MiniMe | General Discussion | 51 | 06-18-2007 09:08 PM |
| Open/close trade on same bar's close? | WNW | Expert Advisors - Metatrader 4 | 2 | 03-29-2007 05:37 AM |