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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    64 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    35 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
    51 views
    0 likes
    Last Post CarlTrading  
    Working...
    X