Why not split the code up into different parts, and put each piece of code on a different machine on your local network? Each machine communicates with each other serially. I'm not an expert on networks and firewalls but you ensure that only one machine communicates with the internet and outside world, and this is the one that receives the incoming price data and sends out the buy and sell signals. It only computes the last piece of computation. The other machines are configured to only "talk" to each other, not the outside world, and only do the work necessary for their particular computation. So you have established this convoluted chain of machines (and quite deliberately so).
Surely a network engineer could set this up for a few thousand$? You hire them for a week or so (and then you shoot them in the back as they leave your home if you're really paranoid

) They don't need to see the code, they just set up the network for you. They show you how each component in the chain communicates with each other. The code is not in one piece, so for all intents and purposes you have an impenetrable chain. Each machine only receives the data that it requires for the next calculation, which it then forwards on to the next machine in the chain.
I'm not an IT expert so I might be talking out of my backside, but this seems to me a logical way to keep the code as safe as possible. As others have mentioned, you can convert some code into DLLs, use encryption at each step, use different operating systems on different machines, Linux etc and you basically put in as many obstacles as you can in to thwart any wannabee hacker. If they get past this convoluted chain of affairs, they probably deserve to see your code!
There might be some flaws in the above, since as I said, I'm NOT an IT expert, but maybe it gives you some ideas. Maybe others can point out the flaws in my proposal? It all falls down of course if your system is latency dependent, but if you can wait a few seconds or so before firing off buy and sell signals, the additional delay caused by the daisy chain doesn't matter.