Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical order transition to live error

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

    Historical order transition to live error

    Hi,

    Today, the strategy I'm using gave me an error when IB which I am connected to makes its daily auto-restart. As far as I see, while I am in a position, when IB restarts, NT repeats the entry order and gives the error of transition to live from historical and strategy gets permanently disabled. Maybe there is a more fundamental coding error, I am not sure.

    I attach herein the logs. I also took a couple of notes and questions on it.

    I'd be appreciated if you can help me.

    Attached Files

    #2
    I restarted IB again to check it out while I have a position and orders. I didn't receive transition error but two existing orders (which are also accepted), one being for a new long entry and other being for closing current short order have been cancelled. These two orders aren't re-submitted.

    Attached Files

    Comment


      #3
      Hello cem-nt,

      Thanks for your post.

      When starting a strategy on real-time data, the starting behavior will renew any active historical orders and resubmit these orders to your live or simulation account. This process includes updating the historical/backtest generated order ID to the account generated order ID, and any associated OCO IDs. If you are tracking order objects, is critical that you update the order reference to ensure that it is now using the correct order details.

      See this section of the Advanced Order Handling help guide page for more information about transitioning order references from historical to live and sample code: https://ninjatrader.com/support/help...storicaltolive

      Let us know if we may assist further.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Connecting to both Kinetick and IB live data feed at the same time would solve this problem? During IB's connection lost, kinetick can feed the chart so there won't be any historical data, all live data. If yes, which settings should I do?

        Comment


          #5
          Hello cem-nt,

          Thanks for your note.

          No, connecting to both Kinetick and IB would not prevent this error from occurring.

          When a strategy is enabled, it processes historical data to determine trades that the strategy would have made on the data that is already on the PC/chart and to determine what position the strategy is in. (Strategy positions are separate from actual Account positions.)

          See these help guide pages.
          Strategy vs. Account Position — https://ninjatrader.com/support/help..._account_p.htm
          Start Behaviors — https://ninjatrader.com/support/help..._positions.htm

          As previously stated, ​​​​​​to resolve the error about the script attempting to modify a historical order that transitioned to live, you would need to modify the code of the NinjaScript strategy so that the strategy transitions order references from historical to live.

          When starting a strategy on real-time data, the starting behavior will renew any active historical orders and resubmit these orders to your live or simulation account. This process includes updating the historical/backtest generated order ID to the account generated order ID, and any associated OCO IDs. If you are tracking order objects, is critical that you update the order reference to ensure that it is now using the correct order details.

          See this section of the Advanced Order Handling help guide page for more information about transitioning order references from historical to live and sample code: https://ninjatrader.com/support/help...storicaltolive

          Let us know if we may assist further.
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          88 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          48 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          30 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          34 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          68 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X