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

Indicator Does not Show on Indicator List - NT8

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

    Indicator Does not Show on Indicator List - NT8

    Dear Support,

    Converted a working NT7 indicator to NT8 using the conversion tool on Forum. The NT8 version edited and compiled fine. However, the indicator name does not show on the drop down list of indicators when trying to apply to a chart.

    Both versions are .cs open code and not .dll. I am Curious as to why the NT8 indicator does not show on the chart drop down indicators list but exists on the edit list and in Explorer folder.

    Any Idea?

    Many thanks.

    #2
    Hello aligator,

    Thanks for your post.

    Please note that we are asking that all NT8 related posts be placed in the NT8 forums.

    Please review the "Log" tab of the NinjaTrader8 control center. When you open the indicators panel (to add the indicator to a chart), do any errors show in the log?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Paul View Post
      Hello aligator,

      Thanks for your post.

      Please note that we are asking that all NT8 related posts be placed in the NT8 forums.

      Please review the "Log" tab of the NinjaTrader8 control center. When you open the indicators panel (to add the indicator to a chart), do any errors show in the log?
      Thank you Paul. I did not know which forum of NT8 to post under. I will post NT8 related material in NT8 section.

      To answer your question, yes, I get the following message in Output window and log file:

      "Indicator 'LondonOpenAuto': Error on calling 'OnStateChange' method: Object reference not set to an instance of an object."

      Thanks again.

      p.s.

      Here is what's under translated OnStateChange:

      Code:
       		
       		protected override void OnStateChange()
      		{
      			if (State == State.SetDefaults)
      			{
      	            Name = "LondonOpenAuto";
       	            Description = "London Open";
       				AddPlot(new Stroke(Brushes.Black, 3), PlotStyle.Square, "London Open");
      				AddDataSeries(Instrument.FullName, BarsPeriodType.Minute, 1);
      				IsAutoScale 			= false;
      				DisplayInDataBox 	= false;
      				IsOverlay 			= true;
      				PaintPriceMarkers 	= true;
      	 		}
      			
      			else if (State == State.Configure)
      			{
      					Calculate = Calculate.OnBarClose;				
      			}
              }
      
      		private void OnStartUp()
      Last edited by aligator; 10-24-2016, 09:35 AM.

      Comment


        #4
        Hello aligator,

        Thanks for your reply.

        This line: AddDataSeries(Instrument.FullName, BarsPeriodType.Minute, 1); Is in the wrong place. With reference to the helpguide: http://ninjatrader.com/support/helpG...tatechange.htm it needs to be moved to State.Configure

        Edit: Additionally, the Calculate = Calculate.OnBarClose should be moved into State.SetDefaults
        Last edited by NinjaTrader_PaulH; 10-24-2016, 09:38 AM.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Paul View Post
          Hello aligator,

          Thanks for your reply.

          This line: AddDataSeries(Instrument.FullName, BarsPeriodType.Minute, 1); Is in the wrong place. With reference to the helpguide: http://ninjatrader.com/support/helpG...tatechange.htm it needs to be moved to State.Configure

          Edit: Additionally, the Calculate = Calculate.OnBarClose should be moved into State.SetDefaults
          Thank you Paul, You are an angel, that worked great.

          The difficulty in conversion is to decide the proper NT8 "OnState" locations to transfer the NT7 information under Variables, OnStatup, Initialize(), OnBarUpdate, etc, I wonder if it is documented somewhere the type of information that should fall under various "State ==" conditions.

          Many Thanks.

          Comment


            #6
            Hello aligator,

            Thanks for your reply.

            Glad that worked out.

            The helpguide link in my previous reply provides a table of each state and what would typically be placed in that state.
            Paul H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by chbruno, Today, 04:10 PM
            0 responses
            3 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            6 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by frslvr, 04-11-2024, 07:26 AM
            9 responses
            127 views
            1 like
            Last Post caryc123  
            Working...
            X