Skip to content

Commit

Permalink
Diagnostics...
Browse files Browse the repository at this point in the history
Changes to be committed:
	modified:   Extras/OliverTwist/OliverTwistEquity
	modified:   Extras/OliverTwist/OliverTwistTrades
  • Loading branch information
rapmd73 committed Sep 23, 2024
1 parent 34249c0 commit a2f9560
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Extras/OliverTwist/OliverTwistEquity
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ else:
lines=JRRsupport.ReadFile(sys.argv[2]).strip().split('\n')

for line in lines:
if line=='' or ('Prft' not in line and 'Loss' not in line):
if line=='' or ('prft' not in line.lower() and 'loss' not in line.lower()):
continue

data=line.split(' ')
Expand All @@ -67,9 +67,9 @@ for line in lines:

pdata=line.split('/')[1].strip().split(',')[0]

if 'Prft' in line:
if 'prft' in line.lower():
pnl+=float(pdata)
if 'Loss' in line:
if 'loss' in line.lower():
pnl-=float(pdata)

xps.append(dt)
Expand Down
2 changes: 1 addition & 1 deletion Extras/OliverTwist/OliverTwistTrades
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ for order in OpenOrders:
du=float(order['Response']['Details']['Amount'])
dp=float(order['Response']['Details']['Price'])
else: # CCXT framework fall through
du=float(order['Response']['Details']['Amount'])
du=float(order['Response']['Details']['amount'])
dp=float(order['Response']['Details']['price'])

htxt=f"{order['ID']}: {du:.0f}@{dp:.5f}"
Expand Down

0 comments on commit a2f9560

Please sign in to comment.