I want to filter out to build the stocks list which are within 5% of 52 weeks high before market open every day. How to add scan the stocks within 5% of 52 weeks every day

  1. self.add_universe_selection(ETFConstituentsUniverseSelectionModel("SPY", self.universe_settings, self.etf_constituents_filter))
  1. def etf_constituents_filter(self, constituents):
  2. # Define your filtering logic here
  3. return [c.symbol for c in constituents]

 

Author

Dharmesh Khalasi

September 2024