Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

backtests do not take into consideration chronology of trades inside a bar?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    backtests do not take into consideration chronology of trades inside a bar?

    Hello,

    I programmed my strategy in Ninja, and I first ran a backtest today, and I dont understand the results of the backtest. For instance, I got a buy signal in the ES yesterday (July 15th), buying at 1089, at 14:40, and this is right; but then there is also a stop loss hit at 1086.75 at 14:40. This is wrong, because once the market hit 1089 yesterday, it never came back to 1086.75; the lowest was 1088.50. I am running the strategy on 5 min charts, and the bar that triggered the signal has a low at 1086, but this was the start of the move, not the end of the move...

    How can I resolve this problem? With such a logic in the simulator, it is impossible to backtest any strategy... My data feed is zenfire. Would imported tick by tick data solve the problem?

    Thank you,
    Guillaume

    #2
    Guillaume, please take a look at the reference sample we have titled backtesting NinjaScript Strategies with an intrabar granularity.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    66 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    36 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    59 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X