Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

enter long position in condition builder

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

    enter long position in condition builder

    Hi, within Condition Builder in Edit Strategy, I am trying to run 3 indicators each with its own long/short position so that the strategy is the combined outcome of the 3 indicators.

    So if indicator 1 = 1 long, indicator 2=1 long and indicator 3=1 long, i want a net position of 3 long. When indicator 3 changes to 1 short, my Enter short position in Condition Builder forces the strategy to then go net 1 short instead of net 1 long (since indicator 1 and indicator 2 haven't changed).

    I am using Enter long position and the Enter short position in Condition builder for each of the indicators and the indicators go from Long to Short with no flat position.

    Is there another buy or sell command i can use that only affects the indicator involved?

    #2
    anothertoy,

    A strategy does not differentiate between where your positions come from. There is one overall strategy position and if you go EnterShort() from a long strategy position it will close that long position and then get you into a short position. If you do not want this and just want to close one long, submit ExitLong() instead of EnterShort() when you know you are already long.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      thanks but the problem with an exitlong or exit short, is that the indicator concerned will have a flat position but i want it to have the opposite position.

      can i backtest a portfolio of strategies?

      Comment


        #4
        You cannot view each indicator as having its own position. A strategy has one position and you need to manage your orders based on that position. If you want to sell 2 then you need to close two of your original enter longs. You can run three separate strategies in three separate backtests and save the results, but you will need to aggregate results yourself with Excel.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          On a related note, will ninjatrader cope adequately with 40 separate strategies running at the same time if i split each indicator into a separate strategy to get around the position issue? i have a dual core intel 2.13ghz computer with 4gb of ram.

          Or should i spend some time trying to cut down the number of strategies being run concurrently?

          These strategies are being run on minimum 45min "close of bar" data and not tick data.

          Comment


            #6
            You can try it. It is highly dependent on how CPU intensive your algorithms are and how much historical data you are loading per strategy. Obviously less system load is better.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X