File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 11class AlertMagentaAlligator (QCAlgorithm ):
22
33 def Initialize (self ):
4- self .SetStartDate (2020 , 11 , 20 ) # Set Start Date
5- self .SetCash (100000 ) # Set Strategy Cash
6- # self.AddEquity("SPY", Resolution.Minute)
7-
4+ self .SetStartDate (2020 , 11 , 20 )
5+ self .SetCash (100000 )
6+ self .AddEquity ('SBUX' , Resolution .Minute )
7+ self .AddEquity ('TSLA' , Resolution .Minute )
8+ self .AddEquity ('BAC' , Resolution .Minute )
89
910 def OnData (self , data ):
10- '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
11- Arguments:
12- data: Slice object keyed by symbol containing the stock data
13- '''
14-
15- # if not self.Portfolio.Invested:
16- # self.SetHoldings("SPY", 1)
17-
11+ if not self .Portfolio .Invested :
12+ self .SetHoldings ('SBUX' , 0.30 )
13+ self .SetHoldings ('TSLA' , 0.30 )
14+ self .SetHoldings ('BAC' , 0.30 )
You can’t perform that action at this time.
0 commit comments