• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Transitioning of a historical order to a live order

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

    Transitioning of a historical order to a live order

    Hello,

    I am facing the following problem:

    1. The strategy is developed in Unmanaged approach and uses pending entry and exit orders
    2. While running through Historical Fill process, the strategy sets pending orders and manages them according to internal rules
    3. But then even before "On starting a real-time strategy" happens, the strategy crashes sometimes with "has been disabled because it attempted to modify a historical order that has transitioned to a live order" error.

    I am performing the transitioning of historical orders to real-time orders as stated in Help Guide:

    "...
    else if (State == State.Realtime){
    ...
    if (order != null) order = GetRealtimeOrder(order);
    ...
    }
    ..."

    However, this block should not even run since the strategy crashes in the middle of Historical Fill process without even reaching "On starting a real-time strategy" point.

    Is there anything I am missing with the transitioning process?

    Best regards,
    Alexei

    #2
    Hello akuntysh,

    Thank you for your note.

    This error is received when an Order object is assigned historically and then gets modified with Realtime data when that live order has different ID's. In NinjaTrader 8, we will have to transition Order objects when the state reaches State.Realtime so their order ID's can be updated from backtest generated ID's to account generated ID's. The SampleOnOrderUpdate strategy demonstrates how this can be done.

    Transitioning order references from historical to live - https://ninjatrader.com/support/help...storicaltolive

    SampleOnOrderUpdate - https://ninjatrader.com/support/foru...ead.php?t=7499

    GetRealTimeOrder - https://ninjatrader.com/support/help...ltimeorder.htm

    Using OnOrderUpdate and OnExecutionUpdate - https://ninjatrader.com/support/help...and_onexec.htm

    Please let me know if I may be of further assistance.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Johnny Santiago, Today, 12:30 PM
    7 responses
    17 views
    0 likes
    Last Post Johnny Santiago  
    Started by ttodua, Today, 12:26 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by dastaan, 06-26-2020, 04:33 AM
    6 responses
    108 views
    0 likes
    Last Post NinjaTrader_Jim  
    Started by RumHam, Today, 12:14 PM
    0 responses
    8 views
    0 likes
    Last Post RumHam
    by RumHam
     
    Started by Lancer, Today, 12:12 PM
    2 responses
    13 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Working...
    X