Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple strategies on the same instrument?

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

    Multiple strategies on the same instrument?

    I've developed a couple of strategies that I'd like to run on ES at the same time. Ideally, I'd rather not combine them into one script, but keep them separate.

    What kind of issues am I looking at? I.e.,, If the second strategy gets a buy signal while the first strategy is already in a position. I also don't want to close a position if strat #1 is long, and the second strat gets a short signal. Just wondering what kind of problems I could be looking at and how to work around them.

    Also, when you check the market.position within a script, are you getting a result from that script position only?

    #2
    Hello,

    In your example, your broker will likely flatten you. You cannot be both long and short in the same market.
    DenNinjaTrader Customer Service

    Comment


      #3
      What about this?

      "when you check the market.position within a script, are you getting a result from that scripts position only?"

      I'm just wondering if there is something I can put in my two strats that can check to see if the other strat is in a position. That way I can tell it to ignore a signal if the other strat is currently in a position.


      Thanks

      Comment


        #4
        lookOutBelow, the strategy can only see it's own stratgy position per default, as NinjaScript strategies do not cross communicate, you could for example work around this by monitoring the positions saved to textfiles.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        67 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        150 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X