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.

Can the SCTR be adjusted to use a 60 or 90 day time frame?

The relative strength is too long. I want a shorter rank.

Best Answers

  • markdmarkd mod
    edited January 12 Answer ✓
    The SCTR formula is meant to weight performance from long, middle and short time frames (explained here: https://school.stockcharts.com/doku.php?id=technical_indicators:sctr). It's not customizable.

    But, another way to find out-performers for any chosen period would be to rank a group (index, sector, industry) or favorites list by rate of change (ROC). So maybe:


    [group is sp500]
    rank by ROC(60)

  • azbazb
    Answer ✓
    Complex RANKING calculations can be approximated by reducing them to simple additions or subtractions ...

    This works, to approximate the SCTR, per above ...

    rank by [ PPO Line(1,200,1) + PPO Line(1,200,1) + PPO Line(1,200,1) + ROC(125) + ROC(125) + ROC(125) + PPO Line(1,50,1) + PPO Line(1,50,1) + ROC(20) + ROC(10) ]


    You can also try this variation, which ranks by the most change over the past 5 days ...

    rank by [ PPO Line(1,200,1) + PPO Line(1,200,1) + PPO Line(1,200,1) + ROC(125) + ROC(125) + ROC(125) + PPO Line(1,50,1) + PPO Line(1,50,1) + ROC(20) + ROC(10) - 5 days ago PPO Line(1,200,1) - 5 days ago PPO Line(1,200,1) - 5 days ago PPO Line(1,200,1) - 5 days ago ROC(125) - 5 days ago ROC(125) - 5 days ago ROC(125) - 5 days ago PPO Line(1,50,1) - 5 days ago PPO Line(1,50,1) - 5 days ago ROC(20) - 5 days ago ROC(10) ]




Answers

  • You would just need to take the individual components and change them to your liking. SCTR ranking gives the highest scores to the most extended names and lower scores to the ones that aren't extended as much. They take PPO 1,200,1 and multiply it by 0.3. Add the 125 ROC multiplied by 0.3. Add the PPO 1,50,1 multilplied by 0.15, Add the 20 ROC multiplied by 0.15, etc

    You can create this ranking system in a scan and use it as a rank by statement. The only thing it wouldn't do for you is create the decile ranking that the SCTR does. So let's say your scan returns 500 names. The top 10%, or 50, of your scan returns would be the 90-99 group. The next 50 would be the 80-89 group, etc.

    rank by [[PPO(1,200,1) * 0.30] + [ROC(125) * 0.30] + [PPO(1,50,1) * 0.15] + [ROC(20) * 0.15] + .....]


    From StockCharts
    Calculation
    It takes two steps to calculate the StockCharts Technical Rank (SCTR). First, each stock is “scored” based on six different technical indicators. These six indicators can be subdivided into three groups: long-term, medium-term and short-term. The box below details these indicators, the relevant timeframe and the weightings.

    Long-Term Indicators (weighting)
    --------------------------------

    * Percent above/below 200-day EMA (30%)
    * 125-Day Rate-of-Change (30%)

    Medium-Term Indicators (weighting)
    ----------------------------------

    * Percent above/below 50-day EMA (15%)
    * 20-day Rate-of-Change (15%)

    Short-Term Indicators (weighting)
    ---------------------------------

    * 3-day slope of PPO(12,26,9) Histogram/3 (5%)
    * 14-day RSI (5%)



    John Murphy has only mentioned SCTR in blog postings a handful of time in the past 5 years.

    Something else you might find of interest in the StockCharts scan engine is the PctRelative function. You can use this against anything to get a relative return over any period of time.
    It defaults to $SPX but you can put any symbol in there and any time frame. You can also put $Industry or $Sector in and the system will compare the symbols returned in the scan to the relevant industry or sector that the symbol has assigned to it.

    and [PctRelative(20,$spx) > 0]
    and [PctRelative(10,$Sector) > 10]
    and [PctRelative(5,$Industry) > 5]
    and [PctRelative(200,ARKK) > 200]

    The 1st number is the period. The last number is a %. The first line says show me symbols that have gone up more than the $spx in the last 20 periods

    The Second line says show me symbols that have gone up 10% more than their sector in the last 10 periods.

    If using them in a Rank by statement, remove the qualifier.

    rank by [PctRelative(20,$spx)] is all you need in the rank by statement.

    https://support.stockcharts.com/doku.php?id=scans:advanced_scan_syntax
  • At one time, the rank by statement did not accommodate complex custom math (such as @lmkwin 's first suggestion). That may have changed by now, so it's probably worth giving it a try, but if the results don't make sense, that could be why. Somebody please correct me if you know the rank by statement now works with things other than "built in" indicators (like MACD or RSI, for instance) and/or "simple" math.
  • I believe Arthur Hill had something along these lines in one of his old shows or blog posts. That's where I got the idea. Weighted values in the scan.

    If you put PPO Line, instead of PPO in the code above, and remove the individual brackets, it returns results in the rank by. I was just typing an option to use and didn't enter it correctly nor check it in the scan workbench. I instead used the brackets to show the separate calculation steps.

    rank by [PPO Line(1,200,1) * 0.30 + ROC(125) * 0.30 + PPO Line(1,50,1) * 0.25 + ROC(20) * 0.15]

    returns results. Now, are they correctly calculated? I'm not checking that but it does return values.

    The above snippet isn't the entire SCTR calculation.
  • Multiplication in RANKING is dangerous.

    For example, if you want ..
    A * 3 + B * 2 + C * 1

    You will get ...
    A * 3 * 2 * 1 + B * 2 * 1 + C * 1

  • markdmarkd mod
    edited January 13
    Well, I suppose you could test how the rank by statement handles a complex calculation by comparing results from, say,

    [group is DOW30]
    rank by SCTR

    to

    [group is DOW30]
    rank by [ whatever the correct "long hand" SCTR calculation is ]
Sign In or Register to comment.