Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Collection

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

    Strategy Collection

    Is there a way to programmatically determine what charts a user has open and also determine what instruments the charts are using? I would also like to determine what strategies, if any, each chart is running.

    #2
    Hi scottreynolds,

    There is no way to access which charts are open, or find out if there are strategies running.

    You can access the interval type and value using BarsPeriod. This shows what interval is used only where the script is currently applied.


    There is Id for the interval type and Value for the interval value.

    For instrument there is this class and available properties:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by scottreynolds View Post
      Is there a way to programmatically determine what charts a user has open and also determine what instruments the charts are using? I would also like to determine what strategies, if any, each chart is running.
      You can make the strategy post that information to the OutputWindow or an external text file.

      Comment


        #4
        As a vendor, I would like to be able to control the number of contracts a user can run for a strategy. The strategy could limit the number but the user simply has to open another chart and run the same strategy to defeat the limitation. Is there a way to handle this?

        Comment


          #5
          There are no supported NinjaScript items for solving this. There may be some things you can do in C#, like mutex. See this thread for possible ideas:
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          666 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          377 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          110 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          575 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          580 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X