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 CaptainJack, 05-29-2026, 05:09 AM
            0 responses
            213 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 05-29-2026, 12:02 AM
            0 responses
            129 views
            0 likes
            Last Post CaptainJack  
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            146 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            229 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            192 views
            0 likes
            Last Post CarlTrading  
            Working...
            X