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 CyberNate, 11-17-2020, 08:15 PM
            2 responses
            424 views
            0 likes
            Last Post nurpalgo  
            Started by sdauteuil, 09-23-2021, 10:16 AM
            7 responses
            1,247 views
            0 likes
            Last Post marcus2300  
            Started by sofortune, 05-18-2024, 11:48 AM
            2 responses
            32 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by Zach55, 02-19-2024, 07:22 PM
            2 responses
            66 views
            0 likes
            Last Post lbadisa1  
            Started by JGriff5646, Yesterday, 05:47 PM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X