Added some more unit tests for Portfolio and Position. Added a README and a requirements file now that qsforex is open-source under an MIT license.

This commit is contained in:
Michael Halls-Moore
2015-03-17 07:48:37 +00:00
parent 6c77cc1deb
commit d9a7444fc2
8 changed files with 189 additions and 39 deletions
+2 -3
View File
@@ -10,8 +10,7 @@ class TestStrategy(object):
def calculate_signals(self, event):
if event.type == 'TICK':
self.ticks += 1
if self.ticks % 5 == 0:
if self.ticks % 200 == 0:
if self.invested == False:
signal = SignalEvent(self.instrument, "market", "buy")
self.events.put(signal)
@@ -20,4 +19,4 @@ class TestStrategy(object):
signal = SignalEvent(self.instrument, "market", "sell")
self.events.put(signal)
self.invested = False
self.ticks += 1