How can tif = day be handled in the paper trader? I’m running a system where all orders valid for the day only. The only alternative I see is to cancel all pending orders at the beginning of each new system bar which unfortunately slows the simulation to a crawl. Setting BarCountExit to 0 or -1 still resulted in pending orders from the previous bar executed on the current. Calling SystemData.Broker.SubmitOrder did not result in any trades when working with the paper trader.
By default, orders should only be valid for one bar. So if your system bar frequency is daily, by default your orders should be cancelled after one bar. However, if you submit orders in the middle of a bar (ie in response to ticks), RightEdge doesn't count the bar they were submitted in, so they will also be valid for the bar after that.
Cancelling all pending orders shouldn't slow the system to a crawl. How were you cancelling them? If there are a large number of orders with a large number of symbols, it could slow it down if you try to cancel all the orders for all symbols in the NewBar code for each symbol or something.
Also, can you elaborate on the difference between position.BarCountExit and position.BarsValid?
BarsValid is a property of an order, and refers to how long RightEdge should wait before cancelling it if it hasn't been filled. On PositionSettings, it refers to the order used to open the position. BarCountExit is the number of bars after a position has been opened that it should be closed automatically.