Quote from julian0625:
lol thanks man
Before your start accepting your platitudes for building an ATS, I imagine this forward testing period is going to be pretty educational for you
As far as I'm concerned, you have programmed a backtrading strategy, but it's not a full-blown ATS just yet. There's a lot of things you're going to learn over the course of trying to get this to stay up-and-running 24x7, which I guess is what your strategy will rely on. If you don't have any white hairs yet, you will by the time you're done at the ripe old age of 16
For example: data feed goes down 5 times? NT will disable your strategy. Happened to me. What if the internet connection goes down just before you're about to exit a position? Happened to me. At 1am in the morning while trading the DAX. What if your order gets rejected by the exchange for some mysterious reason? Happened to me. What if you place a stop limit order (possibly with limit orders as well) and the price drops down below your limit price just as you send the order? NT will throw an exception, and the strategy will get disabled. Happened to me. What if you start trading multiple contracts, and you only get filled on some of the contracts? Does your code make sure it to keep track of the number of filled contracts, and not trade based on the number of expected contracts? Because if you buy 1 contract and then sell 2, you'll be in a net short position. Etc, etc, etc.
You'll learn that there are many, many ways in which your strategy will fail due to external factors, and you'll need to account for all of these. This can't be simulated through backtesting, and not even thru sim-testing.
You'll have to be sitting in front of the computer while it's trading and making sure that you handle all exceptions. You'll also need extremely good logging to make sure that you can figure what happens if things do go wrong. I added code that will email me the results of trades that I run when I'm not around, so that I'm not sitting around wondering WTF happened.
There's *a lot* of exception handling related to trades and order management that you will need to handle in order for you to be able to sleep at night or even leave your computer to relieve yourself. Once you start trading for real, one bug in your trade management, and you could lose your shirt.
This is why I keep my trading simple. I never hold positions overnight and I keep most of my trading confined to the first 3 hours of the market being open. I've traded HSI and DAX and for those I'm either at work or sleeping, but I've thoroughly tested those and for the most part I've worked out the bugs.
So like I said, creating a backtesting strategy is about 1/5th of the journey. The rest is adding the exception handling and boundary conditions that will keep you from going broke because of a trade gone awry!
But it will be a great learning experience, nonetheless!
