![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
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.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
What do you mean by stub?
Ray
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
Sorry ... meant the wrapper functions
|
|
|
|
|
|
#6 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Feb 2007
Location: , ,
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
Can I place multiple indicators in one Vendor file? Do indicators and strategies need to be placed into separate Vendor files?
Thank you. |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Yes, they can be contained in one Vendor file.
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|