I would like to change my order time type to valid until next 3 candles from good until the end of day:
T.BuyLimit(LotSize, (ask-(45*_Point)), MySymbol, 0, 0, ORDER_TIME_DAY, Comments);
I tried this, but it didn't work:
T.BuyLimit(LotSize, (ask-(45*_Point)), MySymbol, 0, 0, ORDER_TIME_SPECIFIED, 3, Comments);
Does anybody knows how to do it? Thanks!
You can add 3 candles time to your current candle time get your Custom Time for expiration.
datetime OrderTimeSpecified = iTime(NULL,0,0) + (3*PeriodSeconds());
Note that some brokers do not allow expiration time.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.