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 > Application Technical Support > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Old 07-02-2010, 08:54 AM   #1
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
Default Multi-timeframe strategy skips lower timeframe bars at one point

My strategy uses 60min bars and 1min bars and on one day on GBPUSD - 2010-03-09 - it doesn't execute the 1min bars.

I print out the OHLC on every bar to make debugging easier and I don't see any print() in the output for the 1min bars on this date.

What should I be looking for here? What could stop the onBarUpdate event from firing?

The only suspicious thing I see is that the price gaps down 50 points at midnight 2010-03-08.

I tested using one of the sample strategies

Ah, actually looking at the minute bars in the chart for the sample strategy, it shows no minute bars for 2010-03-09 until 22:16 (the forex session start) which accounts for the apparent gap on the chart, but the data is there in the HDM for the whole day from 00:01 to 00:00

What could this be down to?

Thanks
Last edited by adamus; 07-02-2010 at 08:57 AM.
adamus is offline  
Old 07-02-2010, 09:14 AM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello adamus,

The strategy will execute bars for the day starting at the time defined in your session template. What results do you get when switching this to Default 24 / 7 ?
Attached Images
File Type: gif stratSessionTemplate.png (41.8 KB, 5 views)
NinjaTrader_RyanM is offline  
Old 07-02-2010, 10:37 AM   #3
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
Default

Setting the Session Template to 24/7 sorts out the data on that date. But it is forex and it should be showing all the data for the day, just as the rest of the days have, and just as the rest of the instruments do.

Or was there something special about 2010-03-09? Was it a holiday? Is that recorded in NT?
adamus is offline  
Old 07-02-2010, 11:05 AM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

NinjaTrader does not designate Holidays. I'm not sure why 3-9-10 would work differently than other days for the same instrument and session template.

Can you share the following and I'll test here:
  • The code you're using to print
  • Instrument applied
  • Which Data Provider you're using.
  • Time Zone
  • Session Template used
NinjaTrader_RyanM is offline  
Old 07-02-2010, 01:41 PM   #5
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
Default

It's GBPUSD

Interactive Brokers

Timezone London / Dublin

Session Template Forex (default for instrument)

Code:
                string ohlc = "O[" + Open[0].ToString(getFormat(TickSize)) + "] H[" +
                    High[0].ToString(getFormat(TickSize)) + "] L[" +
                    Low[0].ToString(getFormat(TickSize)) + "] C[" +
                    Close[0].ToString(getFormat(TickSize)) + "]";
                Print(Time[0] + " " + ohlc);
adamus is offline  
Old 07-02-2010, 02:03 PM   #6
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

adamus,

Are you saying you don't see the data being charted at all? Or are you saying the data is being charted but just not processed?
NinjaTrader_Josh is offline  
Old 07-02-2010, 02:10 PM   #7
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
Default

The 60 mins bars (the primary timeframe) is charted and processed, but the 1 min bars aren't charted anyway. I'm looking at the chart on the strategy analyzer results.

But the 1min bars are not processed on that day before 22:15 GMT+0 (session start) because I see my exit order on that timeframe isn't hit until 22:15 and there are no Print()s from 1 min onBarUpdates.
adamus is offline  
Old 07-02-2010, 02:17 PM   #8
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

adamus,

Please be specific as to what instruments you are using exactly. What is the primary, what is the secondary? What is the session template applied to the primary series?
NinjaTrader_Josh is offline  
Old 07-02-2010, 02:45 PM   #9
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
Default

This is on the GBP-USD forex pair. The primary bars are the 60mins, the second bars are the 1mins. The session template applied is the default selection on the Strategy property "Use instrument settings" and the instrument settings are unchanged from the installation, i.e. it is the Forex session template.
adamus is offline  
Old 07-02-2010, 02:59 PM   #10
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Please test with attached strategy. It works on my end for both 60min prints and 1min prints. Tested dates: 3/3/2010 to 3/10/2010.

