Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical backtesting - trade in a one day lag

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

    Historical backtesting - trade in a one day lag

    Hi,

    I am new to ninjatrader, and trying to figure something -
    I have the following code, and I debug it using VS back testing with day bars. The limit price is greater than the short price, and the low of the day is lower than the stop price, however, in the back testing results the trade is being recorded on the next day at 07:00:00. what is the reason for that ?

    the code is :

    if (Low[0] <= ShortPrice )
    {
    EnterShortStopLimit(QTY, LimitPrice, ShortPrice, "short");

    }

    #2
    Hello,

    Thanks for the forum post and welcome.

    In NinjaTrader with historical processing the order engine takes all order action at the OPEN of the next bar price after the condition is true for fill. We take this approach as we believe it is more accurate in most chart types.

    -Brett
    BrettNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X