Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting indicator Input

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

    Setting indicator Input

    I have an indicator, that used to set the "Input" to Median in the Initialize() method in order to set the default value for Input. (i.e. Input = Median; )

    I can no longer do this, as I get an exception saying that it failed to call Initialize because 'BarsInProgress' property can not be accessed.

    I understand why this is happening, but what is the recommended way to set the Input to an indicator in NT7?

    #2
    aslane,

    Please provide complete snippet of what you have in Initialize(). Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Code:
      protected override void Initialize() {
          Add(new Plot(Color.Blue, PlotStyle.Hash, "BuyStop"));
                  
          CalculateOnBarClose = true;
          Overlay                  = true;
          PriceTypeSupported  = true;
      
          // this is the problem line			
          Input = Median;
      
          trend = new BoolSeries(this);
      }

      Comment


        #4
        >> Input = Median;
        Unfortunately this is not supported nor was it ever. As with all other unsupported stuff: having it running on NT6.5 does not mean it would be supported.

        Comment


          #5
          Yeah, I was afraid of that.

          This one is unfortunate, because you can set an indicator to allow the input to be changed, but there is now no way to set the default input. There are a number of ind that use this method, and now it will have to be changed every time it is applied to a chart.

          Perhaps a way to fix this would be to add another parameter type that is an enum with the values that can be used, and then set the input in the post-init code.

          Comment


            #6
            Thanks for your suggestion.

            Comment

            Latest Posts

            Collapse

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