Can I edit a balancing trade...? #915
-
... or delete it (and related objects) and create a new one? I screwed up a balancing trade before properly understanding what they were for. I'd like to delete and start again. I have found the MongoDB document in the _BROKER_HISTORIC_ORDERS collection, and its parent and grandparent in the contract and strategy collections. If I delete the whole chain will that work, or is there more? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I'd wait to see what Rob says on this one, but I do have a couple thoughts...
|
Beta Was this translation helpful? Give feedback.
-
I've modified strategic_historic_orders before to delete orders that were created by accident but had not yet been sent to stack handler and it went well. In paper trading I had to delete a bunch of orders in the various mongo stacks (instrument, broker, contract) and it did lead to some issues later. For example, the documents keep track of the current index and sometimes that can screw up future orderIDs. Another balance trade might be the safest option, if not the prettiest. Another option might be to restore a prior version of mongo if this JUST happened and there aren't actually any real trades that have taken place. I would think all you'd lose are price updates, spreads? |
Beta Was this translation helpful? Give feedback.
-
Thanks all |
Beta Was this translation helpful? Give feedback.
I'd wait to see what Rob says on this one, but I do have a couple thoughts...
I would think you'd also have to modify the position data. To me, deleting the order data is secondary, and I probably wouldn't even bother.
Continuing on those lines, it seems like it would be easier just to do another balance trade that reverses the original. You'd still have the record of the 2 trades that didn't actually happen, but I can't think of how that would cause any problems.