The resource loading... loading...

Order management, can you add an order time in the order structure?

Author: xuanxuan, Created: 2016-05-02 18:39:20, Updated:

Order Order structure, returned by the GetOrder function {pos (192,210) } Id: Unique identifier of the transaction Price: The price you ordered Amount: the quantity ordered DealAmount: the number of transactions Status: Order status, order status in the reference constant Type: Order type, order type in the reference constant I'm not sure. In this structure, one more time is added. It is important that the timing of each hanging is effective in situations where many hangings are not done.

For example: To delete a listing that has been suspended for more than a certain amount of time: function DelPendingOrderstime ((time) { is used while (true) { var orders = GetRecords (); if (!orders) { Sleep ((2000)); Continue; I'm not sure. var counter = 0; for (var i = 0; i < orders.length; i++) { if (new Date))) getTime))) -orders (i).Time >= time) { exchange.CancelOrder ((orders[i].Id)); counter++; Sleep ((2000)); I'm not sure. I'm not sure. if (counter === 0) { I'm going to break. I'm not sure. I'm not sure. I'm not sure. This is possible if the ORDER structure has the time attribute ⋅ orders.time. In the mql4 language, the drop-down function has a specific parameter for the order expiration, which is used to specify the order expiration date. I hope that the boss can include this time in the order structure.


More

ZeroOK, I'll add it, so that's how it works before I update. Create a global dictionary that matches the orderId to the time of the next order.

Inventors quantify - small dreams#### Returns an object with a function wrapper. function createNewOrder ((order) { var opTime = new Date (); and return { Id: order.Id, // unique identifier of the order Price: order.Price, // price to order Amount: order.Amount, // the number of orders DealAmount: order.DealAmount, // the number of transactions Status: order.Status, // order status, order status in the reference constant Type time: opTime // Newly added attribute, to call the function time, the function uses the GetOrder (ID) function to get the order structure after calling the new wrapper time I'm not sure. I'm not sure. function main (()) { var id = exchange.Buy ((-1,1)); var order = exchange.GetOrder (id); var newOrder = createNewOrder ((order); Log (("the newOrder `s time:",newOrder.time); Log (("the newOrder is:",newOrder); Log (("ORDER_STATE_PENDING:",ORDER_STATE_PENDING);//ORDER_STATE_PENDING: is not completed Log (("ORDER_STATE_CLOSED:",ORDER_STATE_CLOSED);//ORDER_STATE_CLOSED: has been closed Log (("ORDER_STATE_CANCELED", "ORDER_STATE_CANCELED"); // ORDER_STATE_CANCELED This is a list of all the different ways ORDER_STATE_CANCELED is credited in the database. I'm not sure. This is a list of all the different ways Dn-filebox.qbox.me/0a03aebe3da604456adfc4f97dea02d5f8a74309.png is credited in the database. Do you think that's possible? I'm trying too.

xuanxuanWell, I can't play with the big words, I just have to wait for the old ones to update.