Added remaining trading system around portfolio in order to compare with OANDA.

This commit is contained in:
Michael Halls-Moore
2015-02-03 13:33:33 +00:00
parent dbc973567a
commit b0b19d603d
13 changed files with 255 additions and 15 deletions
+28
View File
@@ -0,0 +1,28 @@
class Event(object):
pass
class TickEvent(Event):
def __init__(self, instrument, time, bid, ask):
self.type = 'TICK'
self.instrument = instrument
self.time = time
self.bid = bid
self.ask = ask
class SignalEvent(Event):
def __init__(self, instrument, order_type, side):
self.type = 'SIGNAL'
self.instrument = instrument
self.order_type = order_type
self.side = side
class OrderEvent(Event):
def __init__(self, instrument, units, order_type, side):
self.type = 'ORDER'
self.instrument = instrument
self.units = units
self.order_type = order_type
self.side = side