NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 09-05-2012, 12:08 PM   #1
dillen
Junior Member
 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default 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");

}
dillen is offline  
Reply With Quote
Old 09-05-2012, 12:29 PM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

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
NinjaTrader_Brett is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Backtesting, historical data and current day eod puravida Strategy Analyzer 3 03-19-2012 07:21 AM
Indicators lag one day x3000gold Charting 3 12-01-2011 02:31 AM
Lag with market replay connection - does this reflect actual lag? AntiMatter Miscellaneous Support 3 02-25-2011 08:58 AM
Backtesting does not consider last day Beauregard Strategy Analyzer 11 05-13-2010 10:01 AM
Working with "Trade Class" on a day-by-day basis AnotherTrader Automated Trading 2 01-22-2010 07:45 AM


All times are GMT -6. The time now is 11:06 PM.