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.

Scanning for a stock that has rallied within a timeframe

Dear Guys
How would i scan for a stock which as gone up 100% within the last 8 weeks?
Many thanks and regards
So i suppose thats a high tight flag
Best
Mark

Comments

  • you are looking for a close that is greater or equal to (8 weeks ago close times 2)

    Close is in the scan workbench dropdown for Price.

    If looking at weeks, then close becomes weekly close. weekly close <= 8 weeks ago weekly close x2.

    Or you can just use days, so 8 weeks is approximately 40 trading days. So your close is greater than or equal to 40 days ago close X 2 .
  • Thanks Imkwin:
    and [type is stock]
    and [today's close > 40 days ago close*2]

    is it then possible after this clause to say, after the 100% rally, i want to look for stocks which corrected less than 30%?

    So the purpose is to create a chart which looks like a high tight flag. run Up of around 100% within 8 weeks and pullback of only up to 30% within 10 - 25 days. Is that possible?
  • markdmarkd mod
    edited August 2021
    I think I would compare a min price within a say a week (so min(5, low)) about 8 weeks ago, so 35 days ago min(5,low) to a more recent max high, say, max(20, high) -

    so

    and [max(20, high) > 35 days ago min(5,low) * 2] // edited to add " * 2"

    then compare recent lows to the max high -

    and [min(10, low) > max(20,high) * .7]

    (edit) If you want to be sure there has been some decline (the flag), you would add something like:

    and [close < max(20, high) * .9]

    You can mess around with parameters.

    You could also try something with Price Channels and Fast Stochastics.
  • and the 100% up requirement would also need to be moved back to allow for the high/tight period.

    In other words, you are looking for a period of high/tight AFTER the 100% move up in 8 weeks. So... however long your high/tight window is, you want to push your 100% period in front of that.

    Example: high/tight period is 8 weeks, my 100% up period starts 8 weeks before that.

    8 weeks ago close > 16 weeks ago close x 2
    and 8 week high/tight pattern that didn't retrace more than 30% from that high
  • markdmarkd mod
    edited August 2021
    @lmkwin correctly points out that the high (max high in my example) has to be twice the min low or more. I have edited my suggested scan code for that requirement.

    The reason for the max and min functions is to cast a wider net, so the low close does not have to be exactly eight weeks ago and the high doesn't have to be exactly some other number of weeks ago. This approach may give you more "bad" hits, but it is less likely to omit good hits that might otherwise be missed by a too precise requirement. If the results are too many or too few, you can adjust the parameters to narrow or widen the net.

    Also, I have used high and low for defining the 100% move, which is also a wider net, but closes might produce better results - only testing will tell.
  • So does this logic make sense to you? As i am a bit lost with the code
    This:

    C > AVGC200
    AND MAXH40 > MAXH10
    AND .8 * MAXH40 >= MINL25
    AND MINL25 >= .7 * MAXH40
    AND 2 * MINL40 >= MAXH40
    AND MAXH40 >= 1.8 * MINL40

    is the same as this stockcharts code:

    and [type is stock]
    and [max(20, high) > 35 days ago min(5,low) * 2]
    and [min(10, low) > max(20,high) * .7]
    //(edit) If you want to be sure there has been some decline (the flag), you would add something like:
    and [close < max(20, high) * .9]
  • //C > AVGC200
    and [close > EMA(200,close)]

    //AND MAXH40 > MAXH10
    and [max(40,high) > max(10,high)] // this would imply pullback from high

    //AND .8 * MAXH40 >= MINL25
    and [max(40,high)*0.8 >= min(25,low)]

    //AND MINL25 >= .7 * MAXH40
    and [min(25,low) >= max(40,high) * 0.7]

    //AND 2 * MINL40 >= MAXH40
    and [min(40,low) * 2 >= max(40,high)]

    //AND MAXH40 >= 1.8 * MINL40
    and [max(40,high) >= min(40,low) *1.8]

    I'd interpret your other code like above. Your code and SC translation.

    so I'd arrive at this code with your code removed

    and [close > EMA(200,close)]
    and [max(40,high) > max(10,high)] // this would imply pullback from 40 high
    and [max(40,high)*0.8 >= min(25,low)]
    and [max(40,high)*0.7 <= min(25,low)] // I reverse this here for consistency view
    and [min(40,low) * 2 >= max(40,high)]
    and [max(40,high) >= min(40,low) *1.8]

    vs your suggested code

    and [max(20, high) > 35 days ago min(5,low) * 2]
    and [min(10, low) > max(20,high) * .7]
    //(edit) If you want to be sure there has been some decline (the flag), you would add something like:
    and [close < max(20, high) * .9]

    When I run the top code against a specific group of indexes I get zero hits.
    When I run the bottom code against the same group of indexes I get one hit. MRNA

    Run against a larger small cap range group I get 1 hit for the bottom scan AGFY
    Run against a larger small cap range group I get 1 hit for the top scan PLXP

    You can run it against older dates to see what shows up.

    I see some nice dynamic CSS patterns on those names point and figure charts that come at the beginning of the moves on those names.
Sign In or Register to comment.