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.6
Tracking Error
0.229
Treynor Ratio
0
Total Fees
$0.00
class NadionTachyonThrustAssembly(QCAlgorithm):

    chart = None
    series = None

    def Initialize(self):
        self.SetStartDate(2018, 1, 28)
        self.SetEndDate(2018, 2, 28)
        self.SetCash(10000)
        self.AddForex("EURUSD", Resolution.Hour, Market.Oanda) # Hour breaks the plotting, but Daily works fine. Please help.
        self.SetBrokerageModel(BrokerageName.OandaBrokerage)
        
        self.Consolidate("EURUSD", Resolution.Daily, self.OnDataConsolidated)
        
        self.candles = Series("EURUSD", SeriesType.Candle, 0)
        self.chart = Chart("Overlay Plot")
        self.chart.AddSeries(self.candles)
        self.AddChart(self.chart)

    def OnData(self, data):
        
        time = self.UtcTime
        self.Debug("OnData time: " + str(time))
        
    def OnDataConsolidated(self, bar):
        
        self.currentBar = bar
        time = self.UtcTime
        self.Debug("OnDataConsolidated time: " + str(time))
        
        self.candles.AddPoint(time + timedelta(minutes=1), self.Securities["EURUSD"].Open)
        self.candles.AddPoint(time + timedelta(minutes=2), self.Securities["EURUSD"].High)
        self.candles.AddPoint(time + timedelta(minutes=3), self.Securities["EURUSD"].Low)
        self.candles.AddPoint(time + timedelta(minutes=4), self.Securities["EURUSD"].Close)