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 TradeForge, Today, 02:09 AM
    1 response
    22 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by elirion, Today, 01:36 AM
    2 responses
    13 views
    0 likes
    Last Post elirion
    by elirion
     
    Started by DJ888, 04-16-2024, 06:09 PM
    5 responses
    14 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by samish18, Yesterday, 08:31 AM
    4 responses
    14 views
    0 likes
    Last Post elirion
    by elirion
     
    Started by funk10101, Yesterday, 09:43 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X