![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Aug 2009
Posts: 289
Thanks: 0
Thanked 2 times in 2 posts
|
I thought I just posted this but cant find it.
I tried to rearrange the order the pivots show in the data box to read top to bottom: R3,R2,R1,PP,S1,S2,S3 but all I was able to do was rearrange the names, but the values stayed in the original order as the ninja default that runs from PP on down. I think it must be in properties somehow but I couldnt figure out how. It wont let me post all the code so I just posted the parts I changed from the ninja default after copying it into 'MyPivots' script. I didnt switch any data in properties, but reproduced the relevant parts I think so you can view it easily. HTML Code:
/// </summary> protected override void Initialize() { Add(new Plot(Color.Red, "R3")); Add(new Plot(Color.Red, "R2")); Add(new Plot(Color.Red, "R1")); Add(new Plot(Color.Black,"PP")); Add(new Plot(Color.Green,"S1")); Add(new Plot(Color.Green,"S2")); Add(new Plot(Color.Green,"S3")); { R3.Set(r3); R2.Set(r2); R1.Set(r1); PP.Set(pp); S1.Set(s1); S2.Set(s2); S3.Set(s3); } } #region Properties /// <summary> /// </summary> [Description("Type of period for pivot points.")] [Category("Parameters")] public Data.PivotRange PivotRangeType { get { return pivotRangeType; } set { pivotRangeType = value; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore] public DataSeries PP { get { return Values[0]; } } /// <summary> /// </summary> [Description("Approach for calculation the prior day HLC values.")] [Category("Parameters")] public Data.HLCCalculationMode PriorDayHLC { get { return priorDayHLC; } set { priorDayHLC = value; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore] public DataSeries R1 { get { return Values[1]; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore] public DataSeries R2 { get { return Values[3]; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore] public DataSeries R3 { get { return Values[5]; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore] public DataSeries S1 { get { return Values[2]; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore] public DataSeries S2 { get { return Values[4]; } } /// <summary> /// </summary> [Browsable(false)] [XmlIgnore] public DataSeries S3 { get { return Values[6]; } } /// <summary> /// close value for user defined pivots calculation |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
See the Properties region of the code. Notice how you have Values[0], Values[1], etc. You need to change the order there.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2009
Posts: 289
Thanks: 0
Thanked 2 times in 2 posts
|
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Your code does not suggest you have made the change. Values[0] corresponds with the first Add(new Plot(...)) in Initialize(). Values[1] goes to the next, etc.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Aug 2009
Posts: 289
Thanks: 0
Thanked 2 times in 2 posts
|
Quote:
I'll try again. I did change the properties but when it didn’t change properly I put it back as it was originally in order to post to the forum |
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Remember you need to remove the indicator and add a new instance after you compile these changes.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 | |
|
Senior Member
Join Date: Aug 2009
Posts: 289
Thanks: 0
Thanked 2 times in 2 posts
|
Quote:
it just makes more sense that if r1 gets hit that i care more about easily seeing r2 or pp rather than seeing s1 being next on the data box list. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to rearrange Y axis | biorjin | Charting | 1 | 07-10-2009 02:51 AM |
| Info box, daily opening line, news event calendar indicators | pa188 | Indicator Development | 6 | 05-28-2009 03:58 AM |
| Charts; Multi-line/word wrapped text box | SteveB | Suggestions And Feedback | 1 | 05-09-2008 06:15 AM |
| Removing a data line from the Data Box | hammall | Charting | 3 | 01-30-2008 10:02 AM |
| Line "names" in Indicator Box change to "Line" after modification | higler | Charting | 3 | 05-02-2007 06:05 AM |