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

Corruption

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

    Corruption

    Hey guys, I think I might have a corruption. When I open a strategy the comments do not show as green, its all black. Also when I try to optimize a strategy it tells me that the strategy now has no parameters. How do I fix this?

    #2
    Hello elitetradernyc,

    When the text is black and not green inside of the Editor window then NinjaTrader does not consider it to be a commented out text.

    If you are using the " /* */ " comment out method you may want to make sure that something is not stopping your section that you would like to comment out.

    Otherwise, could you post your code so that I may take a look?
    JCNinjaTrader Customer Service

    Comment


      #3
      Probably some kind of corruption. I just created a new strategy and it all shows as black, even the comments:

      #region Using declarations
      using System;
      using System.ComponentModel;
      using System.Diagnostics;
      using System.Drawing;
      using System.Drawing.Drawing2D;
      using System.Xml.Serialization;
      using NinjaTrader.Cbi;
      using NinjaTrader.Data;
      using NinjaTrader.Indicator;
      using NinjaTrader.Gui.Chart;
      using NinjaTrader.Strategy;
      #endregion

      // This namespace holds all strategies and is required. Do not change it.
      namespace NinjaTrader.Strategy
      {
      /// <summary>
      /// Enter the description of your strategy here
      /// </summary>
      [Description("Enter the description of your strategy here")]
      public class StrategyCommenttest : Strategy
      {
      #region Variables
      // Wizard generated variables
      private int myInput0 = 1; // Default setting for MyInput0
      // 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()
      {
      CalculateOnBarClose = true;
      }

      /// <summary>
      /// Called on each bar update event (incoming tick)
      /// </summary>
      protected override void OnBarUpdate()
      {
      }

      #region Properties
      [Description("")]
      [GridCategory("Parameters")]
      public int MyInput0
      {
      get { return myInput0; }
      set { myInput0 = Math.Max(1, value); }
      }
      #endregion
      }
      }

      Comment


        #4
        Hello elitetradernyc,

        Thanks for the code.

        Have you tried uninstalling and reinstalling NinjaTrader?
        JCNinjaTrader Customer Service

        Comment


          #5
          Good idea, will try that now.

          Comment


            #6
            Hello elitetradernyc,

            Let us know the results.

            Happy to be of further assistance.
            JCNinjaTrader Customer Service

            Comment


              #7
              I got it done, just had to do a program installation repair through windows and that fixed whatever was causing it.

              Comment


                #8
                Hello elitetradernyc,

                Thanks for the update.

                Glad to hear that repairing the program resolved this.
                JCNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by f.saeidi, Today, 12:14 PM
                4 responses
                12 views
                0 likes
                Last Post f.saeidi  
                Started by Russ Moreland, Today, 12:54 PM
                1 response
                6 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by philmg, Today, 12:55 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Started by TradeForge, 04-19-2024, 02:09 AM
                2 responses
                32 views
                0 likes
                Last Post TradeForge  
                Started by aprilfool, 12-03-2022, 03:01 PM
                3 responses
                329 views
                0 likes
                Last Post NinjaTrader_Adrian  
                Working...
                X