Only flip size sign for seels if not already -ve

pre_overruns_ctxcancelled
Tyler Goodlet 2023-04-10 22:17:27 -04:00
parent 69d6e9bb4e
commit d29e9eeb31
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(