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.
    JesseNinjaTrader Customer Service

    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.


        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by judysamnt7, Today, 03:18 PM
        0 responses
        1 view
        0 likes
        Last Post judysamnt7  
        Started by AgriTrdr, Today, 10:35 AM
        4 responses
        25 views
        0 likes
        Last Post AgriTrdr  
        Started by kenz987, Today, 12:34 PM
        2 responses
        10 views
        0 likes
        Last Post kenz987
        by kenz987
         
        Started by ChrisR, Yesterday, 12:04 PM
        7 responses
        31 views
        0 likes
        Last Post ChrisR
        by ChrisR
         
        Started by markpk1, Today, 11:54 AM
        5 responses
        21 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X