Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to VerifyVendorLicense in Constructor in my class

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

    Trying to VerifyVendorLicense in Constructor in my class

    Hi,

    I have a class that I put in an Addon...

    I want to call the VerfiyVendorLicense in the constructor, but I am having no luck..

    here is psuedocode to illustrate my non-working attempt

    Code:
    public class WorkerAx1
    {
    public WorkerAx1(Indicator Indicator)
    		{
    			
    			(NinjaScript)Indicator.VerifyVendorLicense("MyVendorLicense", "productname", "website", "email");
    ...
    ...
    ...
    }
    
    ... functions and such...
    
    }
    Please tell me how to do this correctly.

    Thanks in advance.

    #2
    Hello KhaosTrader,

    Adding the vendor licensing to the constructor of the Addon would be correct.

    This doesn't appear to be its own actual addon but just a custom class, however.

    Are you receiving an error message?

    If so, what is the error message?

    Below is link to a sample starter addon.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      it is just a custom class, yes...

      actually i want to call VendorLicense

      I am getting error..... --> NinjaTrader.Cbi.VendorLicense is a "type" but is used like a variable...


      i did try to put this in the constructor of my class but got an error...

      Code:
      	VendorLicense  vl = new VendorLicense("VendorName", "ProductName", "website", "email");
      I got an error stating no constructor has 4 arguments..

      I am not sure how to use VendorLicense this way,, as when I use in the indicator I just put this line by itself and it works..

      Code:
       VendorLicense("VendorName", "ProductName", "website", "email");
      Last edited by KhaosTrader; 06-27-2017, 01:08 PM.

      Comment


        #4
        Hi KhaosTrader,

        Oh I see now:
        Code:
        (NinjaScript)Indicator.VerifyVendorLicense
        This is not going work.

        The NinjaTrader.VendorLicense class appears protected. I'm inquiring with our development to find out more.

        I appreciate your patience.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ok Standing by... Hopefully you can figure out a workaround or something..

          Comment


            #6
            Hi KhaosTrader,

            I haven't gotten a why on this yet, but.. the custom class is going to have to extend the AddonBase (or NinjaScriptBase). There doesn't seem to be a way around it.

            So, you can create a helper class that extends the AddonBase, and then create an instance of this class in your custom class, and use this instance to call VendorLicense().

            Michael in our product management modified one of my simple examples to add this in there.
            Attached Files
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi Chelsea,

              With the help of your AddOn I was able to integrate vendor license verification in my add-on.
              But how can I get and analyze the result of the license verification?
              I'd like to restrict to simulation accounts during free trials.

              Comment


                #8
                Hello ruppschtaler,

                Unfortunately, this information is not provided.

                Either the VendorLicense verifies or it does not. There are no properties returned that tell if verified due to trial and does not provide a property that shows when a purchased license will expire.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hello Chelsea,

                  I think it's crucial to know if a trial or a purchased license has been verified and would like to request this feature.

                  Thanks in advance!

                  Comment


                    #10
                    Hello ruppschtaler,

                    I've received a tracking ID for your request.

                    Your request for the VendorLicense() method to return the license type to be trial or full is being tracked with ID #SFT-3125.

                    Please note it is up to the NinjaTrader Development to consider if and when a request will be implemented.

                    Thank you for your feedback. Please let me know of any other suggestions you have for the NinjaTrader platform.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

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