Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

VendorLicense

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

    VendorLicense

    Hi,
    part of my code is still running despite the VendorLicense being invalid. Because of what I'm doing that is causing many identical log messages.
    Can I use VerifyVendorLicense() to know if the license is valid? And if so, does this unnecessarily force a new internet search for the license on your servers and thus take time, or is it a local check because the VendorLicense() method has already been run?

    Thanks,
    saltminer

    #2
    Hello saltminer,

    Thank you for your post.

    So I may investigate the code running after the VendorLicense() check can you advise the following?
    • Where is the VendorLicense() function called in your code?
      • Is it set like the following?
        namespace NinjaTrader.NinjaScript.Indicators
        {
        public class VendorLicenseExample : Indicator
        {
        public VendorLicenseExample()
        {
        VendorLicense("MyCompanyName", "MyModule", "www.my-url.com", "[email protected]", null);
        }
    • What code is running?
      • In what function/method(s) are you seeing the code run?
        • Example: OnBarUpdate()
      • How did you verify the code is running?

    There is no function or callback that you can use to verify VendorLicense(). There is also no means to re-run VendorLicense() through code.

    I look forward to assisting you further.

    Comment


      #3
      Hi Patrick,
      yes, the VendorLicense code is as you've described in the prior post, seen here with details changed to generic...

      public class theindicator: Indicator
      {

      public theindicator()
      {
      {
      VendorLicense("vendor", "license", "url", "email");
      }
      }



      I can tell that the code is running because part of what it does is to do a loop to load varying instances of this same indicator to obtain values. I get a new log message for each instance! (see attachment). I get only one popup dialogue window though (thank goodness).
      The code that creates the varying instances runs from OnBarUpdate, when the CurrentBar is near the final bar. So my presumption is that the code MUST still be running somehow even though the license is not valid.

      saltminer

      Click image for larger version

Name:	MultipleLogMessages.PNG
Views:	421
Size:	91.8 KB
ID:	1083010
      Attached Files

      Comment


        #4
        Hello saltminer,

        I can tell that the code is running because part of what it does is to do a loop to load varying instances of this same indicator to obtain values
        ...
        The code that creates the varying instances runs from OnBarUpdate, when the CurrentBar is near the final bar. So my presumption is that the code MUST still be running somehow even though the license is not valid.
        How are you creating the instances of the indicators? Are you using the standard indicator system where you just call the indicator but do not actually create an instance? For example: double value = SMA(12)[0]; or are you creating your own instances with the new keyword?


        So my presumption is that the code MUST still be running somehow even though the license is not valid.
        We would likely need a specific sample in this case to see what code was being used, if you can make a test which demonstrates the problem we can investigate this further. I wouldn't need to see your indicators calculation logic, just a sample that includes the vendor licensing and general structure/loop you mentioned showing how the instances are used. You can form a completely new empty sample so long as it reproduces the problem.

        Regarding VerifyVendorLicense, this is not currently documented so I would not be able to provide any detail about this method in this case.


        I look forward to being of further assistance.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Hi guys,
          I am creating my instances of "TheIndicator" (not its real name) in this manner...

          var indicator = TheIndicator(Inputs[0],....);

          So no, I'm not using new

          Actually I have realised the problem is slightly different to as I have described (I do apologise) (grovel grovel)
          What is happening is that I am getting a new log entry for every indicator that is within a free trial period. So loading the indicator once creates hundreds of log messages. This will freak out users, and it certainly slows things down markedly. I will have to pull the free-trial version from publication.
          Could you possibly modify the behaviour of NinjaTrader 8 such that the entries of log messages of free trials follow the same behaviour as the popup warning, which is to do only one?

          saltminer
          Last edited by saltminer; 01-07-2020, 08:54 PM.

          Comment


            #6
            Hello saltminer,

            I can forward a feature request for the behavior you desire.

            I will follow up here when I have a tracking ID for the request.

            Comment


              #7

              Hello saltminer,

              The internal tracking number for your feature request is SFT-4551. Please reference this internal tracking number if you ever have questions regarding this feature request.

              When a feature request is implemented, you'll find it in the release notes: http://ninjatrader.com/support/helpG...ease_notes.htm

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by junkone, Today, 11:37 AM
              0 responses
              1 view
              0 likes
              Last Post junkone
              by junkone
               
              Started by quantismo, 04-17-2024, 05:13 PM
              5 responses
              34 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by proptrade13, Today, 11:06 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by love2code2trade, 04-17-2024, 01:45 PM
              4 responses
              34 views
              0 likes
              Last Post love2code2trade  
              Started by cls71, Today, 04:45 AM
              2 responses
              10 views
              0 likes
              Last Post eDanny
              by eDanny
               
              Working...
              X