Thanks!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
null to variable of type double
Collapse
X
-
null to variable of type double
I'm using Strategy Builder, how can I assign a null value to a variable of type double? Is that possible or is it only possible in NinjaScript Editor? How should I write the code to do that in the NinjaScript Editor?
Thanks!Tags: None
-
Hello daying35,
Thanks for your post.
In the Strategy Builder could consider assigning a value of 0 to your double variable in the Actions section of the Conditions and Actions screen. Otherwise, there are no Strategy Builder options for specifically setting a variable value to 'null'.
Note that double variables and int variables are considered non-nullable value types and cannot be set to 'null' specifically. If you were to try to assign a 'null' to a double variable, such as myDouble = null;, you would a compile error similar to the one below.
Error: 'Cannot convert null to 'double' because it is a non-nullable value type.'
Please let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
10 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
59 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
41 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
47 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
38 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Comment