From 524bacbad1ec58b904d4f63c386106b9b6f83d3d Mon Sep 17 00:00:00 2001 From: Derek Melchin <38889814+DerekMelchin@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:14:43 -0600 Subject: [PATCH] Update 99 Examples.html --- .../03 Equity/02 Fundamental Universes/99 Examples.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/03 Writing Algorithms/12 Universes/03 Equity/02 Fundamental Universes/99 Examples.html b/03 Writing Algorithms/12 Universes/03 Equity/02 Fundamental Universes/99 Examples.html index 3a48b79cfc..31eefbd390 100644 --- a/03 Writing Algorithms/12 Universes/03 Equity/02 Fundamental Universes/99 Examples.html +++ b/03 Writing Algorithms/12 Universes/03 Equity/02 Fundamental Universes/99 Examples.html @@ -93,7 +93,7 @@

Example 2: 10 Stocks Above Their 200-Day EMA With >$1B of Daily Trading Volu
class UpTrendLiquidUniverseAlgorithm(QCAlgorithm):
 	
     # Create a dictionary to store the EMA data for universe selection.
-    _selection_data_by_symbol = { }
+    _selection_data_by_symbol = {}
 
     def initialize(self) -> None:
         # Add the custom universe.
@@ -102,7 +102,7 @@ 

Example 2: 10 Stocks Above Their 200-Day EMA With >$1B of Daily Trading Volu def _select_assets(self, fundamental: List[Fundamental]) -> List[Symbol]: for f in fundamental: # Create/Update the EMA indicators of each stock. - if f.symbol not in self._state_data: + if f.symbol not in self._selection_data_by_symbol: self._selection_data_by_symbol[f.symbol] = SelectionData(f.symbol, 200) self._selection_data_by_symbol[f.symbol].update(f.end_time, f.adjusted_price, f.dollar_volume)