Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set flags for all instances of strategy

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

    Set flags for all instances of strategy

    Hello, is it possible to set a flag that can be read across all instances of a strategy?

    If I enable a strategy on one chart and a flag gets set, can another chart with the same strategy be enabled and read the flag of the other chart? Does that make sense?

    #2
    If that can’t happen, how do I create multiple start and stop times for a single strategy/chart to be enabled?

    Comment


      #3
      I’ve read I can do the first option through a static variable in my class, that can be read across all instances.?.

      Comment


        #4
        Hello ryjoga,

        It would be unsupported to do so, but you could use a static class variable to share the information between scripts.

        Below is a link to an example.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        30 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        48 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X