Moved streaming.py into data directory. Modified how trading.py and backtest.py behave so that the price streaming is fixed.

This commit is contained in:
Michael Halls-Moore
2015-04-23 12:45:40 +01:00
parent e84512e1e7
commit 8e74edb4f7
6 changed files with 139 additions and 137 deletions
+2 -1
View File
@@ -42,12 +42,13 @@ class OANDAExecutionHandler(ExecutionHandler):
return httplib.HTTPSConnection(self.domain)
def execute_order(self, event):
instrument = "%s_%s" % (event.instrument[:3], event.instrument[3:])
headers = {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer " + self.access_token
}
params = urllib.urlencode({
"instrument" : event.instrument,
"instrument" : instrument,
"units" : event.units,
"type" : event.order_type,
"side" : event.side