Created a Mark Minervini scanner. Want to share it to the community. I am not a professional. There could be mistakes in the code.
Rs rating :
First calculate 12 months ,6 months, 3 months, 1 month ROC of close. Then get total roc by 12 months roc * weighting1 + 6 months roc * weighting2 + 3 months roc * weighting3 + 1 month roc * weighting4. Then sort the dictionary in ascending order. Copy the symbol to an empty list. The rs rating = position in list of total roc / total number of stock in calculation. Then reverse the order.
Other condition :
current close price > 52 week low by 30%
current close price < 52 week high by 25%
close > sma50
sma 50 > sma150
sma50 > sma200
sma150 > sma200
How to use:
It will return a string like this: ['APP', 'MSTR', 'VST', ‘EAT’]
You can just copy the string after [ and before ] then paste it on "Add symbol" on tradingview. You can add multiple indicator even with ' before and after the ticker.
Beware if you are a free plan user on tradingview. You can only have max of 30 symbols in watchlist.
If you are able to make some money with this scanner, please support quantconnect so it won't shut down like quantopian.
Mia Alissi
Here are the findings from the code review:
main.py
numpy
is not defined. Ensure you import the numpy library at the beginning of your script usingimport numpy as np
.roc
method signature in your class does not match the expected signature from theQCAlgorithm
superclass. You need to adjust the method signature to match the superclass or rename your method to avoid conflicts.research.ipynb
null
is not defined. This might be due to JSON-like syntax in the notebook. Ensure that any JSON structures are correctly formatted for Python.Make sure to address these issues to improve the functionality and reliability of the code.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
William Chau
topXPercent = 0.8 means top 80% in rs rating/ rs rating over 80
there are also price and volume threshold for filtering.
William Chau
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!