I'm developing an indicator and I've just added another property parameter to my code. The software works fine with the initial value assigned to this new parameter. But, for some reason, it doesn't appear in the parameter list when I open the indicator. Notice that deleting any other parameter from my script, then, it appears in the indicator GUI. I've tried any combination, changed names, etc. but nothing worked for me. I need only four parameters in my indicator but it looks like my system is limiting me to three parameters only. What can I do?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Limited Number of Parameters
Collapse
X
-
Limited Number of Parameters
Hello,
I'm developing an indicator and I've just added another property parameter to my code. The software works fine with the initial value assigned to this new parameter. But, for some reason, it doesn't appear in the parameter list when I open the indicator. Notice that deleting any other parameter from my script, then, it appears in the indicator GUI. I've tried any combination, changed names, etc. but nothing worked for me. I need only four parameters in my indicator but it looks like my system is limiting me to three parameters only. What can I do?Tags: None
-
Hello,
Below you can see the variables region from my script as well as my Properties region.
I hope you could figure out what the problem is.
Thank you for your help.
#region Variables
// parameter variables
// ======================
private int minimumNumberOfBarsToDrawAline = 15;
private int numberOfBackBarsToAnalize = 40;
private bool plotHistory = true;
private bool plotIndicator = true;
// User defined variables
// ======================
// Point parameters
private DataSeries X;
private DataSeries Y;
private DataSeries S; // line slope
private DataSeries Tag;
private DataSeries LineStatus;
// LineStatus possible values:
private const double CONNECT_POINTS = 1.0;
private const double CONNECT_NONE = 2.0;
private const double CONNECT_UNDEF = 3.0;
private const double VALID_LINE = 4.0;
private double TagIndex;
private int ii;
private int jj;
private bool PointsMustBeBelowTheLine;
private bool PointsMustBeAboveTheLine;
private double b;
private double YOnTheLine;
#endregion
#region Properties
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
[Description("")]
[GridCategory("Parameters")]
public int NumberOfBackBarsToAnalize
{
get { return numberOfBackBarsToAnalize; }
set { numberOfBackBarsToAnalize = Math.Max(2, value); }
}
[Description("")]
[GridCategory("Parameters")]
public int MinimumNumberOfBarsToDrawAline
{
get { return minimumNumberOfBarsToDrawAline; }
set { minimumNumberOfBarsToDrawAline = Math.Max(3, value); }
}
[GridCategory("Parameters")]
public bool PlotHistory
{
get { return plotHistory; }
set { plotHistory = value; }
}
[GridCategory("Parameters")]
public bool PlotIndicator
{
get { return plotIndicator; }
set { plotIndicator = value; }
}
#endregion
Comment
-
Remove this line:
That is preventing your first one to not show. You have removed the dataseries from the params section.Code:[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
Code:public DataSeries Plot0 { get { return Values[0]; } }
Comment
-
YES!!, you are right, everything is working fine now.
By the way, I've intentionally deleted the Plot0 parameter. I have no Add command in the Initialize method.
The indicator receives the data from the graph where it is applied.
I know it's not the general way you explain how to use NinjaScript, but it works fine and all the commands in my script refers to the default input.
Do you think this method can be problematic in some way?
Thanks a lot for your help.
Carlos
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
596 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
554 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment