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 NullPointStrategies, Today, 05:17 AM
    0 responses
    52 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    70 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X