Overall Statistics Total Trades0Average Win0%Average Loss0%Compounding Annual Return0%Drawdown0%Expectancy0Net Profit0%Sharpe Ratio0Loss Rate0%Win Rate0%Profit-Loss Ratio0Alpha0Beta0Annual Standard Deviation0Annual Variance0Information Ratio0Tracking Error0Treynor Ratio0Total Fees\$0.00
```class DualThrustAlgorithm(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 = {}
self.SymbolData = {}

# 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:
self.Data[symbol]= fx
else:
break

# initialize indicators for all pairs
for symbol in self.Data.keys():
macd = self.MACD(symbol, 11, 25, 8, self.IR)
sma = self.SMA(symbol, 18, self.IR)
rsi = self.RSI(symbol, 14, self.IR)
self.SymbolData[symbol] = SymbolData(symbol,macd,sma,rsi)

## Create three Charts
macdPlot = Chart('MACD')
smaPlot = Chart('SMA')
rsiPlot = Chart('RSI')

## Loop through SymbolData object dictionary and add a Series for each symbol and each indidcator
for symbol, symbolData in self.SymbolData.items():

def OnData(self, data):
pass

def OnEndOfDay(self):
for symbol, symbolData in self.SymbolData.items():
self.Debug(symbol)
self.Debug(symbolData.MACD.Current.Value)
self.Debug(symbolData.SMA.Current.Value)
self.Debug(symbolData.RSI.Current.Value)

## Plot each indicator value for each SymbolData object on the appropriate Chart
self.Plot('MACD', '{}_MACD'.format(symbol), symbolData.MACD.Current.Value)
self.Plot('SMA', '{}_SMA'.format(symbol), symbolData.SMA.Current.Value)
self.Plot('RSI', '{}_RSI'.format(symbol), symbolData.RSI.Current.Value)

class SymbolData(object):

def __init__(self, symbol, macd, sma, rsi):
self.Symbol = symbol
self.MACD = macd
self.SMA = sma
self.RSI = rsi```
```"""The reason why you can't produce any more indicators than the final pair in the list,
is because the code keeps on overriding self.macd, self.sma and self.rsi.
In order to save the objects once created, try creating a SymbolData object like so:

class SymbolData(object):
def __init__(self, symbol, macd, sma, rsi):
self.Symbol = symbol
self.MACD = macd
self.SMA = sma
self.RSI = rsi

This SymbolData object can be stored in a dictionary that is keyed by the symbol
just like self.Data in the above code. This way the indicators for each symbol will be properly stored.
The backtest below shows a possible implementation."""```