I believe I am reporting 2 separate issues here - at least, this is my understanding.
Issue #1 : I am testing a strategy using MarketReplay. Even though I did specify a custom FillType ("BetterThanDefault"), Ninja apparently uses the "Default" FillType.
I "know" this because I created the "BetterThanDefault" FillType to always enforce that stops are executed at least at the specified stop-price + slippage, regardless of the H/L of the bar on which the stop is executed.
Note: I have previously backtested the strategy on ~3years of tick-data, using the "BetterThanDefault" FillType, and I know for a fact that it does exactly what it is supposed to do.
I have seen in MarketReplay several instances of stop executed without slippage, including the one which is the subject for the next issue.
Issue #2 : The trade displayed on screen is using MarketReplay with data downloaded from Ninja server. The main timeframe used is Volume-100. The strategy actually places all its orders on a secondary timeframe, which is set on Second-1. The trade is a long taken on CL 06-12 at 9:18am EST. The stop level is set at 97.16, and the stop is triggered at 9:43:51am. There are 3 bars on the main timeframe which all have the same 9:43:51am timestamp. It is the 3rd bar that should triggers the stop. However, the stop appears to be triggered by the 1st of these 3 bars, and executed on the 2nd one, resulting in a price execution which is plain wrong.
I believe that the following is happening: because the trades are executed on the 2nd timeframe, the stop is triggered after the 1st bar on the main timeframe (which it should, as the 1-second bar includes all 3 V100 bars). However, Ninja appears to use the 1st timeframe in the FillType method, and as a result the execution price is wrong (it would be correct if Ninja was using the 2nd timeframe H/L to compute the execution price).
I do believe this problem is specific to MarketReplay, as it doesn't happen when simply loading the strategy on a chart for CL 06-12 on 10/5/2012.
Please understand those 2 issues are important to me, I am still in the process of evaluating NinjaTrader, I have spent the last 4 weeks porting a complex strategy (~5000 lines) with backtesting result pretty much identical to my current platform (I understand exactly why a few trades have slightly different outcome), this is the next step - validating the real-time behavior of the strategy using MarketReplay.
Regards
Dominique

Comment