Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

SuperDomColumn doesn't pick up the OnOrderUpdate() until after Reload Ninjascript

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

    SuperDomColumn doesn't pick up the OnOrderUpdate() until after Reload Ninjascript

    So I wanted to build a SuperDOM column that does something on a fill of an order.

    I noticed that the OnOrderUpdate is not being called when added to the SuperDOM until you hit "Reload Ninjascript" or change the instrument selection on the DOM.

    Step to reproduce (on latest NT v8.0.25):
    • Add a simple Custom superDOM column like below :
    public class MyCustomSuperDomColumn : SuperDomColumn
    {
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Enter the description for your new custom SuperDOM column here.";
    Name = "MyCustomSuperDomColumn";
    }
    else if (State == State.Configure)
    {
    }
    else if (State == State.DataLoaded)
    {
    }
    }
    protected override void OnOrderUpdate(Cbi.OrderEventArgs orderUpdate)
    {
    Print("Order update");
    }
    protected override void OnRender(DrawingContext dc, double renderWidth)
    {
    }

    }
    • Open a SuperDOM, make sure an account is selected
    • Add column
    • Submit an order on eg another chart (active on same account eg using Chart Trader)
    • Nothing happens, the Print statement is not executed, so no call to OnOrderUpdate()
    • Select "Reload Ninjascript" on the DOM
    • Submit another order or close the existing one -> Print statement works, so OnOrderUpdate() is called

    Can this be considered a bug? Would love it if this gets fixed

    thank you,
    Joost

    #2
    Hello joostb,

    I tried this on my end and see the override working as expected.

    The steps I had used would be:
    Open NS editor and create sample script, F5 compile
    Open the dom
    Apply the column
    Open a chart
    Place a trade.
    Print appears

    I also tried having the chart open first and then opening the dom and applying the column, that worked as well.

    If you made any changes and compiled from the NinjaScript editor then you will need to close the superdom and re open it/re apply the column or also use reload NinjaScript in the DOM to reload the script post compile.

    If you are still having trouble I would suggest to try this on either the Playback connection or Simulated data feed connection. That is so that we can use the same connection as a test and also will help to let you know if the connection is at all related.

    Please let me know if I may be of additional assistance.


    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by moneyexe, Today, 01:38 AM
    3 responses
    17 views
    0 likes
    Last Post bltdavid  
    Started by coviraca, Today, 03:11 AM
    0 responses
    7 views
    0 likes
    Last Post coviraca  
    Started by coviraca, Today, 03:10 AM
    0 responses
    7 views
    0 likes
    Last Post coviraca  
    Started by EmmaaPerkin, Today, 12:29 AM
    0 responses
    7 views
    0 likes
    Last Post EmmaaPerkin  
    Started by advappetiteca, Today, 12:21 AM
    0 responses
    14 views
    0 likes
    Last Post advappetiteca  
    Working...
    X