Modified the position handling to fix a pricing bug, so that locally handled Portfolio values match those of OANDA (up to slippage).
This commit is contained in:
@@ -20,7 +20,7 @@ class TestStrategy(object):
|
||||
self.invested = False
|
||||
|
||||
def calculate_signals(self, event):
|
||||
if event.type == 'TICK':
|
||||
if event.type == 'TICK' and event.instrument == self.pairs[0]:
|
||||
if self.ticks % 5 == 0:
|
||||
if self.invested == False:
|
||||
signal = SignalEvent(self.pairs[0], "market", "buy", event.time)
|
||||
|
||||
Reference in New Issue
Block a user