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 $1.85 Estimated Strategy Capacity $2600000000.00 Lowest Capacity Asset MNQ Y1VKEF59AV41 |
# region imports from AlgorithmImports import * # endregion class FatGreenBull(QCAlgorithm): def Initialize(self): self.StartOn = [2022,7,12] self.EndOn = [2022,7,12] # Set this to False to force it to stay on minute resolution self.AllowTicks = False self.future = Futures.Indices.MicroNASDAQ100EMini self._continuousContract = self.AddFuture(self.future, Resolution.Minute, dataNormalizationMode=DataNormalizationMode.Raw, dataMappingMode=DataMappingMode.OpenInterest, contractDepthOffset=0) self.commod = self._continuousContract.Symbol self.TicksEnabled = False self.SetStartDate(self.StartOn[0], self.StartOn[1], self.StartOn[2]) self.SetEndDate(self.EndOn[0], self.EndOn[1], self.EndOn[2]) self.Log("Done initialization") def OnData(self, data: Slice): if self.Time.hour == 9 and self.Time.minute == 38: self.EnableTicks() if self.Time.hour == 9 and self.Time.minute == 38: self.MarketOrder(self._continuousContract.Mapped, 1) if self.Time.hour == 9 and self.Time.minute == 40: self.DisableTicks() def EnableTicks(self): if not self.AllowTicks: return if not self.TicksEnabled: self.RemoveSecurity(self.commod) self._continuousContract = self.AddFuture(self.future, Resolution.Tick, dataNormalizationMode=DataNormalizationMode.Raw, dataMappingMode=DataMappingMode.OpenInterest, contractDepthOffset=0) self.commod = self._continuousContract.Symbol self.TicksEnabled = True def DisableTicks(self): if self.TicksEnabled: self.RemoveSecurity(self.commod) self._continuousContract = self.AddFuture(self.future, Resolution.Minute, dataNormalizationMode=DataNormalizationMode.Raw, dataMappingMode=DataMappingMode.OpenInterest, contractDepthOffset=0) self.commod = self._continuousContract.Symbol self.TicksEnabled = False