New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

How to scan for this type of breakout? (image)

edited January 2021 in Scanning

I've posted a picture of a breakout that i'm hoping someone has an idea of how to capture this in a scan. Basically i'm looking for a breakout as shown in the yellow circle but also the price has to have dipped (consolidated) for the past little while. So it makes a sort of "U" shape. Any ideas? Thank you in advance!


  • Options
    markdmarkd mod
    edited January 2021
    Scanning for patterns reliably is difficult because the patterns are variable while scans have to be relatively specific.

    But for this type of pattern, I would try stochastics and channels.

    Stochastics tells you where price has been in its range over a certain period of time. So, to test for a dip you might write:

    and [min(20, Fast Stoch %K(20, 1)) < 20]

    That says, in the last 20 days, Fast K has been in the lower 20% of its its (rolling) 20 day range.

    You can vary the parameters, but always use Fast K and keep the second parameter always "1". That tracks closes without any smoothing, which is what you want.

    Then you want to test for a flat upper channel of some length. If the upper channel is flat, it means there have not been new prices in that direction for some period of time. So maybe

    and [1 day ago Upper Price Chan(40) = 30 days ago Upper Price Chan(40)]

    Then test for the breakout:

    and [close x Upper Price Chan(40)]

    Again, you can vary the parameters, except always use "1 day ago Upper Price Chan(x)" as one end of the flat channel line. For the other end, you probably want a number more than half the length of the price channel length.

    As you are developing the scan, use a number of dates in the past to run the scan. Some dates you will get no hits, others several or many. It depends on how the market is behaving.
  • Options
    Thank you so much! so far so good but will tweak to see what else it can offer. :smiley:
  • Options
    Hi there, i'm just trying to tweak this around to extend it out for longer (around 90 days for example).

    Would this make sense?

    and [min(80, Fast Stoch %K(20, 1)) < 80]
    and [1 day ago Upper Price Chan(90) = 60 days ago Upper Price Chan(90)]
    and [close x Upper Price Chan(90)]

    Also for your original post, is there reason why the Fast K is scanning for the last 20 days? Would it be ok if it was for the last 40 days instead?

    and [[min(20, Fast Stoch %K(20, 1)) < 20]
    and [1 day ago Upper Price Chan(40) = 30 days ago Upper Price Chan(40)]
    and [close x Upper Price Chan(40)]]
  • Options
    Second question first - all parameters were just pulled out of the hat - guesses at what might work based on experience, but not tested.

    First question - If it works, it makes sense. There's no way to know without looking at the results over time. It's all about research and using your own judgement about the results. Not easy, but it's fun if it's something you like to do.
Sign In or Register to comment.