Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Optimizer does not load my new strategy

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

    Strategy Optimizer does not load my new strategy

    Hi all,

    I wrote a new strategy that compiles and saves just fine. However when I try to use strategy analyzer, although the name of the strategy exists in the dropdown menu of strategies, it does not load:

    Parameters are not shown, label is not shown.

    I will not post my code for privacy issues, but the declaration part of my code is exactly the same as any sample provided.

    This must be a simple issue I overlooked please help.

    #2
    dincervolkan, what NinjaTrader release version are you working on?

    Does it load correctly when applied from the chart?

    Do you see errors in the Control Center log tab as you attempt to load this new strategy?

    Thanks

    Comment


      #3
      6.5.1000.18

      The problem stems from the following portion of the code :
      #region Variables
      // Wizard generated variables

      private string Data2 = "DAX";
      private int Data2Minutes = 30;
      private double Diff = 50;
      private int contr = 1;
      double Bp = 99999999;
      double Sp = 0;
      bool Justenteredshort = false;
      bool Justenteredlong = false;
      // User defined variables (add any user defined variables below)
      #endregion
      /// <summary>
      /// This method is used to configure the strategy and is called once before any strategy method is called.
      /// </summary>
      protected override void Initialize()
      {
      Add(Data2, PeriodType.Minute, Data2Minutes);

      CalculateOnBarClose = true;
      }

      As soon as I add the red colored part the strategy does not work on analyzer although it compiles. The DAX data I am trying to load is NOT futures its the DAX index itself and the code in NT is DAX.

      Comment


        #4
        An Addition;
        I am getting my data from IB where the symbol map for DAX is "DAX|DTB"
        Could that be the problem ?

        Comment


          #5
          dincervolkan, first step would then be checking if you receive realtime and historical data properly outside of the strategy - would that be the case and you would have the needed subscriptions for it also at IB?

          Comment


            #6
            I have subscriptions for all DAX indices and futures

            Comment


              #7
              Hello,

              This may be however can you please open a minute chart in NinjaTrader of DAX. Does it open or is it a blank chart?

              I look forward to assisting you further.
              BrettNinjaTrader Product Management

              Comment


                #8
                Hi Brett,

                The 1 min chart is empty...

                Comment


                  #9
                  Never Mind,

                  I got it. The NT code needed to be used i.e. ^DAX not DAX

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  85 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  47 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  29 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  32 views
                  0 likes
                  Last Post TheRealMorford  
                  Started by Mindset, 02-28-2026, 06:16 AM
                  0 responses
                  67 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Working...
                  X