Skip to content

Commit 7137fdf

Browse files
committed
Bug fix in logic. Be sure to run UpdatePlaceOrder
Changes to be committed: modified: Base/OANDA-PlaceOrder
1 parent 8442986 commit 7137fdf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Base/OANDA-PlaceOrder

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ def main():
278278
relay.JRLog.Write(f'|- Minimum Amount: {minimum:.8f}')
279279
relay.JRLog.Write(f'|- Minimum Cost: {mincost:.8f}')
280280
else:
281-
if '%' in relay.Order['Units'] or '%b' in relay.Order['Units']:
282-
price=(ticker['Ask']+ticker['Bid'])/2
283-
amount=int(GetPCTamount(relay,price))
284-
elif '%%' in relay.Order['Units'] or '%m' in relay.Order['Units']:
281+
if '%%' in relay.Order['Units'] or '%m' in relay.Order['Units']:
285282
price=(ticker['Ask']+ticker['Bid'])/2
286283
amount=int(GetPCTamount(relay,price,margin=True))
284+
elif '%' in relay.Order['Units'] or '%b' in relay.Order['Units']:
285+
price=(ticker['Ask']+ticker['Bid'])/2
286+
amount=int(GetPCTamount(relay,price))
287287
else:
288288
amount=int(relay.Order['Units'].split('.')[0])
289289

0 commit comments

Comments
 (0)