If a SHORT signal is triggered, the feed doneHandler will catch any filled or canceled orders. If canceled or filled partially, it will immediately place another sell order in an attempt to fill completely.
If the feed is still attempting to place orders and another SHORT signal gets triggered. It's possible that the feed-placed order and the SHORT signal triggered order get filled simultaneously. This causes the bot to sell double the position it should have, essentially selling assets that didn't belong to it.
rules:
if the feed is 'hot' or mid-ordering we should not allow the SHORT signal to place any order.
if a LONG signal occurs, cancel any sell-side orders placed by the feed and allow the signal-triggered order to occur. move to a separate issue
If a SHORT signal is triggered, the feed
doneHandler
will catch anyfilled
orcanceled
orders. If canceled or filled partially, it will immediately place another sell order in an attempt to fill completely.If the feed is still attempting to place orders and another SHORT signal gets triggered. It's possible that the feed-placed order and the SHORT signal triggered order get filled simultaneously. This causes the bot to sell double the position it should have, essentially selling assets that didn't belong to it.
rules:
if a LONG signal occurs, cancel any sell-side orders placed by the feed and allow the signal-triggered order to occur.move to a separate issue