Announcement

Collapse
No announcement yet.

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.

    Comment


      #3
      yes you're right, just tested.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by abelsheila, 05-14-2025, 07:38 PM
      2 responses
      33 views
      0 likes
      Last Post hglover945  
      Started by nailz420, 05-14-2025, 09:14 AM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Started by NinjaTrader_Brett, 05-12-2025, 03:19 PM
      0 responses
      352 views
      1 like
      Last Post NinjaTrader_Brett  
      Started by domjabs, 05-12-2025, 01:55 PM
      2 responses
      66 views
      0 likes
      Last Post domjabs
      by domjabs
       
      Started by Morning Cup Of Trades, 05-12-2025, 11:50 AM
      1 response
      87 views
      0 likes
      Last Post NinjaTrader_ChristopherJ  
      Working...
      X