Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Instances of Strategy

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

    Multiple Instances of Strategy

    I don't recall on NT7 Rev 1 having a issue with running multiple instances of the same strategy?
    What happens on Rev 2 when I create my 2nd instance of the strategy and press the enabled checkbox shortly after it resets check box.
    My reason for doing this is I am trying different configurations of my strategy and it would be faster to do them at same time running on Live SIM testing.
    Thanks

    #2
    Hello,

    The reason this occured most likely is the strategy was shutdown as it encountered an error.

    Please check in the log tab in the control center what errors are listed here?

    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      The following code if I uncomment the enterLong and in strategy set the variable to false I can't enable strategy????

      if code......

      // Condition set 3 Long
      elseif ( planA ==false
      && Position.MarketPosition == MarketPosition.Flat
      && High[0] > EMA(nEMA)[0]
      && CrossAbove(MACD(4,14, 9), 0, 1))
      {
      //EnterLong(DefaultQuantity, "Long1");
      PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\OrderPending.wav");
      Print(Time[
      0] + "LongBoom: Plan B") ;
      DrawTextFixed(
      "LongBoom", "LongBoom Plan B", TextPosition.BottomRight);
      }

      Comment


        #4
        bbucha_stk,

        If it does not evaluate to true then your code would not execute. I suggest you add Print() and check each component of your else condition to see if they are truly all true at the exact same point in time.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I disagree...
          The variable planA is a bool and If I set it to false then if (planA==false would be acceptable

          Comment


            #6
            Also one time it will enable and then I try another time on Market Replay and it wont enable.
            I suggest you hook up to my computer may save us time..This started happenning with R2

            Comment


              #7
              Another observation it worked on market replay on minute data but would not enable on Range data

              Comment


                #8
                Hello,

                Please send me your code to support at ninjatrader dot com and reference this forum post and put ATTN : Brett in the subject line.

                I look forward to assisting you further.
                BrettNinjaTrader Product Management

                Comment


                  #9
                  Hello,

                  Error is in your your code here:

                  if (Performance.AllTrades.TradesPerformance.GrossProf it > 250)
                  {
                  //Disable strategy if Strategy exceeded target profit of $250
                  Disable();
                  Print(Time[0] + "EXIT Strategy exceeded target profit of $250 ") ;
                  SendMail("[email protected]", "[email protected]", "Exceeded Profit", "EXIT Strategy exceeded target profit of $250");
                  }

                  Please resolve this section of your code. As you can see here you are Disable the strategy on your own.
                  BrettNinjaTrader Product Management

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  648 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  369 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  109 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  573 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  575 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X