PDA

View Full Version : Secure distribution of custom Indicators and Strategies


ThePatientOne
02-21-2007, 04:05 AM
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.

NinjaTrader_Dierk
02-21-2007, 05:58 AM
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.

ThePatientOne
02-21-2007, 07:42 AM
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.

NinjaTrader_Ray
02-21-2007, 07:51 AM
What do you mean by stub?

Ray

ThePatientOne
02-21-2007, 10:08 AM
Sorry ... meant the wrapper functions

NinjaTrader_Ray
02-21-2007, 10:23 AM
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

ThePatientOne
02-22-2007, 01:39 AM
Can I place multiple indicators in one Vendor file? Do indicators and strategies need to be placed into separate Vendor files?

Thank you.

NinjaTrader_Dierk
02-22-2007, 01:49 AM
Yes, they can be contained in one Vendor file.