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, timedelta

class WhoItsWhatsIts(QCAlgorithm):

    def Initialize(self):
        
        # set cash, dates, and brokerage fees
        self.SetCash(100000)
        self.SetStartDate(2017,3,1)
        self.SetEndDate(2017,5,1)
        self.SetBrokerageModel(BrokerageName.OandaBrokerage)
        
        # holds symbol data
        self.Data = {}
        
        # resolution designations
        self.PR = Resolution.Hour
        self.IR = Resolution.Hour
            
        # initialize forex pairs
        self.pairs =["USDJPY", "AUDUSD", "NZDUSD", "USDCAD", "EURUSD", "EURJPY"]
        for symbol in self.pairs:
            if symbol not in self.Data:
                fx = self.AddForex(symbol, self.PR, Market.Oanda)
                self.Data[symbol] = fx
            else:
                break
            
        # initialize indicators for all pairs
        for symbol in self.Data.items():
            self.macd = self.MACD(fx.Symbol, 11, 25, 8, self.IR)
            self.sma = self.SMA(fx.Symbol, 18, self.IR)
            self.rsi = self.RSI(fx.Symbol, 14, self.IR)
            
    def OnEndOfDay(self):
        
        # plot indicators
        for fx in self.Data:
            self.PlotIndicator("MACD", self.macd)
            self.PlotIndicator("SMA", self.sma)
            self.PlotIndicator("RSI", self.rsi)