Either I have misunderstood some basic things in NinjaTrader regarding Strategies and execution or some results from the strategy tester are wrong.
As far as I have understood the time in Ninjatrader is to be understood as the endtime. Ex. if on an hourly chart it says 14.00 it means the timeframe from 13.00 - 14.00.
If that is true then something is not correct in the way the strategy engine generates the results.
So as you can see om the attached image where 60 m charts is on the left and the 5 min is on the right the trade is fired on the 14.00 candle. In the code as you can se from the output the order is put in at 13.00. As you also can see on the 60m chart the trade is a loss as it hits the stoploss. The issue now is if you look at the 13.00 - 14.00 bracket on the 5 min chart the price never comes even close to the stop loss price and in facts hits the take profit instead.
If this trade would have to be a loss it would need to be triggered at around 14.15 from above but that would again not fit with the other scenario as explained above.
Is my understanding of the basics in Ninjatrader wrong, or is something wrong with the strategy engine ?

Comment