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 argusthome, Yesterday, 10:06 AM
        0 responses
        17 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        16 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        9 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        36 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X