Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Are user defined IDs always generatedby suffixing with a minus?

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

    Are user defined IDs always generatedby suffixing with a minus?

    Hello,
    I have a question concerning the assignment of user defined IDs in the menu "Help" -> “3rd partylicensing…”. Is it always the case that the generated new machine ID has the form original machine ID + minus-sign + user defined ID ?

    We want to provide our customers with a customer ID after they purchase our indicator, so they can use this customer ID for generating a unique machine ID. But we also have to keep track of all generated IDs, which would be easier if the outcome of the generation process is predictable.
    Thanks in advance,
    Johannes Neubarth

    #2
    That's correct Johannes, that would be covered as well in section 10 of the Vendor License guide you should have received via email - if not please let us know at support at ninjatrader dot com.

    Thanks,

    Comment


      #3
      Thank you Bertrand. Yes I have read section 10 of the License Guide, but wanted to double-check, because it's crucial as we are designing and implementing our purchasal process now.
      Johannes Neubarth

      Comment


        #4
        Originally posted by SentiTrade View Post
        Is it always the case that the generated new machine ID has the form original machine ID + minus-sign + user defined ID ?
        Is there a way to determine what the "User defined Id" is via ninjascript?

        I realize that you can access NinjaTrader.Cbi.License.MachineId from code, but this only gets the MachineId, without the User Defined Id.

        I didn't see any likely suspects within NinjaTrader.Cbi.License.

        Thanks!
        Daniel

        Comment


          #5
          There is not a property for the user defined ID that you can access directly.

          You would need to read this from the Documents\NinjaTrader 7\config.xml file
          MatthewNinjaTrader Product Management

          Comment


            #6
            For everyone who is interested, I'm pasting below the code we are using for retrieving the user-defined machine ID. Beware: No guarantee for correctness! :-)
            Plus, the code must be adapted whenever the structure of the NT config file changes.


            Code:
            using System.Xml;
            
            string machineId = Cbi.License.MachineId;
            XmlElement nt = Cbi.Globals.ConfigFile["NinjaTrader"];
            XmlElement vl = nt != null ? nt["VendorLicenses"] : null;
            XmlElement st = vl != null ? vl["SentiTrade"] : null;
            XmlElement ui = st != null ? st["UserID"] : null;
            XmlNode fc = ui != null ? ui.FirstChild : null;
            string userSuffix = fc != null ? fc.Value : null;
            if (userSuffix != null) {
                machineId += "-" + userSuffix;
            }

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            111 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            59 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            38 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            41 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            78 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X