Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mutongoi, Today, 01:15 AM
    0 responses
    5 views
    0 likes
    Last Post mutongoi  
    Started by kaywai, Yesterday, 11:43 PM
    0 responses
    6 views
    0 likes
    Last Post kaywai
    by kaywai
     
    Started by timmbbo, Yesterday, 11:17 PM
    0 responses
    4 views
    0 likes
    Last Post timmbbo
    by timmbbo
     
    Started by ETFVoyageur, Yesterday, 09:47 PM
    0 responses
    8 views
    0 likes
    Last Post ETFVoyageur  
    Started by ETFVoyageur, 05-26-2024, 05:02 PM
    6 responses
    41 views
    0 likes
    Last Post ETFVoyageur  
    Working...
    X