Protecting code - NinjaTrader Programming | futures io social day trading
futures io futures trading


Protecting code
Updated: Views / Replies:11,802 / 30
Created: by sam028 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you dont need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Protecting code

  #11 (permalink)
Elite Member
USA
 
Futures Experience: Master
Platform: NinjaTrader
 
caprica's Avatar
 
Posts: 155 since Jul 2009
Thanks: 45 given, 109 received

hi nice thread i am also interested to hear what problems exist with remotesoft method can you give us a hint.

"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

Reply With Quote
 
  #12 (permalink)
Elite Member
Europe
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 73 since Jun 2009
Thanks: 11 given, 52 received

guys, please respect that i am not going to hint at what the problem is, im pretty sure there are enough clever people reading this forum who would figure out how to bypass the protection of many commercial addon packages pretty quickly.
Actually i had the impression the weak spot is well known as i was pointed at it by a friend.

In a nutshell, id rather avoid the recommended solution by NT.

appreciate the comment about the obfuscator. If anyone has any other recommendations regarding code protection and license management, please shout

Reply With Quote
 
  #13 (permalink)
Elite Member
Austin, TX
 
Futures Experience: Advanced
Platform: NT/Matlab
Broker/Data: Interactive Brokers
Favorite Futures: FX majors
 
sefstrat's Avatar
 
Posts: 285 since Jun 2009
Thanks: 20 given, 749 received


