How i get a Pending order Submitted Time
Created at 26 May 2016, 20:25
How i get a Pending order Submitted Time
26 May 2016, 20:25
Dear,
how i get my pending order submitted time. In the Pending Order Object i can't fine submitted time.
Please help me. Thanks
Replies
fxwisdom1@gmail.com
30 May 2018, 13:32
RE:
tmc_ said:
I believe you can't. However, you can save the information into comment or expiration time.
DateTime expiration = Time.AddYears(1); string comment = Time.ToString(); TradeResult order = PlaceLimitOrder(TradeType.Buy, Symbol, 1000, 1, "", null, null, expiration, comment); if (order.IsSuccessful) { DateTime orderExpiration = (DateTime)order.PendingOrder.ExpirationTime; DateTime timeFromExpiration = orderExpiration.AddYears(-1); Print("From expiration: " + timeFromExpiration); DateTime timeFromComment = DateTime.Parse(order.PendingOrder.Comment); Print("From comment: " + timeFromComment); }Log:
26/05/2016 18:39:31.984 | cBot "New cBot" was started successfully for EURUSD, h1. 26/05/2016 18:39:32.015 | Placing Limit Order to Buy 1000 EURUSD (Price: 1.00000, ExpireTime: 26/05/2017 18:39:32) 26/05/2016 18:39:32.155 | → Placing Limit Order to Buy 1000 EURUSD (Price: 1.00000, ExpireTime: 26/05/2017 18:39:32) SUCCEEDED, PendingOrder OID18905301 26/05/2016 18:39:32.155 | From expiration: 26/05/2016 18:39:32 26/05/2016 18:39:32.155 | From comment: 26/05/2016 18:39:32 26/05/2016 18:39:32.187 | cBot "New cBot" was stopped for EURUSD, h1.
It's a nice solution but not so elegant. Anyhow, thank you
@fxwisdom1@gmail.com
Jiri
26 May 2016, 21:40
I believe you can't. However, you can save the information into comment or expiration time.
Log:
@Jiri