Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Erroneous execution of limit orders outside trading hours

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Erroneous execution of limit orders outside trading hours

    Hello! I was previously having problems executing a strategy. It seems that the problem is not with the strategy but with the simulation in SIM accounts.

    I was able to replicate the error by entering a long trade manually just before EOD, in a sim account on MNQ, with very tight profit target and stoploss. As you can see the order is executed off price and when the market is closed 2/4/2025 5:52 EST (closed from 5 to 6pm).

    This is the original post:​


    Log:
    2025-02-04 16:58:06:917|1|32|Chart Trader submitting order with strategy '40x40 ticks - 1' (Ticks)
    2025-02-04 16:58:06:964|1|32|Order='c2463eaa8ec2484ca88f0b114 90e2c70/SimAccount3' Name='Entry' New state='Submitted' Instrument='MNQ 03-25' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-02-04 16:58:07:072|1|32|Order='c2463eaa8ec2484ca88f0b114 90e2c70/SimAccount3' Name='Entry' New state='Accepted' Instrument='MNQ 03-25' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-02-04 16:58:07:072|1|32|Order='c2463eaa8ec2484ca88f0b114 90e2c70/SimAccount3' Name='Entry' New state='Working' Instrument='MNQ 03-25' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-02-04 16:58:07:110|1|32|Order='c2463eaa8ec2484ca88f0b114 90e2c70/SimAccount3' Name='Entry' New state='Filled' Instrument='MNQ 03-25' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=1 Fill price=21581.5 Error='No error' Native error=''
    2025-02-04 16:58:07:111|1|8|Execution='c8e1f7fbdae34e9e9c441e 5ea1011870' Instrument='MNQ 03-25' Account='SimAccount3' Exchange=Default Price=21581.5 Quantity=1 Market position=Long Operation=Operation_Add Order='c2463eaa8ec2484ca88f0b11490e2c70' Time='2/4/2025 4:58 PM'
    2025-02-04 16:58:07:111|1|64|Instrument='MNQ 03-25' Account='SimAccount3' Average price=21581.5 Quantity=1 Market position=Long Operation=Operation_Add
    2025-02-04 16:58:07:137|1|32|Order='d8b13bd2f146443395ba62e7a 503842e/SimAccount3' Name='Stop1' New state='Submitted' Instrument='MNQ 03-25' Action='Sell' Limit price=0 Stop price=21571.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='2a44ba78be5248c4acffa96fe6fafca5' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-02-04 16:58:07:156|1|32|Order='08891b9588344d62b669a534d 6af1ea1/SimAccount3' Name='Target1' New state='Submitted' Instrument='MNQ 03-25' Action='Sell' Limit price=21591.5 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='2a44ba78be5248c4acffa96fe6fafca5' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-02-04 16:58:07:261|1|32|Order='d8b13bd2f146443395ba62e7a 503842e/SimAccount3' Name='Stop1' New state='Accepted' Instrument='MNQ 03-25' Action='Sell' Limit price=0 Stop price=21571.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='2a44ba78be5248c4acffa96fe6fafca5' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-02-04 16:58:07:273|1|32|Order='08891b9588344d62b669a534d 6af1ea1/SimAccount3' Name='Target1' New state='Accepted' Instrument='MNQ 03-25' Action='Sell' Limit price=21591.5 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='2a44ba78be5248c4acffa96fe6fafca5' Filled=0 Fill price=0 Error='No error' Native error=''
    2025-02-04 16:58:07:275|1|32|Order='08891b9588344d62b669a534d 6af1ea1/SimAccount3' Name='Target1' New state='Working' Instrument='MNQ 03-25' Action='Sell' Limit price=21591.5 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='2a44ba78be5248c4acffa96fe6fafca5' Filled=0 Fill price=0 Error='No error' Native error=''
    Attached Files

    #2
    Hello rocker84,

    Thank you for posting.

    This appears to be due to price of the Bid/Ask once the market was closed and Profit Target price. The Simulation accounts uses NinjaTrader's simulated order fill engine, which does not always reflect real-market execution. Since the Profit Target is a Limit order this would execute at your specified price or better, which in this case was better.

    Let me know if I may be of further assistance.
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChristopherJ View Post
      Hello rocker84,

      Thank you for posting.

      This appears to be due to price of the Bid/Ask once the market was closed and Profit Target price. The Simulation accounts uses NinjaTrader's simulated order fill engine, which does not always reflect real-market execution. Since the Profit Target is a Limit order this would execute at your specified price or better, which in this case was better.

      Let me know if I may be of further assistance.
      I think it is a clear error in the execution logic. It can never be executed if the market is closed.

      As you can see in the screenshot, NT is reporting an ASK of 22212, and the last price at 22203. Even if you had a limit order below 22212, it is not possible to get a fill at that level if there is no market order that crosses the limit. For some reason NT is simulating a market order (which could not exist in reality) when the market is closed.

      Could we at least request an improvement in this regard?
      Attached Files
      Last edited by rocker84; 02-16-2025, 04:12 PM.

      Comment


        #4
        You may use the link below to submit this request to our product team for consideration to implement in future releases:

        NinjaTrader Feature Request Form

        You can use this link for future feedback or features you'd like to see as well.​
        Christopher J.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by TrippTraders, Yesterday, 07:14 PM
        1 response
        12 views
        0 likes
        Last Post brucerobinson  
        Started by decosenty, Yesterday, 11:33 PM
        0 responses
        9 views
        0 likes
        Last Post decosenty  
        Started by RicharBarrio, Yesterday, 11:26 PM
        0 responses
        7 views
        0 likes
        Last Post RicharBarrio  
        Started by paulo_br, 09-13-2024, 08:41 AM
        8 responses
        1,155 views
        0 likes
        Last Post AppleID25  
        Started by mno_om, Yesterday, 08:44 PM
        0 responses
        11 views
        0 likes
        Last Post mno_om
        by mno_om
         
        Working...
        X