Aside from the fact that it is rather easy to bypass (read: get back the original unencrypted IL code which you can then easily convert to c# code) it presents a number of problems arising from the way in which it works.

Basically it uses low level hooks to bypass the MS JIT compiler and insert its own modified JIT compiler which knows how to reconstruct the IL code from the encrypted version that is stored in the native assemblies it creates when you protect your code.

Problems arise because their modified JIT compiler is not 100% compliant with the latest version of MS JIT compiler, so some things that are valid c# code will not work correctly as you would expect them to. I pointed out one such issue in a thread here related to casting of string types, where remotesoft compiler forces you to use .ToString() when you shouldn't need to. Also if MS changes their JIT compiler (as they did substantially with .NET 3.5) then remotesoft will have to change theirs and your code can potentially break and have to be redeployed and you are stuck waiting on remotesoft and telling your users not to upgrade their .net framework.

Another problem is that it makes it difficult to debug any code that is protected, ie you cannot debug it in visual studio and it obscures the true source of exceptions making it hard to report bugs (although that is true of pretty much any protection method).

So basically it gives you problems and not much protection. Yes it does stop decompilation with reflector but you could do the same thing with a simple obfuscator. If you use control flow obfuscation you also get the benefit that if someone does try to reverse engineer the IL code it will be mangled and difficult to reconstruct, whereas with remotesoft once you have obtained the decrypted IL it is unobfuscated and easily converted to the original c#.

As far as bypassing protection (aka cracking), that is trivial and there is pretty much no way to stop it even with unmanaged code. What I am concerned with is decompilation of the code where people can steal your code/ideas etc..


caprica View Post
hi nice thread i am also interested to hear what problems exist with remotesoft method can you give us a hint.



Last edited by sefstrat; September 1st, 2009 at 12:55 AM.
Reply With Quote
 
  #14 (permalink)
Just starting out...
weston
 
Futures Experience: Advanced
Platform: Ninjatrader
Broker/Data: Fxdd
Favorite Futures: eur/usd
 
Posts: 2 since Jan 2010
Thanks: 0 given, 0 received

This is a very interesting thread, but I have to admit, you guys all know a lot more than I do. I have written a few indicators in Ninjatrader and would like to share them with some people (I may actually sell them). But I don't want my code to be given away, and I don't want people to be able to share with everyone.

I would just like a simple easy and preferably cheap way to do this. I know it is impossible to stop everyone, but I just need a way to limit, or make it difficult.

If I export it as compiled assembly, then run an obfuscator on it, that would not stop people from sharing it, or even posting it on a forum would it? So how do you stop that?

Thanks
David

P.S. Sorry, like I said, I don't know much about this stuff.

Reply With Quote
 
  #15 (permalink)
Membership Revoked
wny
 
Futures Experience: Intermediate
Platform: ninja, excel
Favorite Futures: YM, equities
 
darthtrader3.6's Avatar
 
Posts: 86 since Jan 2010
Thanks: 6 given, 46 received

Honestly, I would question how smart of business it is to lock the code for NT stuff.
I've found some interesting commercial stuff but once I found out it was locked it became literally worthless to me. A huge reason people use NT is to integrate stuff into their own custom setups, if I can't modify something to fit my needs then its worthless.
While you would run the risk of someone copying your idea, you run a greater risk of losing customers period.

Reply With Quote
 
  #16 (permalink)
Elite Member
Austin, TX
 
Futures Experience: Advanced
Platform: NT/Matlab
Broker/Data: Interactive Brokers
Favorite Futures: FX majors
 
sefstrat's Avatar
 
Posts: 285 since Jun 2009
Thanks: 20 given, 749 received


davidw View Post
This is a very interesting thread, but I have to admit, you guys all know a lot more than I do. I have written a few indicators in Ninjatrader and would like to share them with some people (I may actually sell them). But I don't want my code to be given away, and I don't want people to be able to share with everyone.

I would just like a simple easy and preferably cheap way to do this. I know it is impossible to stop everyone, but I just need a way to limit, or make it difficult.

If I export it as compiled assembly, then run an obfuscator on it, that would not stop people from sharing it, or even posting it on a forum would it? So how do you stop that?

Thanks
David

P.S. Sorry, like I said, I don't know much about this stuff.

You can tie it to their hardware somehow, ie the way ninjatrader does with machineID.. except their system is weak because it only enforces the machineID on the server side, a stronger but more tedious solution would be to enforce machineID in the actual binary file.

In other words you generate a seperate dll file for every user which has their unique machineID encrypted in it. That will stop most people from being able to share it..

Reply With Quote
 
  #17 (permalink)
Trading for Fun
Dallas TX/USA
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: AMP/CQG
Favorite Futures: ES
 
Posts: 154 since Jun 2009
Thanks: 33 given, 281 received


sefstrat View Post
In other words you generate a seperate dll file for every user which has their unique machineID encrypted in it. That will stop most people from being able to share it..

That's been my standard suggestion to people as well. A determined person will always be able to hack client-side code. Since the client machine must be able to run the code, the machine owner can always intercept it. So if you don't want the important code to run on a secure server that you own, you might as well just take minimal steps to keep casual "sharers" from succeeding and not waste much more effort.

Reply With Quote
 
  #18 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,573 given, 3,982 received


darthtrader3.6 View Post
Honestly, I would question how smart of business it is to lock the code for NT stuff...

The answer is quite simple.
If most users were able to see (and understand) what's really in all these "magic"/expensive indicators, would they buy them ?
No, they won't...
Paying high prices for them gives to these indicators/strategies some kind of super-power. A basic marketing principle: "if it's expensive, it's good...".

Success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:
 
  #19 (permalink)
Just starting out...
weston
 
Futures Experience: Advanced
Platform: Ninjatrader
Broker/Data: Fxdd
Favorite Futures: eur/usd
 
Posts: 2 since Jan 2010
Thanks: 0 given, 0 received


sefstrat View Post

In other words you generate a seperate dll file for every user which has their unique machineID encrypted in it. That will stop most people from being able to share it..

That sounds good enough to me... can you point me in the direction to figure out how to do that?

Thanks

Reply With Quote
 
  #20 (permalink)
Member
California
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 87 since Jun 2009
Thanks: 5 given, 119 received


Personally, I wouldn't pay anything for something I can't get the source to. Goes double for strategies - they're going to be obsolete in a few months anyway and if they're untweakable then they're useless. I'd feel much better about going back to some coder that had given me well thought out, fully commented source. In fact, i'd pay a premium for it... not that i'm going to pay someone to write code for me anyway ;-)

i'm not sure why people are so concerned about other people learning about their strategy ideas. surely if your strategy is so good, you should keep it to yourself and print yourself a mint. any strategy that's for sale is obviously not good enough to make the inventors a ton of money, either that or you're getting the version that lags by 1/2 bar and they're skimming off you, TWICE!

Reply With Quote
The following 4 users say Thank You to piersh for this post:

Reply



futures io > > > > > Protecting code

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Common code re-use LostTrader NinjaTrader Programming 12 October 5th, 2011 06:50 PM
Protecting Your Retirement Portfolio Against Inflation Quick Summary News and Current Events 0 April 25th, 2011 07:20 PM
Can someone code this ? skyfly NinjaTrader Programming 8 April 25th, 2011 01:40 PM
Help with code error kashter NinjaTrader Programming 10 March 8th, 2011 12:16 PM
Protecting the cumulative profit target in an automated strategy nanobiotech NinjaTrader Programming 4 April 1st, 2010 12:24 PM


All times are GMT -4. The time now is 10:54 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.13 seconds with 19 queries on phoenix via your IP 54.90.207.75