Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How is strategy id assigned?

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

    How is strategy id assigned?

    How is strategy id calculated and assigned? In which case does the strategy id change? whenever the source code is compiled, the strategy is applied to the chart, reloaded, the strategy parameters are modified, underlying instrument is changed, etc.?

    #2
    Hello Clearpicks,

    Thank you for your post.

    The Strategy ID is created when the strategy is added to a chart or via Strategies tab. This is generated and stored for the database local to the PC for NinjaTrader. This allows the account performance to track orders placed via the strategy ID and see the information available for them.

    This ID does not change. It is assigned once and that is it. Once the strategy is removed or deleted, that ID is not used again but will remain in the database unless it is reset or renamed.

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hello,
      I would like to use Strategy ID as a variable in my NinjaScript. How can it be obtained? Thank you in advance.

      Comment


        #4
        Hello InteRadek,

        You would use this.Id.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        61 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        149 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X