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.
Options

Weekly Hull Moving Average HMA in an Uptrend

Hi, I need help with a SC Scan.........I have checked all SC scan resources........but I am stumped.
I want to scan for the number of weeks the Hull Moving Average of symbols in my ETF List have been in an Uptrend and ranked by number of weeks in that uptrend, so then I can view/sort that value. I need help with Rank By... the rest works, I think. I made an attempt below for Rank By but it yields nothing. Help Please....Bob

// Weekly Hull Moving Average HMA in an Uptrend
[favorites list is 16] // US ETF's
and [ Weekly HullMA(15,close) > Last Weeks HullMA(15,close) ]

Rank by [Count Up ( Weekly HullMA(15,close) > Last Weeks HullMA(15,close) )] //Rank by number of weeks in an uptrend

Best Answer

  • Options
    bobhunbobhun
    Answer ✓
    lmkwin, thanks....thats exactly what I was looking for.....now I am tinkering/testing to see what jewels I can find.

Answers

  • Options
    markdmarkd mod
    edited October 2023
    [group is sp500] // instead of your list

    and [ Weekly HullMA(15,weekly close) > 1 week ago weekly HullMA(15,weekly close) ]

    rank by weekly Count Up(20, weekly HullMA(15,weekly close))

    ******


    I didn't test this thoroughly, but it passes syntax and produces plausible results.

    notes:

    when you change from the default daily time frame, you need to add "weekly" to every function and parameters that depends on or refers to a time frame (here, "close" and functions HullMA and Count UP

    "Count UP ( )" is a function that already knows to compare two consecutive weeks,so you don't have to specify that, and it knows to step back by the number of times indicated in the first parameter (which you omitted; I randomly chose 20)

    there is probably no difference between "last weeks" and "1 week ago"; I just prefer the latter style.

    generally, you don't need brackets with "rank by" if the expression is simple enough, as in this case, just one function.

    Count UP results do not necessarily indicate a trend, unless by "trend" you mean "up tick". There may be more up ticks than down ticks, but the up ticks are not consecutive, or not larger than the down ticks, etc. However, since you are applying it to an average, it may be a reasonable proxy.

    You could also try a test for HullMA > x periods ago HullMA for just one time period or several, e.g. 5 weeks, 10 weeks and 20 weeks - HullMA > 5 weeks ago HullMA, and HullMA > 10 weeks ago and HullMA > 20 weeks ago.
  • Options
    Hi Mark, thanks so much. Can you modify the scan rank by, to: "I want to count the number of weekly upticks since the last upcount consecutive sequence started". Tks, Bob
  • Options
    Count requires a period to count. The Count UP defaults into the workbench like this:

    and [Count Up(20, close) > 10]

    It's looking for the count where the close was higher 11 or more times in the last 20 days.

    You would need to change the close to be your Hull MA parameter and adjust the period and the number of days threshold. There is also a Count Down function as well.

    There are also two Streak functions that looks at consecutive occurances. The Streak UP defaults into the workbench like this:

    and [Streak Up(close) > 1]

    It's looking for the close to be up 2 or more consecutive days. You would change the close to be your Hull MA parameter.

    To change to Weekly instead of Daily, see Markd's instruction on the prior response. A Rank By Streak Up will show the ones that have the longest streak up at the top and the shortest at the bottom.

  • Options
    Hi lmkwin, thanks for your input. I confess I am a dummy around scans. So could you modify mark's scan statements to incorporate your suggestions so that I have a complete total scan yielding what I asked mark: "I want to count the number of weekly upticks since the last weekly upcount consecutive sequence started". Tks, Bob
  • Options
    rank by [weekly Streak Up(Weekly HullMA(15,weekly close))]
Sign In or Register to comment.