OPEN-SOURCE SCRIPT

Ticker vs Index

I was exploring a simple idea how I can visualize the ticker performance against the underlying Index (or any other ticker) performance.

how it works:
When the line is moving up (blue zone), the ticker is performing better than the underlying index (e.g. SPX)(configurable).
When the line is moving down (red zone), the ticker is performing worse than the underlying index.

How to use it:
Use as confirmation always in conjunction with other (main) indicators, avoid "buy" when indicator is in the red zone
Also, crossing over the zero line is often an indication for an upcoming upward move
Try to different SMA length - default is 20 but 10 was often showing better results

(No financial advise, for testing purposes only)
comparisonindexanalysissentimenttrendTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer