I am attempting to fine-tune the usage of 'TrailStop()', and while reviewing the trades my strategy is creating I have noticed several horrible trail stops being inserted near daily market openings shortly after 9:30 am.
Generally my TrailStops are working well and get me out of a ton of problems but in conditions where the equity experiences a sharp drop in pre-market hours the trailstop will trigger right at market open and internalize my losses at the worst possible time...
What I would like to do in these situations is have the opportunity to review the circumstances of a trailing stop being created and pro grammatically cancel it if market conditions are bad. (In that situation I'd ask the code to cancel the ill-advised trail stop, leave the position open, and send me an email so that I can manually close that losing position in better market conditions (e.g. later in the day)
Is there an override function that can notify me of a position that is about to be closed so that I can cancel 'bad closes' and avoid horrible morning losses?
Thanks for the awesomeness!
Jean-Pierre
Comment