Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GUID for each Strategy?

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

    GUID for each Strategy?

    Hi,

    Does NT7 assign a Globally unique ID of sorts (or at least internally unique). What I would like to do is distinguish between instances of each strategy possibly on the same chart with the same strategy name. I am sure I can create one upon Init() but would rather use one already assigned internally. Couldn't find anything in the manual..

    #2
    Hello NJA_MC,

    Yes, there is a unique identifier for each strategy instance. This is a C# structure so will not see it documented or supported. MSDN docs for this are available here.


    Unfortunately there is no supported way to access the internal GUID from a running strategy instance.

    For a quick way to generate unique ID, consider using our built in method:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Hello NJA_MC,

      Yes, there is a unique identifier for each strategy instance. This is a C# structure so will not see it documented or supported. MSDN docs for this are available here.


      Unfortunately there is no supported way to access the internal GUID from a running strategy instance.

      For a quick way to generate unique ID, consider using our built in method:
      http://www.ninjatrader.com/support/h...gyuniqueid.htm
      Hi,

      Tried the ATM one, can't be called in Init(). I think I may have found one for the Strategies. Looks like the variable "Id" is public. I will use that one, gets reset each run which is great.

      Comment


        #4
        Great you found what you are looking for. Thanks for updating this here, as others will likely find it useful.

        To generate unique IDs, best is OnStartup() handler for this:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        24 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        122 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        179 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        92 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        136 views
        0 likes
        Last Post cmoran13  
        Working...
        X