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.

ROC ($SPX) v ROC (ABC)

Hi All.

Any thoughts on how I might create an indicator to reflect the rate of change of a single security (ABC) verus the rate of change of the $SPX both graphically or visually on a single pane and, additionally, in a string of characters so that it can be inserted into a scan?

Thanks,
Andy

Comments

  • markdmarkd mod
    edited June 21
    The standard way to compare the performance of two symbols is the Price or Price-Performance indicator with a ratio symbol, like ABC:$SPX. The ratio is expressed as a line in the indicator window. If ABC is outperforming $SPX (rising more or falling less), the line will tick up, and vice versa.

    So, you would set up a chart style that includes the Price or Price-Performance indicator and in the parameter window you would put $SYMBOL:$SPX ("$SYMBOL" is a "pseudo-symbol", sort of like a variable, that stands in for any symbol you want to view, so you don't have to update the indicator for every different symbol). Then, when you display any symbol in that chart style, you will have a relative strength line in the Price or Price-Performance indicator window. Price expresses the ratio as a decimal number, Price-Performance expresses the ratio a per cent.

    Price Relative/Relative Strength is explained here:

    https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:price_relative

    You can scan for differences (NOT a ratio) in per cent change between symbols and a benchmark symbol using the PctRelative function, as explained here (about 2/3 down the page):

    https://stockcharts.com/docs/doku.php?id=scans:functions
  • lmkwinlmkwin ✭✭
    To get the ROC's on the chart, do something similar to what markd describes.

    One Indicator for Price or Price Performance. Parameter $Symbol with an overlay of ROC and whatever parameter period you want.

    Second Indicator for Price or Price Performance. Parameter $Spx with an overlay of ROC and whatever parameter period you want (probably the same parameter as the 1st Indicator)

    Change the Opacity to 0 (zero) on both. Display the Second Indicator behind the 1st Indicator.

    An additional option you might find useful is to add a Third Indicator just for ROC. Set the overlay to a SMA 1. Make the Opacity 0 and display behind the other two. This will "assist" in your being able to identify the Symbol's ROC vs the SPX as there will be a slightly different line showing for the Symbol's ROC. Enough to differentiate it without obscuring your visual intent.

    Make sure you change the Opacity on these to 0, otherwise you get a bunch of lines that you won't be able to follow.
  • There is a published Scan that uses ROC in the Scan.
    Go to Stockcharts.com click "Scans tab"
    Select any scan & Click "Edit Scan"
    At the bottom of the page you should see a tab "Scan Examples"
    Click on "Scan Examples" then Click "Published Scans"
    Click on "Pocket Pivot"
  • Thank you all very much!
  • Hi guys,

    I'm not so sure of the syntax as I'm not getting the intended results. I added the following conditions [PctRelative(1,SPY,MONTHLY ROC(12)) > 0] and got symbols which don't meet the condition I think it is.

    What I'd like is to get symbols with a Monthly ROC(12) greater than the one for the SPY for the same period. As proof&error I set the condition to 300 and still got results with Absolute symbol ROCs below 1%.

    I'd appreciate any help.

    Best,
  • You could see if you get better results with [monthly PctRelative(1, SPY, monthly ROC(12)) > 0] - i.e. put the "monthly" modifier in front of the PctRelative function.
  • thx Mark

    I tried that one as well but still not working well as expected.

    I guess I'm not understanding well the formula or it's not designed for that.

    When I used 250 periods and no expression I got something closer to it

    [country is US] And [group is ETFNOUI] AND [MONTHLY ROC(12) > 0.0] and [PctRelative(250,SPY) > 0.0]
    Rank by [month roc(12)] DESCENDING

    I'd dare to say it bugs me a lot. The idea is quite simple and don't want to use tricks or approximations.

    ETFs whose Monthly ROC (12) is above cero and above the same measure for the SPY

    Best,
  • markdmarkd mod
    edited August 27
    You don't need the PctRelative test. The rank by will put everything in order. Those above SPY are doing better.

    If the scan doesn't capture SPY, save the results to a list, add SPY to the list, then run a scan to rank the list by ROC( ). The results above SPY in that list that have a better ROC( ).
  • Thx Mark that was my workaround idea. (It seems that I'm getting old and perfectionist).

    Best,

    PS: the list captures SPY. The scan I put runs on US ETFs, not leveraged nor inverse.

Sign In or Register to comment.