NexusFi: Find Your Edge


Home Menu

 





Protecting code


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one sefstrat with 8 posts (7 thanks)
    2. looks_two sam028 with 4 posts (1 thanks)
    3. looks_3 Richard with 4 posts (1 thanks)
    4. looks_4 toulouse-lautrec with 3 posts (0 thanks)
      Best Posters
    1. looks_one piersh with 4 thanks per post
    2. looks_two roonius with 1.5 thanks per post
    3. looks_3 sefstrat with 0.9 thanks per post
    4. looks_4 sam028 with 0.3 thanks per post
    1. trending_up 21,441 views
    2. thumb_up 18 thanks given
    3. group 16 followers
    1. forum 29 posts
    2. attach_file 0 attachments




 
Search this Thread

Protecting code

  #21 (permalink)
 
sefstrat's Avatar
 sefstrat 
Austin, TX
 
Experience: Advanced
Platform: NT/Matlab
Broker: Interactive Brokers
Trading: FX majors
Posts: 285 since Jun 2009
Thanks Given: 20
Thanks Received: 768


piersh View Post
any strategy that's for sale is obviously not good enough to make the inventors a ton of money

Well said.

I think usually the reason indicator/strategy salespeople want to hide their code is because customers would be infuriated if they could see the implementation. They would see instantly that they'd been duped.

Anything that is actually good and worth protecting would very likely have an implementation that few people would be able to understand anyways..

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
Battlestations: Show us your trading desks!
48 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #22 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


sefstrat View Post
I think usually the reason indicator/strategy salespeople want to hide their code is because customers would be infuriated if they could see the implementation. They would see instantly that they'd been duped.

... that reasoning doesn't really generalize out to nearly all commercial digital products, where companies attempt to control what you can and can't do with them. It's not always necessarily an attempt to "dupe" people. It's about money. The people that are additionally duping you are just scum.

Not to mention, the majority of duped people will have no programming knowledge, and would say "wow" at the code for an SMA anyway. So, I really can't agree with your reasoning.


Quoting 
Anything that is actually good and worth protecting would very likely have an implementation that few people would be able to understand anyways..

You don't have to understand it to cut and paste it into the public domain. I should know... I started releasing things in open-source form so that people could study and adapt it, and the next thing I know people are posting it all over the place against my explicit wishes. If I cared about making money from the indicators, I'd have pretty much no choice but to try to protect the code. It would have nothing to do with duping people.

Reply With Quote
The following user says Thank You to Richard for this post:
  #23 (permalink)
 
roonius's Avatar
 roonius   is a Vendor
 
Posts: 131 since Jun 2009
Thanks Given: 20
Thanks Received: 295



Richard View Post
... that reasoning doesn't really generalize out to nearly all commercial digital products, where companies attempt to control what you can and can't do with them. It's not always necessarily an attempt to "dupe" people. It's about money. The people that are additionally duping you are just scum.

Not to mention, the majority of duped people will have no programming knowledge, and would say "wow" at the code for an SMA anyway. So, I really can't agree with your reasoning.



You don't have to understand it to cut and paste it into the public domain. I should know... I started releasing things in open-source form so that people could study and adapt it, and the next thing I know people are posting it all over the place against my explicit wishes. If I cared about making money from the indicators, I'd have pretty much no choice but to try to protect the code. It would have nothing to do with duping people.


From my experience about 90% of commercial indicators are free indicators with hidden settings and colors and changed names.

Take a SMA, rename it into HolyGrailLine, change period setting to 43, add "cool" template with nice looking colors and sell it for $1500. I bet someone will buy it.
But don't forget to protect the code so it will be "harder" to figure it out that it is really SMA.

I am not telling that every commercial indicator is done that way.

From the other hand - if you really developped something "cool" and your product is really worth hacking, there simply no way to protect it... sooner or later it will be hacked.

Reply With Quote
The following 3 users say Thank You to roonius for this post:
  #24 (permalink)
 
sefstrat's Avatar
 sefstrat 
Austin, TX
 
Experience: Advanced
Platform: NT/Matlab
Broker: Interactive Brokers
Trading: FX majors
Posts: 285 since Jun 2009
Thanks Given: 20
Thanks Received: 768

Richard, I don't blame you for trying to protect your code, from what I've seen you are one of the few honorable indicator vendors who actually writes code and comes up with original ideas.

I was only making a generalization based on my experience which is like that of roonius, that most indicators are either repackaged open source code or extremely simple code masquerading as something complex. Most of them probably have 10x more time spent developing marketing material than the actual products themselves, sadly..

Reply With Quote
The following 3 users say Thank You to sefstrat for this post:
  #25 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


roonius View Post
From my experience about 90% of commercial indicators are free indicators with hidden settings and colors and changed names.

I'm not contesting that, but...


