Login Page - Create Account

Support Board


Date/Time: Wed, 30 Apr 2025 20:44:05 +0000



Post From: Stop-Loss Order Automatically Canceled After 12:00noon in Simulated Mode with Chart Replay

[2025-03-31 11:40:24]
User856649 - Posts: 9
Hello,

I am encountering an issue while testing my trading strategy using Simulated Mode with Chart Replay. Specifically, my stop-loss order consistently disappears at a certain point during the replay. Upon checking the logs, I found the following message:

"Order is expired based on Time in Force"

This happens every time after 12:00 noon. The stop-loss order gets cancelled automatically.

I initially discovered this issue through ACSIL, but later confirmed that it also occurs when placing orders manually via chart trading. I am using the default Time in Force setting when placing the stop-loss order. According to the official documentation, the default value is SCT_TIF_DAY:

"This member also sets the Time in Force for any Attached Orders used as well. If this is not specified, then the Time in Force will be SCT_TIF_DAY."

When I explicitly set the Time in Force to SCT_TIF_GOOD_TILL_CANCELED, the issue no longer occurs.

For reference, my chart time zone is set to New York.

Chart Session Start/End Time: 9:30 - 16:00

SC version: 2749

Could you please confirm if this is expected behaviour, or if there is a configuration I may have missed?

LOG:

ActivityType  DateTime  TransDateTime  Symbol  OrderActionSource  InternalOrderID  ServiceOrderID  OrderType  Quantity  BuySell  Price  Price2  OrderStatus  FillPrice  FilledQuantity  TradeAccount  OpenClose  ParentInternalOrderID  PositionQuantity  FillExecutionServiceID  HighDuringPosition  LowDuringPosition  Note  AccountBalance  ExchangeOrderID  ClientOrderID  TimeInForce  Username  IsAutomated
Orders  2025-03-20 11:54:42.375000  2025-03-20 11:54:42.375000  [Sim]NVDA-NQTV  Replay 10.00X: NVDA-NQTV[M] 600 Trades | User order entry | Last: 119.939995 | AOE=false | AOU=false  1923    Market  1  Sell      Order Sent      Sim1  Open              0.00      Day    N
Orders  2025-03-20 11:54:42.375001  2025-03-20 11:54:42.375000  [Sim]NVDA-NQTV  Simulated order accepted  1923  1923  Market  1  Sell      Open      Sim1  Open              0.00      Day    N
Orders  2025-03-20 11:54:42.375002  2025-03-20 11:54:42.375000  [Sim]NVDA-NQTV  Trade simulation fill. Bid: 119.95 Ask: 119.96 Last: 119.96  1923  1923  Market  1  Sell      Filled  119.95  1  Sim1  Open              0.00      Day    N
Fills  2025-03-20 11:54:42.375003  2025-03-20 11:54:42.375000  [Sim]NVDA-NQTV  Trade simulation fill. Bid: 119.95 Ask: 119.96 Last: 119.96  1923  1923  Market  1  Sell      Filled  119.95  1  Sim1  Open    -1  1923.1        0.00      Day    N
Orders  2025-03-20 11:55:33.192007  2025-03-20 11:55:33.192007  [Sim]NVDA-NQTV  Replay 10.00X: NVDA-NQTV[M] 600 Trades | User order entry | Last: 119.96999 | AOE=false | AOU=false  1924    Stop  1  Buy  120.20    Order Sent      Sim1  Close    -1          0.00      Day    N
Orders  2025-03-20 11:55:33.192008  2025-03-20 11:55:33.192007  [Sim]NVDA-NQTV  Simulated order accepted  1924  1924  Stop  1  Buy  120.20    Open      Sim1  Close    -1          0.00      Day    N
Orders  2025-03-20 12:00:00.010000  2025-03-20 12:00:00.010000  [Sim]NVDA-NQTV  Order is expired based on Time in Force  1924  1924  Stop  1  Buy  120.20    Pending Cancel      Sim1  Close    -1          0.00      Day    N
Orders  2025-03-20 12:00:00.010001  2025-03-20 12:00:00.010000  [Sim]NVDA-NQTV  Simulated order canceled  1924  1924  Stop  1  Buy  120.20    Canceled      Sim1  Close    -1          0.00      Day    N



Thank you.