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

OnOrderUpdate

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

    OnOrderUpdate

    How does processing an OnOrderUpdate event, influence chart signal display?

    e.g.
    Code:
    if (order.Name == "myEntryName")
    {
                    myEntryOrder = order;
    
                    if(order.OrderState == OrderState.Filled)
                    {
                        // removes chart signal
                        myEntryOrder = null;
                    }  
    }

    so if myEntryOrder is set to an order, it should only be set to null if order.OrderState == OrderState.Cancelled && order.Filled == 0
    else no chart signal?
    Last edited by dibDab; 11-28-2022, 05:08 AM.

    #2
    Hello dibDab,

    Thank you for your note.

    What are you referring to when you say "chart signal display?" Do you mean the executions that are plotted visually on a chart? Working with order objects in OnOrderUpdate by assigning the order to a variable myEntryOrder and then setting that variable to null when an order is filled or cancelled does not have an effect on what is displayed on the chart visually.

    The SampleOnOrderUpdate strategy also works with assigning order objects in OnOrderUpdate for entryOrder, stopOrder, and targetOrder. You could import this sample to your installation of NinjaTrader and test it out in simulation to observe the behavior for the different orders used and see if this helps to clarify your understanding of how OnOrderUpdate works. The reference sample may be found here:
    https://ninjatrader.com/support/help...and_onexec.htm

    If this is not what you are looking for and you have more questions about chart signals, please provide more details regarding what you are describing so I may better assist you.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      yes you're right, just tested.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by davydhnz, Today, 03:10 AM
      0 responses
      1 view
      0 likes
      Last Post davydhnz  
      Started by kaywai, Today, 03:07 AM
      0 responses
      3 views
      0 likes
      Last Post kaywai
      by kaywai
       
      Started by EmleFleische, Today, 02:43 AM
      0 responses
      9 views
      0 likes
      Last Post EmleFleische  
      Started by cvvdumpsites, Today, 02:09 AM
      0 responses
      11 views
      0 likes
      Last Post cvvdumpsites  
      Started by Cryptontrader, Today, 02:08 AM
      0 responses
      10 views
      0 likes
      Last Post Cryptontrader  
      Working...
      X