• 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 buick, Today, 09:37 PM
    0 responses
    4 views
    0 likes
    Last Post buick
    by buick
     
    Started by Hagar, Today, 07:12 PM
    0 responses
    6 views
    0 likes
    Last Post Hagar
    by Hagar
     
    Started by jtrading82, Today, 01:55 PM
    4 responses
    28 views
    0 likes
    Last Post bppayne
    by bppayne
     
    Started by Hagar, Today, 06:52 PM
    0 responses
    4 views
    0 likes
    Last Post Hagar
    by Hagar
     
    Started by vivekniwas, Today, 04:56 PM
    0 responses
    7 views
    0 likes
    Last Post vivekniwas  
    Working...
    X