This code:
Code
...LifeTime=3;  if (tod()==1300) enterShort();..
will generate this log :
[5237: Fri 22-06-03 13:00] (1.07165)
[EUR/USD::S23753] Short 1@1.07165 x at 13:00:00

[5238: Fri 22-06-03 13:30] 11.16 -1.31 59/49 (1.07295)
[5239: Fri 22-06-03 14:00] 9.65 -2.82 59/49 (1.07445)
[5240: Fri 22-06-03 14:30] 11.04 -1.43 59/49 (1.07305)

[EUR/USD::S23753] Expired 1@1.07305: -1.44 at 15:00:00

[5241: Fri 22-06-03 15:00] 11.03 0 59/49 (1.07230)
..

Exit happens at 1430 at the closing price of 1.07305 of bar 5240.... Yet, TradeBarClose is 5241 for this trade.


Last edited by Zheka; 06/05/22 15:27.