![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: May 2009
Location: Tonganoxie, Kansas
Posts: 18
Thanks: 1
Thanked 0 times in 0 posts
|
I have a DataSeries I am passing to another program to use there and for backtesting. I defined the series in Initialize() as follows:
Add(new Plot(new Pen(Color.Transparent, 1), PlotStyle.Line, "AdxDirection")); In the properties section I added: [Browsable(false)] [XmlIgnore()] public DataSeries AdxDirection { get { return Values[6]; } } Everything works fine. I just don't want the value of AdxDirection to display in the Plots section of the indicator. I want it to be 'invisible' to everyone except the program. I tried just making AdxDirection a variable as follows: public DataSeries AdxDirection; ...and that worked fine except I get a sereailization error when I try to save the workspace. Any ideas? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,781
Thanks: 159
Thanked 565 times in 556 posts
|
Hello,
When you say the plots section of the indicator, do you mean the indicator settings? Or you want to hide the plot completely from the chart/display? If you're referring to the plots section of the indicator parameters, please add PlotsConfigurable = false; in the Initialize() section. This cannot be configured per plot - it will disable all of the plots from being configurable If you were speaking of the chart/display, setting the plot to transparent should hide it. Can you point me to where exactly this is displaying?
Matthew
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2008
Posts: 376
Thanks: 0
Thanked 20 times in 11 posts
|
Just kill (delete or comment out) the plot instruction and properties. I presume you will be storing double values. If integer, 1 = up, -1 = down?, use IntSeries or String Series if "U" and "D".
Define your DataSeries in Vars private DataSeries adxDirectionSeries; create it in initialize adxDirectionSeries = new DataSeries(this); set the value in OnBarUpdate? adxDirectionSeries.Set(xyz); Expose it in Properties [Browsable(false)] [XmlIgnore()] [Description("ADX Whatever")] public DataSeries AdxDirection { get { Update(); return adxDirectionSeries; } } This will create the public DataSeries w/o a plot. |
|
|
|
|
The following 2 users say thank you to snaphook for this post: |
|
|
|
#4 |
|
Junior Member
Join Date: May 2009
Location: Tonganoxie, Kansas
Posts: 18
Thanks: 1
Thanked 0 times in 0 posts
|
Snap-
GREAT answer!!! Thank you very much. You hit the nail dead on the head!! gb |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Public DataSeries | neb1998 | Indicator Development | 3 | 06-23-2011 10:53 AM |
| How to make indicator display simple colored status | Lonneman | Indicator Development | 4 | 05-31-2011 10:38 AM |
| Calling public Variables | gg80108 | General Programming | 1 | 03-11-2010 02:11 PM |
| Public Beta In Sight? | jeremymgp | Version 7 Beta General Questions & Bug Reports | 1 | 01-22-2010 11:28 AM |
| Initializing a public DataSeries | RandyT | General Programming | 11 | 08-25-2009 11:05 AM |