I want to backtest a very simple strategy:
it runs off 480 min. bars, so there are exactly three bars per session: lets call them Bar0, Bar1, and Bar2. I want to evaluate some conditions on the close of thie first bar of the session,bar0, and enter a STOPMARKET order, either long or short, depending on the conditions. I set the stop to be above the market for LONG, and below for SHORT. I want this order to either fill during the following bar, (Bar1), or cancel itself if not filled at the bar close. From what I understand, this is normal default behaviour for limit orders in NT, which is great. However, when I run this strategy on a chart with historical data, the limit orders are submitted but immediately cancelled!!! Order fill resolution was set to NORMAL. From the documentation found here, I thought that NT would at least make an attempt to fill the order using the three virtual bar logic described in detail, but no. I then try the HIGH setting, with Minute bars for granuar infill, but the result is the same. The strategy is set to calculate OnBarClose. The strategy works fine when I use market orders, but the orders are simply entered on the open of the following bar, not at my desired stops.
In an effort to simplify, I dont want to have to add in a secondary data series and deal with BarsInProgess logic, but it appears there's no getting around it... unless I'm missing something obvious (quite possible)???
Hoping someone can explain the proper use of the HIGH order fill resolution setting, and perhaps provide a simple example to demonstrate the concept?
Comment