Breakout Scan Script

Optuma Forums Optuma Scripting Breakout Scan Script

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #58817
    AvatarIan
    • Topics: 6
    • Replies: 7
    • Posts: 13

    Hi,

    I’m looking to backtest and scan for breakouts from a sideways range, something like this.

    Breakout2

    In its simplest form, a pattern where:

    The previous (say) 20 bars were in a fairly narrow range (say) 20% between the highest high and lowest low, and

    The last bar high exceeds any of the prior 20 days, and

    The last bar range is substantially higher than any range of the prior 20 days.

    For the last bar high, I have:

    #58823
    DarrenDarren
    • Topics: 66
    • Replies: 589
    • Posts: 655

    Thanks Ian. To calculate the highest range of the previous 20 days you would need to get the highest high and lowest low, and calculate the range as a % of the highest high.

    This will calculate when that range is less than 20% (which is quite wide over a short period) and the last high broke out 2% higher than the 20 day high:

    #58827
    AvatarIan
    • Topics: 6
    • Replies: 7
    • Posts: 13

    Thank you Darren!

    I’ve used your script in the Scanning Manager with a sample workbook and it looks like it is identifying the breakout correctly.

    Next step is to test it in the Backtester with some different variables. (Yes, the 20% is quite wide, but different values will be used in backtesting.)

    Thanks again.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest