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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 09-18-2010, 11:38 PM   #1
Shansen
Senior Member
 
Join Date: Jan 2009
Location: Melbourne
Posts: 178
Thanks: 3
Thanked 0 times in 0 posts
Default NT7 - Multi-timeframes multi instruments

All,

A question in relation to NT7 multi-timeframe multi-instrument strategies.
The below code snippet is executed as part of a strategy on a 10min chart.
Code:
protected override void Initialize()
{
  Add(PeriodType.Minute,30);
  Add("^SP500",PeriodType.Minute,10);
  Add("^SP500",PeriodType.Minute,30); 
}

protected override void OnBarUpdate()
{
  if (FirstTickOfBar) 
  {
    if (CurrentBar < 200) return;
    Print (Time.ToString() + " - " + BarsInProgress);
  }
}
I would have expected a result similar to the below list.
17/09/2010 11:30:00 AM - 0
17/09/2010 11:30:00 AM - 1
17/09/2010 11:30:00 AM - 2
17/09/2010 11:30:00 AM - 3
17/09/2010 11:40:00 AM - 0
17/09/2010 11:40:00 AM - 2
17/09/2010 11:50:00 AM - 0
17/09/2010 11:50:00 AM - 2
17/09/2010 12:00:00 AM - 0
17/09/2010 12:00:00 AM - 1
17/09/2010 12:00:00 AM - 2
17/09/2010 12:00:00 AM - 3
However, BarUpdates are not being processed as expected, it seems BarUpdates are being randomly skipped.


Regards
Shannon
Shansen is offline  
Reply With Quote
 

Tags
firsttickofbar, instruments, multi, nt7, timeframe

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
SetStopLoss() in multi timeframes DarthTraderson Strategy Development 11 03-01-2013 03:39 AM
Multi TimeFrames -- 2nd Secondary dpennypacker Version 7 Beta General Questions & Bug Reports 7 06-30-2010 04:38 PM
Problem with multi instruments?.. Godo78 Strategy Development 7 05-12-2010 04:15 PM
RSI (multi timeframes) returned values are different between Ninja 6.5 and 7 Jean-Marc-Molina Version 7 Beta General Questions & Bug Reports 6 11-16-2009 08:51 AM
How to strategy test against multi timeframes ? wcredle Strategy Analyzer 1 03-13-2009 03:37 PM


All times are GMT -6. The time now is 02:26 AM.