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.

Weekly Price Channel Scan

I am trying to scan for 20 Week Price Channel B/O. Below is what I used and it isn't capturing B/O .

and[ 1 week ago close < 1 week ago Upper Price Chan(20)]
and [weekly close > weekly Upper Price Chan(20)]

Any suggestions?


  • Options
    lmkwinlmkwin ✭✭
    The "breakout" is going to be a crossover.

    Try replacing the > with an X on the second line.
  • Options
    markdmarkd mod
    edited May 2020
    lmkwin's answer is basically correct - it's much easier to do the scan with the x (crossover ) operator.

    The Price Channel indicator is a little different than others, in that it is lagged by one bar. The explanation is here:

    The x operator seems to be coded to take that difference into account. So, you could just say:

    and [weekly close x weekly Upper Price Chan(20)]

    However, this statement will often be true AFTER a breakout as well, as a trending stock often closes the week above the prior week's high. So your scan will pick up stocks in mid-trend. To get just breakouts, you want to insure that the Upper Price Channel has been flat for some number of weeks. So your first line might be

    and [1 week ago weekly Upper Price Chan(20) = 10 weeks ago weekly Upper Price Chan(20)]

    or something similar. The number of weeks you choose should be the minimum you would consider necessary for a meaningful breakout ( but less than the length of the channel (20), since the channel will change its value when the channel length expires).
Sign In or Register to comment.