Overall Statistics |
Total Trades 1 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 0 Tracking Error 0 Treynor Ratio 0 Total Fees $2.13 Estimated Strategy Capacity $510000.00 |
class LiquidUniverseSelection(QCAlgorithm): symbol = "AAME" isLast = False x = 2 lastPredictClose = 0 lastClose = 0 stopMarketTicket = None highestPrice = -1 def Initialize(self): self.SetStartDate(2021, 2, 5) self.SetEndDate(2021, 2, 5) self.SetCash(1600) aame = self.AddEquity(self.symbol, Resolution.Second) aame.SetDataNormalizationMode(DataNormalizationMode.Raw) def OnData(self, slice): if self.Time.hour > 11 or not slice.ContainsKey(self.symbol): return if not self.Portfolio[self.symbol].Invested: self.SetHoldings(self.symbol, 1) elif self.Portfolio[self.symbol].Invested: if self.Portfolio[self.symbol].Price > self.highestPrice: self.highestPrice = self.Portfolio[self.symbol].Price openOrders = self.Transactions.GetOpenOrders(self.symbol) if len(openOrders) > 0: return self.StopMarketOrder(self.symbol, -self.Portfolio[self.symbol].Quantity, 0.9 * self.Portfolio[self.symbol].Price)