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

Plot names not updating in Data Box when changed

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

    Plot names not updating in Data Box when changed

    Hi,

    I have the following segment of code under Initialize()

    Code:
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Cross, "cSPsignal.Direction"));
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Cross, "CurrentBar"));
    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Dot, "Breach"));
    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Dot, "TypeOfEntry"));
    Whenever I change the Plot names, for example from "Breach" to something else, the name does not update in the Data Box - it remains as Breach.

    How can I get the names to refresh?

    Thanks.

    -Nick

    #2
    Originally posted by nicbizz View Post
    Hi,

    I have the following segment of code under Initialize()

    Code:
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Cross, "cSPsignal.Direction"));
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Cross, "CurrentBar"));
    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Dot, "Breach"));
    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Dot, "TypeOfEntry"));
    Whenever I change the Plot names, for example from "Breach" to something else, the name does not update in the Data Box - it remains as Breach.

    How can I get the names to refresh?

    Thanks.

    -Nick
    If you change anything in the Initialize() method, you would usually have to remove the indicator from the chart, then reapply the indicator to the chart, before you will see the change.

    Comment


      #3
      Hello,

      Thank you for your input koganam. Nick, removing and reapplying the indicator is the correct method to refresh the data series names.

      You can find additional information on the Add() method in our help guide here: http://www.ninjatrader.com/support/h...x.html?add.htm

      You can find additional information on the Plot class in our help guide here: http://www.ninjatrader.com/support/h...plot_class.htm

      If you have any further issues or questions, please feel free to ask.
      Michael M.NinjaTrader Quality Assurance

      Comment


        #4
        Hey guys,

        Thanks for the tip.

        I've removed the indicator from all open charts, close the Data Box, reapplied the indicator, and reopen the Data Box. The names still would not update.

        Is there anything else I can try?

        Thanks.

        -Nick

        Comment


          #5
          Hello Nick,

          Make sure after changing your code that you press F5 to recompile the code before removing and re-adding the indicator.

          If you have any further issues, please let us know.
          Michael M.NinjaTrader Quality Assurance

          Comment


            #6
            Hi Michael,

            I did that as well. No success.

            Do I need to Repair DB, or anything of that sort?

            -Nick

            Comment


              #7
              Also make sure the indicator is not saved in a chart template.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #8
                Hello Nick,

                If you are still having problems with the plot names not updating in the data box, you may accidentally be using a different indicator in your chart than the one you are updating the code for. If this is not the case please exit out of NinjaTrader and restart your computer. If the issue persists, please feel free to either post up your indicator code here on the forums or shoot us an e-mail at platformsupport[AT]ninjatrader[DOT]com with this ticket number in the subject line: 1322729 and be sure to include your indicator code.

                We look forward to assisting you further.
                Michael M.NinjaTrader Quality Assurance

                Comment


                  #9
                  Hey guys,

                  Thanks for all the help so far.

                  Ok, I've noticed something bizarre. Even when I remove all the "Add(new Plot...)" code (and the corresponding Values[x].Set( ...) code) from my Indicator, the Panel continues to display the previous names, only with the N/A as values (screenshot attached)

                  I'm really at my wit's end on how to rectify the situation. Would send you the indicator, except it's dependent on a few other files, and I doubt it will compile at your end.

                  Any thoughts?

                  -Nick
                  Attached Files

                  Comment


                    #10
                    Hello Nick,

                    Thank you for your patience. Please locate this section of your indicator:
                    Code:
                    #region Properties
                    //All your properties
                    #endregion
                    You will probably see some items like this:

                    Code:
                    [Browsable(false)]
                    [XmlIgnore()]
                    public DataSeries Breach
                    {
                        get { return Values[0]; }
                    }
                    Please try changing the names of these DataSeries in line with the changes you were attempting to make originally and make sure to re-add your plots and the code to set their values.

                    For example:
                    Code:
                    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Dot, "Breach"));
                    becomes:
                    Code:
                    Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Dot, "SomethingNew"));
                    and
                    Code:
                    [Browsable(false)]
                    [XmlIgnore()]
                    public DataSeries Breach
                    {
                        get { return Values[0]; }
                    }
                    becomes:
                    Code:
                    [Browsable(false)]
                    [XmlIgnore()]
                    public DataSeries SomethingNew
                    {
                        get { return Values[0]; }
                    }
                    Please let us know if this does not resolve the problem or if we can be of further assistance.
                    Michael M.NinjaTrader Quality Assurance

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by ghoul, Today, 06:02 PM
                    3 responses
                    14 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by jeronymite, 04-12-2024, 04:26 PM
                    3 responses
                    44 views
                    0 likes
                    Last Post jeronymite  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    7 responses
                    20 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by AttiM, 02-14-2024, 05:20 PM
                    10 responses
                    180 views
                    0 likes
                    Last Post jeronymite  
                    Started by DanielSanMartin, Yesterday, 02:37 PM
                    2 responses
                    13 views
                    0 likes
                    Last Post DanielSanMartin  
                    Working...
                    X