I am wondering how I backtest 2 theories at the same time.
I could not work it out so I started to play with the following:
As a simple (not recommended) example, in the backtest manager I select All Time Low + DOW THEORY Long.
So in my mind, this is what I am looking for: When the stock hits an ATL, look for next event to trigger a buy. Once DOW THEORY Long (buy) has been triggered than 2 (or more) of my rules have been met and buy on next open.
This is what I find happens – Nothing
Once the stock has hit an ALL TIME LOW, DOW THEORY cannot be triggered as it will no longer be at an ATL.
I found the same to occur when I wanted to have the backtest trigger when I am using MA. It will only trigger if the 2 events occur at the exact same time, not if one happens and the next event is then waited for.
The approach I will always take with this is to test my logic on a chart first. Put the script in a “Show Bar” tool and see if you get any results. If not, then start breaking up the script into components and see what is going on.
What I suspect is that the ATL and the Dow Long will never happen at the same time since there needs to be a confirmed up move for the Dow to be consider in an up trend (unless there is a different rule that I am not aware of). Nevertheless, the show bar exercise will show you that. You could also put the two components in separate show bars and see if there is ever an overlap of signals.
If you do find that there is not an overlap but taking a Dow Long within 10 days of an ATL, then you can use the TimeSinceSignal() function. You can see the lesson on that here: https://learn.optuma.com/course/advanced-scripting/?course_type=content&course_page=1&lecture=2
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.