Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Name Strategy Parameters
Collapse
X
-
Name Strategy Parameters
I have a strategy that is code locked that has spaces in the names of the parameters, such as "Trigger EMA" or "Number of Bars". How are they able to do that, since when creating a variable in the code, you can't use spaces? I would like use names with spaces in my strategy.
Thanks.Tags: None
-
I'm not sure exactly how it's represented, but you can take a look at the wizard generated code to see... unlock the code, and then look at the bottom of the generated file.Originally posted by lawyse View PostI have a strategy that is code locked that has spaces in the names of the parameters, such as "Trigger EMA" or "Number of Bars". How are they able to do that, since when creating a variable in the code, you can't use spaces? I would like use names with spaces in my strategy.
Thanks.
There's a region (almost invisible text) called "Properties"; click on the 'plus' sign to expand it. There are the parameters available for your strategy. However they represent spaces there, I'd imagine you can copy it by hand in your own code.
Comment
-
Here is some of the code... I am not using the wizard. At the bottom are my parameters, like 15 of them...
There is a description and a category, but I don't see a place for the "name." Any more ideas?
[Description("")]
[Category("Parameters")]
publicint BOBs
{
get { return bOBs; }
set { bOBs = Math.Max(1, value); }
}
[Description("")]
[Category("Parameters")]
publicdouble EntryAdjust
{
get { return entryAdjust; }
set { entryAdjust = Math.Max(-100, value); }
}
Comment
-
Is this from the code that you said already had spaces? If so... beats me, I'm baffled.Originally posted by lawyse View Post[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]Here is some of the code... I am not using the wizard. At the bottom are my parameters, like 15 of them...
There is a description and a category, but I don't see a place for the "name." Any more ideas?
Comment
-
Hi,
Here is some code snippet demonstrating how to change the display to allow spaces, unfortunately we can not support it though...
Code:[Description("Plots the entry prices")] [Category("Plots")] [Gui.Design.DisplayName("Draw Entry Price")] public bool DrawEntries { get { return showentries; } set { showentries = value; } }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
576 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment