| 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.845 Tracking Error 0.252 Treynor Ratio 0 Total Fees $0.00 Estimated Strategy Capacity $0 Lowest Capacity Asset |
from AlgorithmImports import *
import math
from System.Drawing import Color
class AlertFluorescentOrangeDinosaur(QCAlgorithm):
def Initialize(self):
self.coin = "ETHUSD"
self.SetStartDate(2022, 6, 1) # Set Start Date
self.SetEndDate(2022, 6, 15) # Set Start Date
self.SetCash(20000)
self.crypto_coin = self.AddCrypto(self.coin, Resolution.Daily) # To ensure correct backtesting of limit orders
#self.crypto_coin_plot = self.AddCrypto(self.coin, Resolution.Daily)
# define 'previous date' to assist in index at the begining/ end of day
self.__previous = datetime.min
# On the Crypto Plot we want trades, price and ema trends:
cryptoPlot = Chart("Crypto Plot")
#cryptoPlot.AddSeries(Series("Price", SeriesType.Candle, 0))
cryptoPlot.AddSeries(Series("Price", SeriesType.Line, 0))
self.AddChart(cryptoPlot)
def OnData(self, data: Slice):
self.coinprice = self.Securities[self.coin].Price
# once a day (should be midnight) set the buy/ sell trigger
#if self.__previous.date() != self.Time.date():
# plot 1x per day
self.Plot("Crypto Plot", "Price", self.coinprice)
#self.Log(self.Time.isoformat())
#self.Log(self.coinprice)
#self.Log("****")
self.__previous = self.Time