Is automating your trading strategies easy?
Not long ago, while I was reading about the fifth principle (Learn How to Make Decisions Effectively) in the book Principles by Ray Dalio, I realized that what he said could also be applied to trading strategies programming.
He asked to think about how you choose and maintain a safe distance behind the car in front of you when you are driving. Then he asked to describe the process in enough detail that someone who has never driven a car before can do it as well as you can, or so that it can be programmed into the computer that controls an autonomous car.
I suddenly realized how that's also true when automating trading strategies. Have you ever asked a programmer to code your trading strategy, and after developing it, you realized that there are a lot more things to consider? When you trade manually, there are things that we do subconsciously, and we are not consciously aware that we use such rules.
Let's come up with a quick example.
A client asks a developer to create an indicator that visualizes when there is this pattern: an inside bar preceded by four bars that make consecutive lower lows and lower highs. Let's say that the client imagined this.
When the programmer delivers his work, the client starts to notice that the indicator doesn't only pick the formations he was expecting, but also shows patterns like this.
After all, there is also an inside bar preceded by four bars that make consecutive lower lows and lower highs.
In the next article, I will show you how to write an indicator for NinjaTrader, using this simple logic, so you will be able to see how the indicator shows signals that you would not expect.
You can add several rules to avoid considering patterns like in the second example. You could take into consideration the distance between the consecutive lows and highs. Are the opens and closes essential for your signal you want to use in your indicator or strategy? Remember to tell your programmer about them too.
You are the programmer, you should know
Once a client of mine decided to automate a strategy that required a trend. He started to explain to me all the conditions for the entry, except the vague rule that there should be a trend. I asked him how he defines it. His reply was, "You are the programmer; you should know." Of course, I can come up with different ways to check if there is a trend, but this might not be the way you expect it. After some brainstorming, we managed to define a way that worked for my client.
Tips to make the process of automating your strategy easier
As you might have seen, a simple indicator can bring misunderstanding if you don't specify all the rules. But there are a lot more things to take into consideration when automating a trading strategy.
The next time you ask a developer to automate your trading strategy, you can try to explain it to someone else in enough detail that he can do it as well as you can. You will find it easier to articulate it to the programmer who will code it. Don't forget to include some scenarios that have to be avoided. And if you find yourself doing some things intuetively, you can say that upfront and try to find a definition that can be transformed into code toghether.