Only flip size sign for seels if not already -ve
parent
928765074f
commit
589232d12d
|
@ -124,7 +124,10 @@ class PaperBoi(Struct):
|
||||||
# in the broker trades event processing loop
|
# in the broker trades event processing loop
|
||||||
await trio.sleep(0.05)
|
await trio.sleep(0.05)
|
||||||
|
|
||||||
if action == 'sell':
|
if (
|
||||||
|
action == 'sell'
|
||||||
|
and size > 0
|
||||||
|
):
|
||||||
size = -size
|
size = -size
|
||||||
|
|
||||||
msg = BrokerdStatus(
|
msg = BrokerdStatus(
|
||||||
|
|
Loading…
Reference in New Issue