• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

More than 4 plots in an indicator?

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

    More than 4 plots in an indicator?

    Hi,

    Is it possible to make an indicator with 5 plots on it? The wizard can generate up to 4 plots. Is there a way to get 5 plots in the indicator by manually adding some code? Is yes, how to do?

    #2
    You need to manually edit the code and mimic any of input variables which are generated by the wizard.
    DierkNinjaTrader Customer Service

    Comment


      #3
      Hi,

      I had already tried that, but there seems to be some error because after manually adding code it doesn't display any indicator anymore (also the other 4 disappear). So I must be overlooking something...

      I already had 4 plots, now I try adding one more:


      protected override void Initialize()
      {
      Add(new Plot(Color.Orange, PlotStyle.Bar, "PRVm1"));
      Add(new Plot(Color.Green, PlotStyle.Bar, "PRVm2"));
      Add(new Plot(Color.DarkViolet, PlotStyle.Bar, "PRVm3"));
      Add(new Plot(Color.Firebrick, PlotStyle.Bar, "PRVm4"));
      ADDED --> Add(new Plot(Color.Blue, PlotStyle.Bar, "PRVm5"));



      protected override void OnBarUpdate()
      {
      PRVm1.Set(Close[0]);
      PRVm2.Set(Close[0]);
      PRVm3.Set(Close[0]);
      PRVm4.Set(Close[0]);
      ADDED --> PRVm5.Set(Close[0]);


      #region Properties

      [Browsable(false)]
      [XmlIgnore()]
      public DataSeries PRVm1
      {
      get { return Values[0]; }
      }

      [Browsable(false)]
      [XmlIgnore()]
      public DataSeries PRVm2
      {
      get { return Values[1]; }
      }

      [Browsable(false)]
      [XmlIgnore()]
      public DataSeries PRVm3
      {
      get { return Values[2]; }
      }

      [Browsable(false)]
      [XmlIgnore()]
      public DataSeries PRVm4
      {
      get { return Values[3]; }
      }

      ADDED --> [Browsable(false)]
      ADDED --> [XmlIgnore()]
      ADDED --> public DataSeries PRVm5
      ADDED --> {
      ADDED --> get { return Values[4]; }
      ADDED --> }

      Comment


        #4
        Did you check your logs for error messages?
        DierkNinjaTrader Customer Service

        Comment


          #5
          I got this message:
          "2007-07-12 16:08 Default Error on calling the 'OnBarUpdate' method for indicator 'PRV5min2' on bar 0: Index was outside the bounds of the array."

          But after closing NT6 completely and restarting, now it does display 5 indicators!
          (and no error message)

          So either my PC configuration is unstable or there is still some bug in NT6.
          Anyway, it works now!

          Comment


            #6
            Glad you got it resolved.
            DierkNinjaTrader Customer Service

            Comment


              #7
              The issue you experienced will be fixed with next release. Thanks for bringing this up.
              DierkNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by thomaspartyof10, Today, 02:33 AM
              1 response
              19 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by manueldecastro, Yesterday, 12:57 AM
              1 response
              16 views
              0 likes
              Last Post NinjaTrader_ChrisL  
              Started by ArmKnuckle, Today, 01:59 AM
              1 response
              17 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by seppyr, Today, 01:53 AM
              1 response
              17 views
              0 likes
              Last Post NinjaTrader_PaulH  
              Started by matthewbartlett, Today, 01:22 AM
              1 response
              12 views
              0 likes
              Last Post Emma1
              by Emma1
               
              Working...
              X