Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies in NT8 operate in the same AppDomain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    Hello roblogic,

    Thank you for your post.

    I would like to know if custom Strategies in NT8 operate all in the same AppDomain?
    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 the behavior if I create a static field in an AddOn partial class Strategy.
    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.

    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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X