Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
It seems that C# code, just like Java, are quite easy to decompile.
C# is not as fast as some real compiled languages like C.
I'm trying to avoid/limit these drawbacks.
The idea is, for NT strategies, is to write the core of the strategy logic in an "harder to decompile" language, C++ for example, and let the NT C# indicators sending to the C++ program the needed data for taking the right decisions.
Questions:
- is this a silly idea ?
- does someone here has already played with something like this ?
I've started something, the C# coded strategy use a socket, to talk to a "strategy server", which send back to the NT strat what to do, but if somebody has already done this kind of job, well, I don't want to reinvent the wheel .
Can you help answer these questions from other members on NexusFi?
since you already use sockets to talk to that strategy server, you may think about placing startegy server remotely .... thus the local "strategy" on the client side would be just a dummy.
Disadvantage - latency, no offline operation, backtesting might not work....
advantage - since the core of the code is not present on the client side there might not be much to crack .... lol
Thx for answers.
@sefstrat: I'm a Unix/Linux guy, I have made a lot of socket and other IPC stuff, socket is much more easier for me than interop things (interop == 我愛奶酪和法國葡萄酒 for me, and I don't write/speak chinese ).
@toulouse-lautrec: my "strategy server" is already on another machine, so the client part can be decompiled, I don't care...
@bukkan: I've tested few obfuscators, but none were perfect, and I like the idea of having the core logic deported somewhere else.
Backtesting will not be possible, but as I don't really trust NT backtests, it's ok for me.
Latency does not seems to be a problem, because most of the data needed to decide what to do are already on the remote server.
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.
Thx sefstrat, I'll take a look at how to use managed interop, it can be useful in another context.
The strats I'm working on are not "high frequency", they are supposed to still profitable with a 800/1000 ms delay.
I've been working for a big bank, which was playing with "high frequency trading", this is another world...
I am currently also thinking of making some of my creations available to a some people, and would like to protect the code as effectively as possible.
The solution recommended by NT has some serious issues (which i am not going to discuss here), so if anyone has any recommendations (free or commercial) i would be very happy to hear about it.
I have spent some time browsing around and looking at solutions available, there seem to be many, which makes it not easy.
Any comments, also via PM, would be appreciated.
Don't waste your money on anything commercial, any .net protection can be reversed all the way back to IL code quite easily by someone who knows what they are doing.
Most secure way of course is to code all the important parts in c++, other than that obfuscation is your best bet.