Hello,
I'm wondering if it's possible to create a new watchlist every day to be scanned every second while the market is open? Is it possible to code the following strategy?
I want an algorithm that scans all tiers of NYSE and all tiers of Nasdaq right after market open every day. I want to make sure the algorithm includes NYSE, NYSE American Equities, NYSE Arca Equities, NYSE National, NYSE Texas, The NASDAQ Global Select Market, the NASDAQ Global Market, and the NASDAQ Capital Market, and all other tiers in its morning scan.
From the morning scan about 10 seconds after market open, I want the algorithm to create a watchlist of the 100 stocks that have opened with the biggest gap above their previous day's close price. I only want a stock added to my watchlist if that stock opened at a $0.25 share price or higher. I only want a stock added to my watchlist if that stock has traded 1,000,000 shares during the premarket session that morning.
After the watchlist is created, I want my algorithm to scan that watchlist every second until market close. I want the algorithm to buy any stock on my watchlist when that stock hits 40% above its open price. I want my algorithm to sell a position when it hits a 30% profit or a 30% loss. As soon as my algorithm sells a stock, I want that stock taken off the watchlist so that the algorithm does not trade that stock again during that day. If any positions are still open a few seconds before market close, I want them all closed. I want the watchlist cleared after market close.
For example, I want to make sure this algorithm would've bought SBET on 5/27 and that it would've bought KNW on 6/6. Thanks!
Mia Alissi
Here is a QuantConnect Python algorithm that matches 'Digitall’s' detailed description:
This structure creates a daily dynamic watchlist, manages positions according to your specs, and is set up to scan US equities universe across all NYSE/NASDAQ tiers. You can enhance logic around precise premarket volume using custom data, if deeper premarket granularity is absolutely essential. Let me know if you'd like code for that!
Sources: True Beats - QuantConnect.com, WallStreetBets - QuantConnect.com, Momentum And State Of Market Filters, Head & Shoulders TA Pattern Detection, Tactical - QuantConnect.com
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.
Digitall
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!