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

Protecting Custom Bars

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

    Protecting Custom Bars

    I have a custom bar type which I would like to protect as follows:
    1. The custom bar type will be shipped in a securely compiled assembly also containing a "helper" indicator (HelperIndicator) that has a call to the VendorLicense() method in its Initialize() method.
    2. If HelperIndicator's VendorLicense check passes OK, a public property of the "helper" indicator, LicensedOk, will be set to TRUE.
    3. The custom bar type needs to be able to check the value of this public property of HelperIndicator. I am approaching this as follows:
      • Add reference in the custom bar to NinjaTrader.cbi.
      • Add the following variable in the custom bar:
        Code:
         private NinjaTrader.Indicator.IndicatorBase _helper = null;
      • Add a firstline within the Add() method of the custom bars, something along the lines of .
        Code:
        (NinjaTrader.Indicator.IndicatorBase) _helper = NinjaTrader.Indicator.IndicatorBase.HelperIndicator.;
        , and then check value of _helper.LicensedOk

        ... etc ...


    However, I am getting a compilation error...
    NinjaTrader.Indicator.IndicatorBase does not contain a definition for HelperIndicator ...
    Grateful for any help you can give me to resolve this. Thanks.
    Last edited by AnotherTrader; 04-28-2014, 07:36 AM.

    #2
    Hello AnotherTrader,

    You may not want to call "NinjaTrader.Indicator.IndicatorBase" but the name of your Indicator itself for example if you Indicator's name is "HelperIndicator" you may want to try to declare your variable like:

    NinjaTrader.Indicator.HelperIndicator _helper = null;

    Then try to use this variable normally.

    Please keep in mind that the VendorLicense() method is not designed to be used inside of a Custom Bar Type since it is not supported so I am not sure that you are going to get your desired results. Typically, custom bar types will need to be checked with a custom method.

    Let me know if that resolves your compile issues.
    JCNinjaTrader Customer Service

    Comment


      #3
      Originally posted by AnotherTrader View Post
      I have a custom bar type which I would like to protect as follows:
      1. The custom bar type will be shipped in a securely compiled assembly also containing a "helper" indicator (HelperIndicator) that has a call to the VendorLicense() method in its Initialize() method.
      2. If HelperIndicator's VendorLicense check passes OK, a public property of the "helper" indicator, LicensedOk, will be set to TRUE.
      3. The custom bar type needs to be able to check the value of this public property of HelperIndicator. I am approaching this as follows:
        • Add reference in the custom bar to NinjaTrader.cbi.
        • Add the following variable in the custom bar:
          Code:
           private NinjaTrader.Indicator.IndicatorBase _helper = null;
        • Add a firstline within the Add() method of the custom bars, something along the lines of .
          Code:
          (NinjaTrader.Indicator.IndicatorBase) _helper = NinjaTrader.Indicator.IndicatorBase.HelperIndicator.;
          , and then check value of _helper.LicensedOk

          ... etc ...



      However, I am getting a compilation error...

      Grateful for any help you can give me to resolve this. Thanks.
      Is this line written EXACTLY as you have it in the code?
      (NinjaTrader.Indicator.IndicatorBase) _helper = NinjaTrader.Indicator.IndicatorBase.HelperIndicato r.;
      If so, you have a spurious period at the end of the line, before the instruction terminator semi-colon.

      Comment


        #4
        Hi,

        The compile issues are fine now. But constructing the indicator doesn't seem to run the Initialize() method ...

        Can I go a step further and force the constructed indicator to run Initialize()?

        Thanks.

        Originally posted by NinjaTrader_JC View Post
        Hello AnotherTrader,

        You may not want to call "NinjaTrader.Indicator.IndicatorBase" but the name of your Indicator itself for example if you Indicator's name is "HelperIndicator" you may want to try to declare your variable like:

        NinjaTrader.Indicator.HelperIndicator _helper = null;

        Then try to use this variable normally.

        Please keep in mind that the VendorLicense() method is not designed to be used inside of a Custom Bar Type since it is not supported so I am not sure that you are going to get your desired results. Typically, custom bar types will need to be checked with a custom method.

        Let me know if that resolves your compile issues.

        Comment


          #5
          Hello AnotherTrader,

          Unfortunately, I am not aware of any way to force the Initialize() method to be force since it is protected.
          JCNinjaTrader Customer Service

          Comment


            #6
            Custom Bar Type

            What is the solution here? I am a vendor who needs to protect a custom bar type, whether it be through third party means or whatnot, I would like to know the solution, thanks.

            Comment


              #7
              Originally posted by Parkersking View Post
              What is the solution here? I am a vendor who needs to protect a custom bar type, whether it be through third party means or whatnot, I would like to know the solution, thanks.
              You will need to use a 3rd-party solution. Pretty much, the only other legal viable option would be to implement the barType as an indicator instead, and then protect that indicator. Something like how HeikenAshi is implemented in NT7.

              After all, it is just drawing of data, and it really does not matter from where you draw.

              Comment


                #8
                Thanks for your quick response. Any idea where to find a third party system to handle this type of thing?

                Comment


                  #9
                  Originally posted by Parkersking View Post
                  Thanks for your quick response. Any idea where to find a third party system to handle this type of thing?
                  There seems to be at least one site that seems to be claiming to be a NT Partner, but I could not find them in the EcoSystem when I looked. I cannot use NT property to advertise a non-NT affiliated entity. That means that you will probably have to make your own Google search, but I know for sure that they exist.

                  Comment


                    #10
                    Hi guys,

                    I have a licensing mechanism for custom bartype, with other options as well that might fit your needs. I'm in the process of creating a new website, as my is quite antiquated, so if you have any questions or would like details please email me directly [email protected]
                    mrlogik
                    NinjaTrader Ecosystem Vendor - Purelogik Trading

                    Comment


                      #11
                      please contact *removed*,
                      thanks you!
                      Last edited by NinjaTrader_Jesse; 10-26-2016, 06:54 AM. Reason: personal information, please us PM system

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by judysamnt7, 03-13-2023, 09:11 AM
                      4 responses
                      59 views
                      0 likes
                      Last Post DynamicTest  
                      Started by ScottWalsh, Today, 06:52 PM
                      4 responses
                      36 views
                      0 likes
                      Last Post ScottWalsh  
                      Started by olisav57, Today, 07:39 PM
                      0 responses
                      7 views
                      0 likes
                      Last Post olisav57  
                      Started by trilliantrader, Today, 03:01 PM
                      2 responses
                      22 views
                      0 likes
                      Last Post helpwanted  
                      Started by cre8able, Today, 07:24 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post cre8able  
                      Working...
                      X