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 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 $0.00 |
import numpy as np import decimal as d from datetime import timedelta class BasicAlgorithm(QCAlgorithm): def Initialize(self): self.SetStartDate(2018,10, 10) self.SetEndDate(2018,10,20) self.SetCash(100000) self.symbol = "EURUSD" # self.AddForex(self.symbol, Resolution.Daily, Market.Oanda) self.AddForex(self.symbol, Resolution.Hour, Market.Oanda) consolidator = QuoteBarConsolidator(timedelta(1)) consolidator.DataConsolidated += self.OnDailyData self.SubscriptionManager.AddConsolidator(self.symbol, consolidator) def OnDailyData(self, sender, quote): self.Debug(str(quote.EndTime) + " close "+str(quote.Close) + " open "+str(quote.Open) + " high "+str(quote.High) + " low "+str(quote.Low)) # def OnData(self, data): # if data.ContainsKey(self.symbol): # self.Debug(str(data[self.symbol].EndTime) + " close "+str(data[self.symbol].Close) # + " open "+str(data[self.symbol].Open) # + " high "+str(data[self.symbol].High) # + " low "+str(data[self.symbol].Low))