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:


    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 Aviram Y, Today, 05:29 AM
      4 responses
      11 views
      0 likes
      Last Post Aviram Y  
      Started by algospoke, 04-17-2024, 06:40 PM
      3 responses
      26 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by bmartz, 03-12-2024, 06:12 AM
      3 responses
      30 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by gentlebenthebear, Today, 01:30 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by cls71, Today, 04:45 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X