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
from datetime import datetime

class Sample(QCAlgorithm):

    def Initialize(self):

        self.SetStartDate(2014, 4, 1)   
        self.SetEndDate(2014, 9, 1) 
        self.SetCash(100000)    
        appl_1m = self.AddEquity("AAPL", Resolution.Minute)
        self.appl_1m = appl_1m.Symbol
        appl_1h = self.AddEquity("AAPL", Resolution.Hour)
        self.appl_1h = appl_1h.Symbol
        appl_1d = self.AddEquity("AAPL", Resolution.Daily)
        self.appl_1d = appl_1d.Symbol

        stockPlot = Chart("AAPL")
        stockPlot.AddSeries(Series("Minute Resolution", SeriesType.Line, 0))
        stockPlot.AddSeries(Series("Hourly Resolution", SeriesType.Line, 0))
        stockPlot.AddSeries(Series("Daily Resolution", SeriesType.Line, 0))
        self.AddChart(stockPlot)
        
    def OnData(self, data):
        if data[self.appl_1m] and data[self.appl_1h] and data[self.appl_1d]:
            self.value_minute = data[self.appl_1m].Value
            self.value_hour = data[self.appl_1h].Value
            self.value_day = data[self.appl_1d].Value
        
    def OnEndOfDay(self):
        self.Plot("AAPL", "Minute Resolution", self.value_minute)
        self.Plot("AAPL", "Hourly Resolution", self.value_hour)  
        self.Plot("AAPL", "Daily Resolution", self.value_day)