• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjascript to detect the same stratetgy running at the same time

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

    Ninjascript to detect the same stratetgy running at the same time

    If I have a strategy called "StratA", I can enable multiple instances of this strategy in the "Strategies" tab. Is there a way in NinjaScritp to check for multiple instances of "StratA" is enabled and running? If so, is there a way to prevent multiple instances from running?

    #2
    Hello hotsalami,

    Not with any supported methods..

    Each instance is separate and not designed to communicate.

    So, this would require static classes / properties and would be custom programming. If your static bool is true, one of the scripts is on. If that script turns off, then set the bool back to false.

    Below is a link to a forum post of an unsupported example with the code you need.
    https://ninjatrader.com/support/foru...245#post712245
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by billythekid72, Today, 09:47 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by JohnS52, Today, 09:49 AM
    0 responses
    6 views
    0 likes
    Last Post JohnS52
    by JohnS52
     
    Started by DTSSTS, Today, 08:29 AM
    2 responses
    19 views
    0 likes
    Last Post DTSSTS
    by DTSSTS
     
    Started by mtamaku, Today, 08:39 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Douglee, Today, 08:11 AM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X