alanwhite / thierrybot

Automates management of orders and positions on IG Index as directed by SMS messages
1 stars 0 forks source link

New order may be instructed without cancelling existing order #4

Open alanwhite opened 7 years ago

alanwhite commented 7 years ago

As per title, this was described as 'if I issue a new order underneath the existing one it means cancel it'. This implies that the sms should have directed us to Move the limit order.

We would need to check to see if there's an existing order for the instrument specified and if so cancel it, and create a new one. We could just follow the move order logic at that point, however if we do it this way we cater for when the direction of the order may be different. IE the new order is a BUY and the old a SELL.