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

  • NinjaTrader_MichaelM
    replied
    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.

    Leave a comment:


  • nicbizz
    replied
    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

    Leave a comment:


  • NinjaTrader_MichaelM
    replied
    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.

    Leave a comment:


  • eDanny
    replied
    Also make sure the indicator is not saved in a chart template.

    Leave a comment:


  • nicbizz
    replied
    Hi Michael,

    I did that as well. No success.

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

    -Nick

    Leave a comment:


  • NinjaTrader_MichaelM
    replied
    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.

    Leave a comment:


  • nicbizz
    replied
    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

    Leave a comment:


  • NinjaTrader_MichaelM
    replied
    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.

    Leave a comment:


  • koganam
    replied
    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.

    Leave a comment:


  • nicbizz
    started a topic Plot names not updating in Data Box when changed

    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

Latest Posts

Collapse

Topics Statistics Last Post
Started by algospoke, Yesterday, 06:40 PM
2 responses
21 views
0 likes
Last Post algospoke  
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
45 views
0 likes
Last Post jeronymite  
Started by Barry Milan, Yesterday, 10:35 PM
7 responses
21 views
0 likes
Last Post NinjaTrader_Manfred  
Started by AttiM, 02-14-2024, 05:20 PM
10 responses
181 views
0 likes
Last Post jeronymite  
Working...
X