roonius
But don't forget to protect the code so it will be "harder" to figure it out that it is really SMA.

... this is the part that just doesn't match up with my experience. I've coded up stuff for a number of vendors, and not once has any of them told me they were concerned about people figuring out how simple their stuff was. What they all have been explicitly and persistently concerned about was keeping people from sharing their code without getting paid.

I think people with programming ability tend to project their knowledge onto the average consumer. In my experience, you could show consumer Joe the code for your "special" SMA, and even show them the standard Ninja SMA code for comparison. You might lose the customer, but it would be because of boredom and not outrage.


Quoting 
From the other hand - if you really developped something "cool" and your product is really worth hacking, there simply no way to protect it... sooner or later it will be hacked.

I agree with that, too, but at least for now you can still get plenty of honest people to pay even if a pirate version is out in the wild. In a few years, as children of the internet become the consumers, it will be interesting to see if that's still the case.

Reply With Quote
  #26 (permalink)
 
sefstrat's Avatar
 sefstrat 
Austin, TX
 
Experience: Advanced
Platform: NT/Matlab
Broker: Interactive Brokers
Trading: FX majors
Posts: 285 since Jun 2009
Thanks Given: 20
Thanks Received: 768


Richard View Post
I've coded up stuff for a number of vendors, and not once has any of them told me they were concerned about people figuring out how simple their stuff was. What they all have been explicitly and persistently concerned about was keeping people from sharing their code without getting paid.

I think people with programming ability tend to project their knowledge onto the average consumer. In my experience, you could show consumer Joe the code for your "special" SMA, and even show them the standard Ninja SMA code for comparison. You might lose the customer, but it would be because of boredom and not outrage.

True, however it only takes a few knowledgeable users to spread the word. Once word gets out on the various trading forums that some commercial indicator is a fraud or ripped from a free indicator or just not good or whatever, they are going to have a hard time finding customers.

Reply With Quote
  #27 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


sefstrat View Post
True, however it only takes a few knowledgeable users to spread the word. Once word gets out on the various trading forums that some commercial indicator is a fraud or ripped from a free indicator or just not good or whatever, they are going to have a hard time finding customers.

I respectfully disagree yet again, as many indicator consumers do not frequent trading forums. People such as yourselves are relatively sophisticated, but try to remember that many many people are not like you. A lot of my past customers breathed a sigh of relief if their computer came up properly and they didn't need any help making ninja start up. As a result, the wailing and gnashing of teeth that forum participants do against outright frauds don't usually give them that much trouble.

To put it another way: Remember the time that fraud was exposed on that forum and then they went out of business because they couldn't find customers? Yeah, neither do I.

Reply With Quote
  #28 (permalink)
 
spinnybobo's Avatar
 spinnybobo 
Crete, IL/USA
 
Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61


sefstrat View Post
managed interop is as simple as..

using System.Runtime.InteropServices;

then inside your class define method signature from c++ dll, for example:

[DllImport("myUnmanagedDll.dll")]
private static extern bool MethodName(float Open, float Close, float High, float Low, int dateStamp, out float var1, out float var2, out float var3);

then you can just call it like a normal managed method =)

But yeah if you are really interested in security then keep the sensitive parts on the server side, that is the only way to guarantee they can't be decrypted/deobfuscated. Then the only issue is latency but that is probably workable as long as you aren't doing very high frequency trades.


actually it is not this easy to call a custom .dll from another program via Interop because don't you first have to "register" it first with COM ?

once that is done I believe everything else is pretty easy. this is what I am trying to figure out in terms of making trading bridges between Ninja and other trading applications.

Follow me on Twitter Reply With Quote
  #29 (permalink)
 
Trajan's Avatar
 Trajan 
Chicago, IL
 
Experience: Beginner
Platform: NinjaTrader
Trading: WTI Crude
Posts: 3 since Jul 2014
Thanks Given: 5
Thanks Received: 1

Hi All,

Would anyone be able to provide some guidance as to how to implement using Machine ID's to lock an indicator to someone for use?

I'm not a vendor or anything but there might be an opportunity for me to program for some people at school who don't want to learn. Not a bad way for me to make some spare cash and actually get some good business experience.

At least some hints as to the proper keywords or areas for me to try and research would be really helpful.

Thanks a lot.

Reply With Quote
  #30 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,862


There are commercial products with a hardware USB dongle that are pretty 'ok' as a protection.
it gives the customer the ability to move from machine, change hardware without any problems
and he will only be able to run one instance at a time..

The usual obfuscators will not stop anybody from reverse engineering or decompiling the code.

If you link your software to the machine, you will have to be 'bothered' every time they change
the hardware, as the machine ID will change.

You might like this article :

Generating Unique Key (Finger Print) for a Computer for Licensing Purposes - CodeProject

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to rleplae for this post:





Last Updated on April 13, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts