OPEN-SOURCE SCRIPT

Stock vs Sector Comparison with Highlights

This graph is meant as a support to select a stock that is expected to perform better than the sector.

The graph is based on weekly chart. So this is a medium / long term strategy.

How is expected to be used: when the stock has under performed the sector for some time, there is a natural tendence that it will catch up with the sector again. So, for example, if the color change from green to red, you should consider find another stock in the sector. If the stock looses the green color, but is not red yet, you should wait. And vice versa if you start with red. However, life is not that simple, as you can get fake signal. To mitigate this problem, you can adjust the threshold in the input setting, so just go for the signal after x weeks over/underperforming. You also need remember to select the sector in the settings, as the sector is not give automatically when you select the stock.


Below the sectors used:

Sector Name Ticker
S&P 500 (Market Index) SPY
Technology XLK
Financials XLF
Consumer Discretionary XLY
Industrials XLI
Health Care XLV
Consumer Staples XLP
Energy XLE
Utilities XLU
Communication Services XLC
Real Estate XLRE
Materials XLB

Chart patternsCyclesTrend Analysis

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности