Only flip size sign for seels if not already -ve

rekt_pps
Tyler Goodlet 2023-04-10 22:17:27 -04:00
parent 928765074f
commit 589232d12d
1 changed files with 4 additions and 1 deletions

View File

@ -124,7 +124,10 @@ class PaperBoi(Struct):
# in the broker trades event processing loop
await trio.sleep(0.05)
if action == 'sell':
if (
action == 'sell'
and size > 0
):
size = -size
msg = BrokerdStatus(