I recently built an indicator with 21 NinjaScriptProperty's and under the "Display" attribute each has been given a separate "Order" variable starting with 1 and ending with 21. They are then grouped together in sets of 3 using the "GroupName" variable beginning with "Line One" and ending with "Line Seven."
By doing this I expect to see them listed in the GUI with Line One at the top and Line Seven at the bottom but instead they are listed in alphabetical order according to their "GroupName." So they appear in the following order:
Line Five
Line Four
Line One
Line Seven
Line Six
Line Three
Line Two
Is this the expected behavior for the "Order" and "GroupName" variables?
Here is a copy and paste of the first two sets of property's:
// Property Settings...
#region Properties
// Line one properties...
[NinjaScriptProperty]
[Display(Name="Time Frame", Description="Line One's time frame parameter.", Order=1, GroupName="Line One: ")]
public CandleSelection.Time TimeFrameOne
{
get { return timeFrameOne; }
set { timeFrameOne = value; }
}
[NinjaScriptProperty]
[Display(Name="Candle Position", Description="Line One's position parameter.", Order=2, GroupName="Line One: ")]
public CandleSelection.Position CandlePositionOne
{
get { return candlePositionOne; }
set { candlePositionOne = value; }
}
[NinjaScriptProperty]
[Display(Name="Bars Ago (0 is current bar)", Description="Line One's historical bars parameter.", Order=3, GroupName="Line One: ")]
public int BarsLookBackOne
{
get { return barsLookBackOne; }
set { barsLookBackOne = value; }
}
// Line two properties...
[NinjaScriptProperty]
[Display(Name="Time Frame", Description="Line Two's time frame parameter.", Order=4, GroupName="Line Two: ")]
public CandleSelection.Time TimeFrameTwo
{
get { return timeFrameTwo; }
set { timeFrameTwo = value; }
}
[NinjaScriptProperty]
[Display(Name="Candle Position", Description="Line Two's position parameter.", Order=5, GroupName="Line Two: ")]
public CandleSelection.Position CandlePositionTwo
{
get { return candlePositionTwo; }
set { candlePositionTwo = value; }
}
[NinjaScriptProperty]
[Display(Name="Bars Ago (0 is current bar)", Description="Line Two's historical bars parameter.", Order=6, GroupName="Line Two: ")]
public int BarsLookBackTwo
{
get { return barsLookBackTwo; }
set { barsLookBackTwo = value; }
}
It continues like this for all seven lines...
Thank you for your help! NT provides EXCELLENT service on these forums.
Ben
Comment