Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  158 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Today, 09:29 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post Belfortbucks  
                  Started by zstheorist, Today, 07:52 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post zstheorist  
                  Started by pmachiraju, 11-01-2023, 04:46 AM
                  8 responses
                  151 views
                  0 likes
                  Last Post rehmans
                  by rehmans
                   
                  Started by mattbsea, Today, 05:44 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post mattbsea  
                  Working...
                  X