OPEN-SOURCE SCRIPT
Stock-Index-Relative-Returns

This is one of the entry conditions of Mark Minervini's trend template for entry conditions.
This indicator plots returns in comparison with index. (Change the index ticker in the input as per the stock in use)
Loopback period is the distance from which we are calculating returns.
Green line indicates returns of the stock
Red line indicates returns of the index
Purple line is the difference between both.
Mark Minervini's trend template expects stock_returns/index_returns to be at least 7 - which means at least 70% higher than index returns.
This indicator plots returns in comparison with index. (Change the index ticker in the input as per the stock in use)
Loopback period is the distance from which we are calculating returns.
Green line indicates returns of the stock
Red line indicates returns of the index
Purple line is the difference between both.
Mark Minervini's trend template expects stock_returns/index_returns to be at least 7 - which means at least 70% higher than index returns.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.