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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        63 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        139 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 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