Expayeray time
Expayeray time
20 Oct 2021, 00:22
Please , is the right way to express the expire time of takeprofit before the order is closed or deleted.
var datetime = DateTime.Now.AddHours(5);
PlaceLimitOrder(TradeType, Symbol, Volume, targetPrice, MyLabel, StopLossPips, TakeProfitPips, datetime )
{close pending()} or deletepending().
Replies
emmasystems
20 Oct 2021, 12:39
RE:
amusleh said:
Hi,
There is no relation between take profit and pending orders expiry time.
To set expiry time you should use Server.Time not your system time (DateTime.Now).
You can find samples for placing/modifying/canceling pending orders here: cAlgo API Reference - PendingOrder Interface (ctrader.com)
(This is in reference to pending order exipiration Time in which trade is deleted ,
@emmasystems
amusleh
21 Oct 2021, 09:38
RE: RE:
emmasystems said:
amusleh said:
Hi,
There is no relation between take profit and pending orders expiry time.
To set expiry time you should use Server.Time not your system time (DateTime.Now).
You can find samples for placing/modifying/canceling pending orders here: cAlgo API Reference - PendingOrder Interface (ctrader.com)
(This is in reference to pending order exipiration Time in which trade is deleted ,
Hi,
Sorry, but I don't understand what you are looking for? test the cBot examples on API references.
@amusleh
amusleh
20 Oct 2021, 07:41
Hi,
There is no relation between take profit and pending orders expiry time.
To set expiry time you should use Server.Time not your system time (DateTime.Now).
You can find samples for placing/modifying/canceling pending orders here: cAlgo API Reference - PendingOrder Interface (ctrader.com)
@amusleh