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.
      Brandon H.NinjaTrader Customer Service

      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.
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by kujista, Today, 05:44 AM
          0 responses
          5 views
          0 likes
          Last Post kujista
          by kujista
           
          Started by ZenCortexCLICK, Today, 04:58 AM
          0 responses
          5 views
          0 likes
          Last Post ZenCortexCLICK  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          172 responses
          2,281 views
          0 likes
          Last Post sidlercom80  
          Started by Irukandji, Yesterday, 02:53 AM
          2 responses
          18 views
          0 likes
          Last Post Irukandji  
          Started by adeelshahzad, Today, 03:54 AM
          0 responses
          8 views
          0 likes
          Last Post adeelshahzad  
          Working...
          X