The 3/9 date printed all accurately.
Attached Files
File Type: zip OBUSecondaryTest.zip (1.1 KB, 11 views)
NinjaTrader_Josh is offline  
Old 07-02-2010, 03:16 PM   #11
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
Default

Hi Josh, I'm unable to unzip it. Can you check it please?
adamus is offline  
Old 07-02-2010, 03:17 PM   #12
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

adamus,

You do not need to unzip it. Please import the zip file through the NT import NinjaScript utility. http://www.ninjatrader.com/support/h...nt7/import.htm
NinjaTrader_Josh is offline  
Old 07-02-2010, 05:42 PM   #13
adamus
Senior Member
 
Join Date: Apr 2010
Posts: 1,057
Thanks: 32
Thanked 2 times in 1 post
Default

This is what I get:


BarsInProgress: 1 Time: 08/03/2010 23:55:00
BarsInProgress: 1 Time: 08/03/2010 23:56:00
BarsInProgress: 1 Time: 08/03/2010 23:57:00
BarsInProgress: 1 Time: 08/03/2010 23:58:00
BarsInProgress: 1 Time: 08/03/2010 23:59:00
BarsInProgress: 0 Time: 09/03/2010 00:00:00
BarsInProgress: 1 Time: 09/03/2010 00:00:00
BarsInProgress: 0 Time: 09/03/2010 01:00:00
BarsInProgress: 0 Time: 09/03/2010 02:00:00
BarsInProgress: 0 Time: 09/03/2010 03:00:00
BarsInProgress: 0 Time: 09/03/2010 04:00:00
BarsInProgress: 0 Time: 09/03/2010 05:00:00
BarsInProgress: 0 Time: 09/03/2010 06:00:00
BarsInProgress: 0 Time: 09/03/2010 07:00:00
BarsInProgress: 0 Time: 09/03/2010 08:00:00
BarsInProgress: 0 Time: 09/03/2010 09:00:00
BarsInProgress: 0 Time: 09/03/2010 10:00:00
BarsInProgress: 0 Time: 09/03/2010 11:00:00
BarsInProgress: 0 Time: 09/03/2010 12:00:00
BarsInProgress: 0 Time: 09/03/2010 13:00:00
BarsInProgress: 0 Time: 09/03/2010 14:00:00
BarsInProgress: 0 Time: 09/03/2010 15:00:00
BarsInProgress: 0 Time: 09/03/2010 16:00:00
BarsInProgress: 0 Time: 09/03/2010 17:00:00
BarsInProgress: 0 Time: 09/03/2010 18:00:00
BarsInProgress: 0 Time: 09/03/2010 19:00:00
BarsInProgress: 0 Time: 09/03/2010 20:00:00
BarsInProgress: 0 Time: 09/03/2010 21:00:00
BarsInProgress: 0 Time: 09/03/2010 22:00:00
BarsInProgress: 1 Time: 09/03/2010 22:16:00
BarsInProgress: 1 Time: 09/03/2010 22:17:00
BarsInProgress: 1 Time: 09/03/2010 22:18:00
BarsInProgress: 1 Time: 09/03/2010 22:19:00
BarsInProgress: 1 Time: 09/03/2010 22:20:00
adamus is offline  
Old 07-03-2010, 01:36 AM   #14
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
Default

adamus, which datafeed would you use in this example? It seems you're missing data to me, have you tried after a fresh reload of all series used?
NinjaTrader_Bertrand is offline  
 

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
global draw object getting changed in lower timeframe chart mmtrader Version 7 Beta General Questions & Bug Reports 3 04-20-2010 08:27 AM
Example of Multi-Timeframe Strategy laocoon Strategy Development 1 04-20-2010 07:55 AM
How to get higher timeframe data to make entry decision at lower timeframe? cunparis Strategy Development 1 03-11-2009 12:41 PM
Multi-timeframe strategy w/daily bars not running bluelou Strategy Analyzer 5 08-28-2008 12:41 AM
Multi-Timeframe use in a Strategy Freddie Strategy Analyzer 25 05-30-2007 07:02 AM


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