NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 04-10-2012, 11:18 AM   #1
neoikon
Senior Member
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 119
Thanks: 44
Thanked 5 times in 4 posts
Default VendorLicense() stops OnBarUpdate() from being called

Hello,

I have a fairly large indicator (2000+ lines) that works great. Once I add the VendorLicense() line to Initialize(), things just stop working. One of which is that OnBarUpdate() never gets called.

I don't get a popup saying that it's not valid. I also changed the expiration date on my license to be expired (to try and trigger the popup) and still no popup.

I'm assuming that the VendorLicense() check is failing, so it's causing my indicator to stop functioning properly. Is there a chart property that I can check to tell if the licence check was successful or not?

Thanks!
Daniel
neoikon is offline  
Reply With Quote
Old 04-10-2012, 11:25 AM   #2
neoikon
Senior Member
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 119
Thanks: 44
Thanked 5 times in 4 posts
Default

Also, when looking at the "best practices for 3rd party developers", it mentions "A license check should only be performed once and maintain its check state." I'm assuming it means once in Initialize(), but how do we "maintain its check state" if VendorLicense() doesn't return anything (is void)?

It also mentions, "A license check should have a time out in case of internet issues. This ensures that NinjaTrader does not lock up." Can someone provide a code snip for this?

In this same document, in the "clean up your resources" section, it references the Dispose() function. I thought that we should be using OnTermination() instead, correct?

Thanks,
Daniel
neoikon is offline  
Reply With Quote
Old 04-10-2012, 12:00 PM   #3
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,781
Thanks: 159
Thanked 565 times in 556 posts
Default

Hello,

Thanks for your post.

Can you please email us at support[at]ninjatrader[dot]com and a reference to this thread.

We will need to review some of your private partner details such as vendor name, license key and an example of your vendor license call.

Thanks in advanced!
NinjaTrader_Matthew is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Matthew for this post:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OnBarUpdate is not getting called saltminer Strategy Development 10 12-20-2012 07:52 AM
Initialize() called more than once before OnBarUpdate()? aascotty Strategy Development 4 02-19-2010 04:21 AM
Indicator for last bar not drawing (OnBarUpdate not called) Anagoge Indicator Development 1 09-21-2008 02:29 PM
Indicator's OnBarUpdate() is called twice mgbloomfield Automated Trading 1 04-20-2008 12:07 AM
OnBarUpdate() - never seems to be called? altrader Miscellaneous Support 5 03-10-2008 07:09 AM


All times are GMT -6. The time now is 05:41 AM.