Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

trial expiration on my code

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

    trial expiration on my code

    I have been working to try to send my custom indicator to a few friends but want to protect it by having an expiration date. I have used the following code successfully in my indicator:

    protected override void OnBarUpdate()
    {
    DateTime endDate = new DateTime(2012, 6, 30);
    if( DateTime.Now > endDate) {return;}
    }

    but when i try to put the same code into a bar type vs an indicator type, i can get it to compile, but it is inert. I am not using the OnBarUpdate command in my bar type code, so I need a little help from somebody, please.

    Thanks.

    zoom zoom

    #2
    Hello zoom zoom 126,
    Please make sure you have restarted NinjaTrader after you have compiled the BarType to make the code changes effective.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      I did close down and relaunched the platform and it does not work. I t does appear in the available bar types in the drop down menu and that bar type does work properly; however, when i put an expiration of (2012, 5, 21) in the code snippet i posted, it continues to plot the bars all the way through to the current date.
      Last edited by zoom zoom 126; 06-04-2012, 04:50 AM. Reason: i misspoke

      Comment


        #4
        zoom zoom, correct the custom bars type would not have an OnBarUpdate() section that would allow you to check the bars timestamp and pass or return out of it, for indicators or strategy scripts this should work normally.

        Unfortunately we cannot offer support for the creation or protection of custom bars types, however this is on our list for future consideration.

        Comment


          #5
          It wudda been nice to know this back on April 24 when I first asked the question – and now – 37 email exchanges later – ooops, sorry, we don’t have that capability.

          Thanks.

          PS Email support – although free – is very frustrating. IMHO.

          PPS -- How do other third party developers like RJay's Hybrid Renko Bars do this if it "isn't possible"?

          Comment


            #6
            Originally posted by zoom zoom 126 View Post
            PPS -- How do other third party developers like RJay's Hybrid Renko Bars do this if it "isn't possible"?
            Probably with their own code rather than Ninjascript.

            Comment


              #7
              zoom zoom, sorry for the frustration - can you please PM me the ticket # you worked with us under before?

              We support a powerful licensing scheme for custom indicators and strategies, unfortunately it would not cover custom bars types at this point. However development is aware of this request by our partners / 3rd party developers and we have added it to our product management feature tracking list for future consideration.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              576 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              334 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X