Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator plots line that is not wanted

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

    Indicator plots line that is not wanted

    Hi,

    I've written an indicator that puts two text boxes in a panel using drawtextfixed. If I put the indicator in the price panel it seems to work fine. If I put the indicator in its own panel, an orange line is plotted. I have no clue where this plotted line comes from. I have reviewed my code and have no plot calls anywhere.

    I have attached an example with the indicator in a separate panel.

    Thanks for any help.
    Last edited by Tasker-182; 02-11-2014, 03:05 PM.

    #2
    Hello,

    Does the plot still appear if you remove and re-add the indicator?

    Do you have any templates saved in (My) Documents\NinjaTrader 7\templates\Indicator?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi Matthew,

      Yes, it reappears when the indicator is removed and then re-added to the chart.

      I do have a single template but i don't know why and it appears to be the macrossbuilder.

      Thanks

      Comment


        #4
        Hello,

        Would you able to to post your Initialize() and #region Properties section of the script?
        MatthewNinjaTrader Product Management

        Comment


          #5
          protected override void Initialize()
          {
          Overlay = true;
          CalculateOnBarClose = false;
          DrawOnPricePanel = false;
          AutoScale = false;
          }
          ....
          #region Properties
          [Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
          [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
          public int Multiple
          {
          get {return mul;}
          set {Math.Max(1, value); }
          }
          [Description("Choose a font size of 6, 8, 10, 12 or 14")]
          [Category("Display Parameters")]
          [Gui.Design.DisplayName("Fontsize for TextBox")]
          public int Fontsize
          {
          get { return fontsize; }
          set { fontsize = Math.Max(1, value); }
          }
          [Description("when set true, will add a second line to the text boxes")]
          [Category("Display Parameters")]
          [Gui.Design.DisplayName("Two lines in Textbox")]
          public bool Ln2
          {
          get { return ln2; }
          set { ln2 = value; }
          }

          [Description("Sets the opacity of text box, use 1 - 10")]
          [Category("Display Parameters")]
          [Gui.Design.DisplayName("Opacity of Textbox")]
          public int Opacity
          {
          get { return opacity; }
          set { opacity = Math.Max(1, value); }
          }
          [Description("True = text box on chart right side,\nFalse = text box on chart left side")]
          [Category("Display Parameters")]
          [Gui.Design.DisplayName("Text Box on Right side?")]
          public bool Boxposition
          {
          get { return boxposition; }
          set { boxposition = value; }
          }
          #endregion
          }

          Comment


            #6
            Thanks - I do not see anything there that would be creating this plot.

            In order to determine where this is coming from, I will need to review your entire script. Can you please export it under File--> Utilities--> Export NinjaScript and then upload this script as an attachment.

            If you would rather, you can email it to support[at]ninjatrader[dot]com and we can review it privately there as well.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Originally posted by NinjaTrader_Matthew View Post
              Thanks - I do not see anything there that would be creating this plot.

              In order to determine where this is coming from, I will need to review your entire script. Can you please export it under File--> Utilities--> Export NinjaScript and then upload this script as an attachment.

              If you would rather, you can email it to support[at]ninjatrader[dot]com and we can review it privately there as well.

              I will e-mail it, thanks.

              Comment


                #8
                I am curious what the resolution of this issue was found to be. I have seen this behavior before.

                Comment


                  #9
                  There was a Set() method that was drawing this plot.
                  MatthewNinjaTrader Product Management

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  596 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  343 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
                  556 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  554 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X