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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
476 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
317 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
254 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
340 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
306 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment