'myInput0' was created by the strategy wizard. it's not that I didn't try make the change.. when I tried to do the variable type change i got into code where wizard generated comments told me I should not be. I was scared off after trying to modity that off limits code and getting deeper and deeper into error messages. .
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how do I change strategy variable 'myInput0' from integer to double?
Collapse
X
-
how do I change strategy variable 'myInput0' from integer to double?
how do I change strategy variable 'myInput0' from integer to double?
'myInput0' was created by the strategy wizard. it's not that I didn't try make the change.. when I tried to do the variable type change i got into code where wizard generated comments told me I should not be. I was scared off after trying to modity that off limits code and getting deeper and deeper into error messages. .Tags: None
-
Hello joemiller,
Thanks for the information.
So there are going to be two places that you will need to change the variable type in.
The first is in the Variables region like you mentioned.
The second is the Properties section of the code after OnBarUpdate()Code:#region Variables // Wizard generated variables private double myInput0 = 1; // Default setting for MyInput0 // User defined variables (add any user defined variables below) #endregion
Code:protected override void OnBarUpdate() { // Condition set 1 } #region Properties [Description("")] [GridCategory("Parameters")] public double MyInput0 { get { return myInput0; } set { myInput0 = Math.Max(1, value); } }JCNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
68 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
39 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment