Hi, When day-trading, pulling orders each evening and reinserting them again in the morning is time consuming.
Although I copy them into excel so that they can be pasted back into a new order ticket, this takes a while, particularly if there are a lot of orders.
In MT5 would it be possible to either:
1. Create an order, save it, delete it and reload it the next day?
or
2. Create and order, pause or freeze (so it is inactive) and then reactivate it the next day?
It would be interesting to hear if anyone has dealt with this problem or has ideas to how it might be overcome.
Thanks
Are you talking about pending orders ? If yes, it's relatively easy to program your point 1.
I don't think your point 2 is possible.
Are you talking about pending orders ? If yes, it's relatively easy to program your point 1.
I don't think your point 2 is possible.
Hi Angevoyageur,
Yes, I'm talking about pending orders such as a buy limit.
So to program point 1, would this be achieved with a script?
My understanding would be to create two scripts.
1. That saves all pending orders. (Then I could delete them manually in the Trade panel).
2. That reloads all saved pending orders.
Would that be possible? - If so I'll make a request in the jobs section.
Thanks
- 2012.06.19
- Anatoli Kazharski
- www.mql5.com
Hi Angevoyageur,
Yes, I'm talking about pending orders such as a buy limit.
So to program point 1, would this be achieved with a script?
My understanding would be to create two scripts.
1. That saves all pending orders. (Then I could delete them manually in the Trade panel).
2. That reloads all saved pending orders.
Would that be possible? - If so I'll make a request in the jobs section.
Thanks
Hi, When day-trading, pulling orders each evening and reinserting them again in the morning is time consuming.
Although I copy them into excel so that they can be pasted back into a new order ticket, this takes a while, particularly if there are a lot of orders.
In MT5 would it be possible to either:
1. Create an order, save it, delete it and reload it the next day?
or
2. Create and order, pause or freeze (so it is inactive) and then reactivate it the next day?
It would be interesting to hear if anyone has dealt with this problem or has ideas to how it might be overcome.
Thanks
I realize this was posted 10 years ago, but I wonder if you fond how to save your orders? I have the same problem and can't find how to do it.
// Saves pending orders and loads them into the terminal. #property script_show_inputs input bool inSave = true; // Save - true, Load - false #include <MT4Orders.mqh> // https://www.mql5.com/ru/code/16006 #define VIRTUAL_SNAPSHOT_REFRESHTIME 1000 #define VIRTUAL_SNAPSHOT_WITHOUT_HISTORY #include <fxsaber\Virtual\Virtual.mqh> // https://www.mql5.com/ru/code/22577 void OnStart() { if (inSave) // Save { VIRTUAL::Snapshot(VIRTUAL_SNAPSHOT_REFRESHTIME, -1, false, ""); VIRTUAL::Save(__FILE__); } else if (VIRTUAL::SelectByHandle(VIRTUAL::Create(__FILE__))) // Load for (uint i = OrdersTotal(); (bool)i--;) if (OrderSelect(i, SELECT_BY_POS) && (OrderType() > OP_SELL)) // Pending order { OrderPrint(); // If the order does not exist, send the order. if (_V(0, !OrderSelect(_V(1, OrderTicket()), SELECT_BY_TICKET, MODE_TRADES) || OrderCloseTime())) Print("OrderSend - " + (string)!!_V(0, OrderSendAsync(_V(1, OrderSymbol()), _V(1, OrderType()), _V(1, OrderLots()), _V(1, OrderOpenPrice()), 0, _V(1, OrderStopLoss()), _V(1, OrderTakeProfit()), _V(1, OrderComment()), _V(1, OrderMagicNumber()), _V(1, OrderExpiration())))); else Print("Order - exist."); } }
Saves pending orders and loads them into the terminal.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Although I copy them into excel so that they can be pasted back into a new order ticket, this takes a while, particularly if there are a lot of orders.
In MT5 would it be possible to either:
1. Create an order, save it, delete it and reload it the next day?
or
2. Create and order, pause or freeze (so it is inactive) and then reactivate it the next day?
It would be interesting to hear if anyone has dealt with this problem or has ideas to how it might be overcome.
Thanks