Unfortunately I wouldn't be able to say why that may be null, that is not a documented property on the Account object so it may not be intended to be used in NinjaScript but only in specific internal uses.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Access Instrument Commission from Ninjascript NT8
Collapse
X
-
timcjpfx, What happens is that the account associated with the strategy does not have a commission defined. Edit the account you are using to run the strategy, and assign a commission to it, and you will see that your code works that way. To avoid this problem, put a conditional in your code where you ask if the variable is not null so that the value assignment can proceed; otherwise, you can pass the value zero to the variable.
This answer is a bit late, but I'm just getting into the world of NinjaScript. I hope you were able to solve it in due time.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
44 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
54 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
34 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
95 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
57 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment