Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
-4.098
Tracking Error
0.16
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
class Module45LongShort(QCAlgorithm):
   
   def Initialize(self):
       
       self.SetStartDate(2021, 12, 1)  # Set Start Date 
       self.SetEndDate(2021, 12, 22) # Set End Date
       self.SetCash(10000)  # Set Strategy Cash
       
       ################## User Inputs ########################
       
       # self.scriptName = "PEP"
       self.scriptNameList = ["PEP","AAPL","TWTR","UBER"]
       self.timeFrame = Resolution.Hour  # Should be Hour / Minute
       
       ############## Long Inputs
       self.ExecuteMod45Long = "Yes"       # should be Yes/No
       self.Mod4ActualTradesLong = "No"    # should be Yes/No
       
       self.Mod4Long_MAX = 1               # Order Qty = MAX
       self.Mod5ActualTradesLong = "Yes"   # should be Yes/No
       self.Mod4TradeCountLong = 1         # 
       
       ############## Short Inputs
       self.ExecuteMod45Short = "No"       # should be Yes/No
       self.Mod4ActualTradesShort = "No"    # should be Yes/No
       
       self.Mod5ActualTradesShort = "Yes"   # should be Yes/No
       self.Mod4TradeCountShort = 1         # 
       
       ################## User Inputs ########################
       
       self.entryPrice = 0
       self.Mod4BoughtCount = 0
       self.previousPrice = 0
       
       self.entryPriceShort = 0
       self.Mod4SoldCount = 0
       self.previousPriceShort = 0
       
       # symb = self.AddEquity(self.scriptName, self.timeFrame , Market.USA)
       # symb.SetDataNormalizationMode(DataNormalizationMode.Raw)
       
       for scriptName in self.scriptNameList:
           self.symb = self.AddEquity(scriptName, self.timeFrame , Market.USA).Symbol
           self.Log("stockSymbolxxx = @" + str(self.symb))
       
       
   def OnData(self, data):
        if self.Time.time() != time(10, 0): return

        for symb in self.scriptNameList:
            if not data.Bars.ContainsKey(symb) or not self.symb in data: 
                self.Log("No Data found for Symbol "+str(symb))
                continue

            symb_price = self.Securities[symb].Price
            self.Log("Symbol "+str(symb)+" Price= "+str(symb_price))
            self.Plot("Prices", symb, symb_price)