Skip to content

Commit

Permalink
Variable convertion error. Was passing number, when should have been …
Browse files Browse the repository at this point in the history
…passing string.

Changes to be committed:
	modified:   Base/Library/OliverTwist-oanda.py
  • Loading branch information
rapmd73 committed Sep 24, 2024
1 parent 9d0802b commit e098105
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16,072 deletions.
4 changes: 2 additions & 2 deletions Base/Library/OliverTwist-oanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def ReduceLotSize(relay,oldestTrade=None,val=1):
newOrder['Action']=Action.lower()
if 'EnforceFIFO' in Order:
newOrder['EnforceFIFO']=Order['EnforceFIFO']
newOrder['Units']=runits
newOrder['Units']=str(runits) # Must be a string
newOrder['Ticket']=str(lossID)
if 'OrderType' in Order:
newOrder['OrderType']=Order['OrderType']
Expand All @@ -266,7 +266,7 @@ def ReduceLotSize(relay,oldestTrade=None,val=1):
# Feed the new order to Relay
result=relay.SendWebhook(newOrder)
oid=relay.GetOrderID(result)
relay.JRLog.Write(f"RLS E: {oid}")
relay.JRLog.Write(f"RLS E: {result}")
if oid!=None:
orderDetail=relay.GetOrderDetails(OrderID=oid)

Expand Down
Loading

0 comments on commit e098105

Please sign in to comment.