Back testing theories

Optuma Forums Optuma Scripting Back testing theories

This topic contains 1 reply, has 2 voices, and was last updated by Mathew Mathew 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #44487

    • Topics: 12
    • Replies: 12
    • Posts: 24


    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.

    <hr />

    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.

    <hr />

    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.

    • Topics: 11
    • Replies: 690
    • Posts: 701

    Hi Jonathan,

    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:

    Hope that helps


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

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.