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:
Michael Halls-Moore
2015-07-13 16:30:55 +01:00
parent be9ef2b54f
commit 675412c125
6 changed files with 73 additions and 60 deletions
+1 -1
View File
@@ -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)