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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    56 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X