Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical Market order stuck at initialized, incorrectly submitted as live trade

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

    Historical Market order stuck at initialized, incorrectly submitted as live trade

    Hi,
    got a head scratcher. A strategy is only using Market orders to enter, and makes an entry in the NinjaScript Output window whenever it does that. You can see in the screenshot such an event at 5/27/2022 3:49PM

    Click image for larger version

Name:	log extract.png
Views:	205
Size:	212.2 KB
ID:	1203829

    The problem is that the order never fills, which of course it should immediately do since it is a market order.
    However, when the strategy becomes realtime (which on this occasion is after the weekend on the 29th, the order immediately submits as a live order to the account!

    from the Trace file:


    2022-05-29 14:49:46:781 (APEX EVAL) NinjaScript.StrategyBase.OnRestartTimerTick: strategy='jbBolliTTMStrategy/173137542'
    2022-05-29 14:51:38:522 (APEX EVAL) Cbi.Account.CreateOrder: orderId='80d82805eff843cb9a1b0500be96a11c' account='SimAccount2' name='LE' orderState=Initialized instrument='MNQ 06-22' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=6 tif=Day oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=110082 time='2022-05-29 14:51:38' gtd='2099-12-01' statementDate='2022-05-29' id=-1 comment=''

    This is strange behaviour, and I cannot see a reason for it. Your assistance will be appreciated.
    Thanks;
    saltminer


    #2
    Hello saltminer,

    Thank you for your reply.

    Was the strategy running in real time up to this point?

    What bar type and interval was the strategy running on? Are there any secondary series in use in the strategy?

    Is this the only occurrence of this behavior?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Hi Kate,
      the strategy, when started, submits a historical market order as a live realtime order (which is incorrect as it should have historically filled and no longer be relevant).
      This has happened on numerous occasions. It is running on a Kagi chart.
      saltminer

      Comment


        #4
        Hello saltminer,

        Thank you for your reply.

        To clarify, when exactly was the strategy started? Was it while the market was closed? Or was it started on the 29th?

        If you can supply a video of what occurs when the strategy is started (submitting an order immediately on real time data) that would be helpful in understanding the behavior that's occurring.

        Thanks in advance; I look forward to assisting you further.

        Comment


          #5
          Hi Kate,
          the strategy is enabled during a session. It calculate all historical bars, from past days, as it is supposed to, doingthe simulated trades on those historical bars. Nothing new here. BUT, a historical market order to enter doesn't fill on the historical bar it is submitted on - it gets stuck - and only fills as a realtime live order at the broker as soon as State == State.Realtime. This is not correct.

          saltminer

          Comment


            #6
            Hello saltminer,

            Thank you for your reply.

            I'm wondering if this may be related to a position reporting issue with Rithmic connections. What version of NinjaTrader are you using? This can be found under Help > About.

            Thanks in advance; I look forward to assisting you further.

            Comment


              #7
              Hi,
              yes, the user is using Rithmic. Latest version of NT8.

              saltminer

              Comment


                #8
                Hello saltminer,

                Thank you for your reply.

                Can you confirm whether they are on version 8.0.26.0 or 8.0.26.1? If they are on the prior version, please have them update and test as there were some changes in this new version to help with Rithmic position updates.

                To update NinjaTrader, please follow the steps below:
                • First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
                • Click on the link: https://ninjatrader.com/PlatformDirect
                • Enter your license key and press Submit
                • Select 'Download'
                • Critical: Before running the installer, ensure NinjaTrader is closed.
                Thanks in advance; I look forward to assisting you further.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                50 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                126 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                69 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                42 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                46 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X