Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Limiting only 2 trades to be run at the same time while running multiple strategies?

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

    Limiting only 2 trades to be run at the same time while running multiple strategies?

    Is there a way to limit only 2 trades to be run at the same time while running multiple strategies?

    #2
    Hello trgui7883,

    Multiple strategies won't know what the other strategies are doing. To do this you would generally make 1 strategy that combines all the logic you need so that 1 strategy can observe how many orders it had placed.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      Do you have any instructions on how to build a strategy that combines all the logic you need so that 1 strategy can observe how many orders it had placed?

      Comment


        #4
        Hello trgui7883,

        You would just add whatever conditions you had used in each of the individual strategies into a single strategy. If you made multiple strategies using the strategy builder you could use those as reference and make a new strategy that has those conditions in it.

        A single strategy will always know what orders it placed and what position it is in. When you run more than one strategy on the same instrument they won't know what the other strategy is doing so they can quickly become out of sync and place erroneous trades.

        Once you have a single strategy you can limit to two trades in a single direction by setting the entries per direction setting to 2.


        JesseNinjaTrader Customer Service

        Comment


          #5
          Great answer, Jesse. We have multiple strategies that we are combining into a single strategy to get a better sense of the stats of the whole vs the sum of the parts in backtests. We have the opposite problem in that each strategy performs better with a different "entries per direction" setting so I'm working on managing that internally vs using the Ninja-provided hook. From your comment, it sounds like that is the right approach.

          trgui, the way we approached the combined strategy is to have an object for each sub-strategy to store settings/state data along with separate signal/trade processing functions as needed. In spots where we can share functions/settings across all strategies, we do so.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Karado58, 11-26-2012, 02:57 PM
          8 responses
          14,825 views
          0 likes
          Last Post Option Whisperer  
          Started by Option Whisperer, Today, 09:05 AM
          0 responses
          1 view
          0 likes
          Last Post Option Whisperer  
          Started by cre8able, Yesterday, 01:16 PM
          3 responses
          11 views
          0 likes
          Last Post cre8able  
          Started by Harry, 05-02-2018, 01:54 PM
          10 responses
          3,203 views
          0 likes
          Last Post tharton3  
          Started by ChartTourist, Today, 08:22 AM
          0 responses
          6 views
          0 likes
          Last Post ChartTourist  
          Working...
          X