| 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 -1.343 Tracking Error 0.615 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
#Indikator kann verwendet werden, Zahlen passen
class MuscularGreenAlbatross(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2019, 1, 1) # Set Start Date
self.SetEndDate(2019, 12, 31) #Set End Date
self.SetCash(100000) # Set Strategy Cash
self.SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin) #Broker Modell
#self.SetTimeZone("Europe/Berlin") #durch die Zeitzone wird auch die 4h Anzeige in der Grafik um 2h verschoben
self.btc = self.AddCrypto("BTCUSD", Resolution.Hour).Symbol
consolidator = TradeBarConsolidator(timedelta(hours = 4)) # Create consolidator you need and attach event handler
self.SubscriptionManager.AddConsolidator(self.btc, consolidator) # Register consolidator to get automatically updated with hour data
#HMA Indikator
length_hull = 24
length_hull_2 = float(length_hull) / 2
#HMA1 mit Schlusskurse
self.hma = HullMovingAverage(length_hull) #langsam
self.RegisterIndicator(self.btc, self.hma, consolidator)
#Weighted Moving Average
self.lwma_a = IndicatorExtensions.Times(self.LWMA(self.btc, int(length_hull_2) / 3), 3)
self.lwma_b = self.LWMA(self.btc, float(length_hull_2) / 2)
self.lwma_c = self.LWMA(self.btc, float(length_hull_2))
self.minus_a = IndicatorExtensions.Minus(IndicatorExtensions.Minus(self.lwma_a, self.lwma_b), self.lwma_c)
self.hma_b = IndicatorExtensions.Of(LinearWeightedMovingAverage(int(length_hull_2)), self.minus_a) #schnell
self.RegisterIndicator(self.btc, self.hma_b, consolidator)
def OnData(self, data):
if self.IsWarmingUp:
return
if not self.hma.IsReady:
return
if not(self.Time.time() == time(2) or self.Time.time() == time(6) or self.Time.time() == time(10) or self.Time.time() == time(14) or self.Time.time() == time(18) or self.Time.time() == time(22)):
return
self.Plot("Grafik", "Hull-MA-1-Final", self.hma.Current.Value)
self.Plot("Grafik", "Hull-MA-3", self.hma_b.Current.Value)