• 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

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 bchip, Today, 09:25 AM
                    1 response
                    9 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by Tomass, Today, 09:25 AM
                    2 responses
                    11 views
                    0 likes
                    Last Post Tomass
                    by Tomass
                     
                    Started by hundert, Today, 08:37 AM
                    3 responses
                    17 views
                    0 likes
                    Last Post NinjaTrader_Melissa  
                    Started by ronaldgreene828, Today, 08:16 AM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_PatrickG  
                    Started by hir04068, Today, 01:36 AM
                    1 response
                    18 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Working...
                    X