| 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 -2.705 Tracking Error 0.641 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
class MuscularGreenAlbatross(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2020, 1, 1) # Set Start Date
self.SetEndDate(2021, 10, 7) #Set End Date
self.SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Cash) #Broker Modell
#universe
universe = ['BTCUSD']
self.pairs = [Pair(self, ticker) for ticker in universe]
self.SetBenchmark("BTCUSD")
self.SetWarmup(30)
def OnData(self, data):
for pair in self.pairs:
if not pair.sma.IsReady or pair.sma_sma.IsReady:
return
symbol = pair.symbol
sma = pair.sma.Current.Value
sma_sma = pair.sma_sma.Current.Value
rsi = pair.rsi.Current.Value
self.Plot("Calc", str(symbol) + " " + "SMA", sma)
self.Plot("Calc", str(symbol) + " " + "SMA-SMA", sma_sma)
self.Plot("Calc", str(symbol) + " " + "RSI", rsi)
class Pair:
def __init__(self, algorithm, ticker):
self.symbol = algorithm.AddCrypto(ticker, Resolution.Daily, Market.Bitfinex).Symbol
self.sma = algorithm.SMA(self.symbol, 21,Resolution.Daily)
self.sma_sma = IndicatorExtensions.Of(SimpleMovingAverage(5), self.sma)
self.rsi = algorithm.RSI(self.symbol, 14, MovingAverageType.Simple, Resolution.Daily)
def is_ready(self):
return self.sma.IsReady and self.sma_sma.IsReady
def update(self, time, price):
self.sma.Update(time, price)
self.sma_sma.Update(time, price)
self.rsi(time, price)