Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi instrument strategies enabled but stop working

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

    Multi instrument strategies enabled but stop working

    Hello,

    I'm running a strategy that includes 2 instruments (instA, instB) but only submits orders to the primary instrument (strategyA). I'm also running another strategy (strategyB) on the secondary instrument (instB) on a separate chart. Both strategies are running on the same account (currently testing on Sim101).

    If both strategies trigger then the code in OnBarUpdate stops working even though the strategies are enabled and there are no errors in the log. In the Strategies tab, the Sync value is True but there is a red flag next to it on both strategies. The code is supposed to move the stop loss (SetStopLoss() function). The code works well when only one strategy triggers.

    Any thoughts?


    #2
    Hello shtrader,

    As a starting point I would suggest to disable one of the strategies so you are only running one on the instrument and account and see if that works. Strategies do not know what other strategies are doing so running two at the same time can certainly cause conflicts or cause the strategy to not know the correct position.

    Comment


      #3
      Hi Jesse,

      The strategy works well when the other is disabled. The problems start when both strategies trigger at the close of the same bar. Please note, each strategy submits orders to a different instrument but they both load the data of the other instrument as a secondary instrument.

      I'd appreciate your help with this as I need to run both strategies in parallel.

      Thanks,
      Roni

      Comment


        #4
        Hello shtrader,

        If the strategies are not trading the same instrument, that would be fine. If you have a specific situation where you know it stops working, that would be a good situation to use prints in the strategy to get a better idea of what's happening in its logic when that event happens.


        Comment

        Latest Posts

        Collapse

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