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:
@@ -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
|
||||
Reference in New Issue
Block a user