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