'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.
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 trilliantrader, 04-18-2024, 08:16 AM
|
7 responses
27 views
0 likes
|
Last Post Today, 07:56 AM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
17 responses
64 views
0 likes
|
Last Post Today, 07:51 AM | ||
Started by rocketman7, Today, 02:12 AM
|
2 responses
17 views
0 likes
|
Last Post
by rocketman7
Today, 07:45 AM
|
||
Started by briansaul, Today, 05:31 AM
|
1 response
13 views
0 likes
|
Last Post Today, 07:36 AM | ||
Started by PaulMohn, Today, 03:49 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:36 AM |
Comment