Hello,
I'm sure this has been requested before (and likely posted elsewhere); my question is about getting flat by end of day given a variety of circumstances.
1. Is anyone willing to share some code (VBA possibly) that will close all positions when run (a starting point for this discussion that I can provide - it won't be pretty however as I'm not a very good programmer)?
2. Can we start a discussion regarding the risks associated with such code and how to program around those risks:
- For example: data disconnection and subsequent redundant checks upon reconnect to make sure the account will be flat.
- S/W crash (not in IB's side) where the program can recover gracefully and guarantee the account is flat.
I realize that if IB servers are down, there's nothing one can do... my question is aimed at a more general issue of never getting stuck in anything overnight. Whether the solution is programmable, or, something else entirely (broker request, auto-liquidation etc).
Mike
I'm sure this has been requested before (and likely posted elsewhere); my question is about getting flat by end of day given a variety of circumstances.
1. Is anyone willing to share some code (VBA possibly) that will close all positions when run (a starting point for this discussion that I can provide - it won't be pretty however as I'm not a very good programmer)?
2. Can we start a discussion regarding the risks associated with such code and how to program around those risks:
- For example: data disconnection and subsequent redundant checks upon reconnect to make sure the account will be flat.
- S/W crash (not in IB's side) where the program can recover gracefully and guarantee the account is flat.
I realize that if IB servers are down, there's nothing one can do... my question is aimed at a more general issue of never getting stuck in anything overnight. Whether the solution is programmable, or, something else entirely (broker request, auto-liquidation etc).
Mike