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 NullPointStrategies, Today, 05:17 AM
|
0 responses
51 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
127 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment