NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 01-28-2009, 06:30 PM   #1
ChiTrader2000
Senior Member
 
Join Date: Nov 2008
Posts: 160
Thanks: 0
Thanked 0 times in 0 posts
Default Can 15-Minute Bar Backtest bars start on 7:20AM Session Start instead of 7:15 AM?

Hello,

When backtesting a 15 minute bar strategy on a contract that opens at 7:20 AM, I noticed that that the first 15 minute bar starts at 7:15 AM each day instead of starting at 7:20 on the open, making the first 15 minute bar only a 10 minute bar.

Is there any way I can get my 15 minute bar backtest bars to start on the open, at 7:20 AM, so that the first 15 minute bar is made up of the first 15 minutes of market activity after the Session Open?

Thanks in
advance,

ChiTrader2000
ChiTrader2000 is offline  
Reply With Quote
Old 01-29-2009, 06:19 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
Default

Hi ChiTrader2000, which market are you referring to? NinjaTrader will always use the closing time to stamp the bar.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-29-2009, 08:53 AM   #3
ChiTrader2000
Senior Member
 
Join Date: Nov 2008
Posts: 160
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello NinjaTrader_Bertrand,

One example of a market I am having a problem with is CME Live Cattle, which opens at 9:05.

When backtesting as well as charting CME Live Cattle with 15 minute bars, the first bar ends at 9:15 and contains only 10 minutes of data.

I would like the first 15 minute bar in a CME Live Cattle back test to contain a full 15 minutes of data, starting from 9:05 and ending at 9:20.

Is this possible in Ninja Trader?

Thank you very much for the help!

ChiTrader2000
ChiTrader2000 is offline  
Reply With Quote
Old 01-29-2009, 04:55 PM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
Default

Hi ChiTrader2000, you are welcome. I would also expect a bar from 9:05 to 9:20 but I will test this on my end. Which datafeed or broker are you on? Please also sync up your PC clock time and see if that makes any difference in your chars. Thanks!
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 01-30-2009, 09:59 AM   #5
ChiTrader2000
Senior Member
 
Join Date: Nov 2008
Posts: 160
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello NinjaTrader_Bertrand,

Thank you very much for your information and your time.

I have figured out that my problem was that I wasn't setting the "Session begins (local time)" and "Session ends (local time)" values in the backtest dialog box.

Once I did this, the 15 minute bar started at the open time, and ended 15 minutes later, as I desired. This is perfect.

Thank you once again for the help!

ChiTrader2000
ChiTrader2000 is offline  
Reply With Quote
Old 01-30-2009, 10:29 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,414
Thanks: 252
Thanked 978 times in 961 posts
Default

Hi ChiTrader2000, you are welcome - great you got it figured out.
NinjaTrader_Bertrand 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
Session Start/End Settings boblin Charting 2 09-14-2010 03:44 AM
Problem with Session Start Time bridenour Automated Trading 12 01-14-2009 11:50 AM
Different prices on 3 min vs 15 second bars Uncas Miscellaneous Support 5 05-31-2008 02:09 PM
SuperDome freezes for 15-30 seconds after order filled nightowl Miscellaneous Support 22 09-25-2007 01:43 PM
Session Start/End Time MindSabre General Programming 1 04-29-2007 12:29 AM


All times are GMT -6. The time now is 10:05 PM.