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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      59 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      133 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X