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 Marklhc1988, 04-19-2023, 11:11 AM
      12 responses
      569 views
      1 like
      Last Post victor68133  
      Started by nicthe, Yesterday, 02:58 PM
      1 response
      9 views
      0 likes
      Last Post nicthe
      by nicthe
       
      Started by percy3687, 05-17-2024, 12:28 AM
      3 responses
      30 views
      0 likes
      Last Post percy3687  
      Started by SilverSurfer1, Yesterday, 01:33 PM
      0 responses
      12 views
      0 likes
      Last Post SilverSurfer1  
      Started by ETFVoyageur, Yesterday, 10:27 AM
      2 responses
      19 views
      0 likes
      Last Post ETFVoyageur  
      Working...
      X