I have been blown away with what an awesome C#-tweakable backtesting engine Ninja Trader is and am EXTREMELY close to creating a custom application with it, but I believe that I have found an actual Ninja Trader bug that is keeping my application from being usable.
Here is the problem (image of chart and output window are attached. Chart makes the problem very easy to understand.):
1. I enter a Long position with order named "Stop LE 30".
2. I later enter another Long position with order named "Stop LE 31".
3. I later ATTEMPT to exit the second order ("Stop LE 31") with an order called "X_Stop LE 31", BUT it bizarrely exits "Stop LE 30".
4. I later ATTEMPT to exit the first order ("Stop LE 30") with an order called "X_Stop LE 30", BUT it bizarrely exits "Stop LE 31".
I am using the proper entry signal names each time, as can be seen by the image of the attached Output log, which shows that I am using the proper Entry Signal Names even according to the internal Ninja Trader engine.
I have attached an image of a chart with two entries and two exits, and an image of the corresponding rows that were printed to the Output Window from both the internal NinjaTrader TraceOrders feature, as well as rows from my Print statements before and after I call each Enter and Exit function.
Notice how the chart drew the connecting lines between the wrong entries and exits, and notice how the Ninja Trader's TraceLog shows that the internal Order Handling of Ninja Trader appears to be ATTEMPTING to PROPERLY match up the entries and exits, yet the entries and exits on the Chart (and on the (not attached) Trades performance grid) are matched up incorrectly.
A few details...
1. I have three time frames on the chart: 1) 1 minute, 2) Daily, and 3) 1 minute again.
2. Entries are written like:
EnterLong(2, 1, entryName);
3. Exits are written like:
this.ExitLong(2, 1, "X_" + entryOrder.Name, entryOrder.Name);
Thank you to ANYBODY who can help me out here!
ChiTrader2000

Comment