Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Instruments in (OnOrderUpdate & OnExecutionUpdate ).

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

    Multi-Instruments in (OnOrderUpdate & OnExecutionUpdate ).

    Good morning
    I use Multi-Instruments​ in my strategy and it is recommended to use (OnOrderUpdate & OnExecutionUpdate ).
    I tried to use "BarsInProgress" but I see that it is not correct. Please how to do it​ ?

    M.GHORBEL
    Attached Files

    #2
    Hello M.GHORBEL,

    Thanks for your post.

    The warning message in the screenshot you shared could be found on the OnOrderUpdate() and OnExecutionUpdate() help guide documentation linked below.

    From the OnOrderUpdate() help guide:

    "Rithmic and Interactive Brokers Users: When using a NinjaScript strategy it is best practice to only work with passed by value data from OnExecution. Instances of multiple fills at the same time for the same instrument might result in an incorrect OnPositionUpdate, as sequence of events are not guaranteed due to provider API design. For an example on protecting positions with this approach, see OnExecutionUpdate()​"

    From the OnExecutionUpdate() help guide:

    "Rithmic and Interactive Brokers Users: When using a NinjaScript strategy it is best practice to only work with passed by value data from OnExecution. Instances of multiple fills at the same time for the same instrument might result in an incorrect OnPositionUpdate, as sequence of events are not guaranteed due to provider API design."

    OnOrderUpdate(): https://ninjatrader.com/support/help...rderupdate.htm
    OnExecutionUpdate(): https://ninjatrader.com/support/help...tionupdate.htm

    You could view the second section of sample code in the OnExecutionUpdate() help guide page for an example of protecting positions when using Interactive Brokers.

    This forum thread contains RithmicIBFriendlyExample samples that you could view also which demonstrate how to program a NinjaScript strategy to use with Interactive Brokers: https://forum.ninjatrader.com/forum/...72#post1206372
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Working...
    X