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 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 02-21-2007, 03:05 AM   #1
ThePatientOne
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I've tried following the directions in the help file for securely distributing custom indicators but the .cs file that I am supposed to distribute with the DLL that was created is CLEAR TEXT. What is the purpose of generating the DLL if you must still distribute the clear text version of the custom code?

Am I missing something?

Here are the steps I performed:

1) Created a text file named NinjaTrader.myname.cs in .\Custom\Indicators

2) Copied all of the text from the NinjaScript Editor (excl. declarations) for each custom indicator into this text file and saved it.

3) Opened this vendor file in the NinjaScript Editor and compiled it.

4) Renamed the DLL in .\Custom to NinjaTrader.myname.dll as instructed.

Now what?How do I secure my code?

Thank you.
ThePatientOne is offline  
Reply With Quote
Old 02-21-2007, 04:58 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

The cs file you distribute is just a wrapper to your custom indicators. It needs to be clear text. Your actual indicator code is compiled into the DLL and is as safe or unsafe as any other compiled .NET code is.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 02-21-2007, 06:42 AM   #3
ThePatientOne
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Is the compiling of the Vendor file supposed to change the NinjaTrader.myname.cs file to make it into a stub?

All of my original source code remains in the file.

Thanks again.
ThePatientOne is offline  
Reply With Quote
Old 02-21-2007, 06:51 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

What do you mean by stub?

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 02-21-2007, 09:08 AM   #5
ThePatientOne
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Sorry ... meant the wrapper functions


ThePatientOne is offline  
Reply With Quote
Old 02-21-2007, 09:23 AM   #6
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Post imported post

The Vendor file contains wrapper methods that get added to the Strategy and Indicator classes.

So if your custom strategy name is MyStrategy, when compiled with a Vendor file, the consuming user will be able to call from within their indicator, MyStrategy(). The actual indicator logic is contained in the DLL.

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 02-22-2007, 12:39 AM   #7
ThePatientOne
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Can I place multiple indicators in one Vendor file? Do indicators and strategies need to be placed into separate Vendor files?

Thank you.
ThePatientOne is offline  
Reply With Quote
Old 02-22-2007, 12:49 AM   #8
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Post imported post

Yes, they can be contained in one Vendor file.
NinjaTrader_Dierk is offline  
Reply With Quote
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


All times are GMT -6. The time now is 10:00 PM.