I would like to know if custom Strategies in NT8 operate all in the same AppDomain? I am wondering as I would like to know the behavior if I create a static field in an AddOn partial class Strategy. Will the static field hold the same value across all instances of my custom strategies ? Thank you.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategies in NT8 operate in the same AppDomain
Collapse
X
-
Strategies in NT8 operate in the same AppDomain
Hello,
I would like to know if custom Strategies in NT8 operate all in the same AppDomain? I am wondering as I would like to know the behavior if I create a static field in an AddOn partial class Strategy. Will the static field hold the same value across all instances of my custom strategies ? Thank you.Tags: None
-
Hello roblogic,
Thank you for your post.
Yes, they get compiled in the NinjaTrader.Custom.dll when open source or when it is included in an assembly.I would like to know if custom Strategies in NT8 operate all in the same AppDomain?
Static classes are possible, however please note that we generally advise against using them, as using a static property to share information between scripts could break during backtesting / optimization.I would like to know the behavior if I create a static field in an AddOn partial class Strategy.
That said, we do have an example script demonstrating static methods within a partial class. Please note static classes and methods are not officially supported:
Please let us know if you have any further questions.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
87 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
132 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
118 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment