Profile Picture

Pre OrderFilled event

Posted By rolfe 10 Years Ago
Posted Sunday July 20 2008
When I'm backtesting end-of-day strategies, I put in a limit order for every symbol on the watchlist every day and I rely on the MaxOpenPositions variable to limit the number of positions actually opened. It would be nice to be able to approve orders at the last minute though so I could say "If this is a Healthcare stock, I've already picked up 3 stocks in the Healthcare sector today, then don't actually place this order."
Posted Sunday July 20 2008
Why don't you just cancel all healthcare limit orders once the third one was filled in a day? This would match the way you would handle it in live trading.

I believe this approach will work but you should test it because there may be a timing issue where the cancellation won't be processed until all orders for the bar have already been filled.


Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems