NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-20-2011, 07:52 AM   #1
DaveE
Senior Member
 
Join Date: Mar 2010
Posts: 106
Thanks: 6
Thanked 1 time in 1 post
Default loading & processing required number of bars for multi-time

I want to use information from many previous days (say SMA(20) on close of day) on a small scale chart (say 1 minute).

Problem1: I need to specify "days to load" > 20 (on primary series) to get 20 day bars to load. For instance if I specify 20 it may only actually load say 12 bars (due to non-trading days). This means the SMA(20) will be inaccurate since it will really be giving figure for say SMA(12).

Problem 2: Even if I specify a large enough "days to load" (say 32) to get 20 day bars loaded, there is still the problem I don't want to fill up memory with 20 trading days worth of minute bars (even worse if I was using seconds or ticks), I only really want no more than the last day's worth of this. So is there some way of forcing the load/processing of an added long-duration period series, without loading the full equivalent calendar length of bars in the base short-duration series?

Possible solution:
NT adds another parameter (say "BarsToLoad") to the Add method. So instead of currently using
Code:
Add(PeriodType.Day,1);
to add an unknown number of day bars, I could use
Code:
Add(PeriodType.Day,1,20);
(where the last parameter is suggested "BarsToLoad").

When this new method was used NT would call OnBarUpdate for each of the requested number of BarsToLoad on the long-duration series (even if there was only a day or less of short-duration primary bars loaded).
DaveE is offline  
Reply With Quote
Old 09-20-2011, 09:52 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

Hi DaveE,

Thank you for your input regarding enhancing NinjaTrader; we will track your feedback using ID# 1280.
NinjaTrader_RyanM is offline  
Reply With Quote
The following user says thank you to NinjaTrader_RyanM for this post:
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
bars required for multi series dave1992 Miscellaneous Support 9 02-01-2011 07:55 AM
Multi-Time Frame Processing Question tazatek Strategy Development 5 04-06-2010 11:24 AM
Req: Access to number of historical bars processing tazatek Suggestions And Feedback 2 11-17-2009 01:34 AM
Suppress processing bars when loading strategy atrader101 Strategy Development 2 09-23-2009 03:45 AM
Multi-time frame and min. bars required tradervick Strategy Analyzer 1 09-21-2009 11:30 AM


All times are GMT -6. The time now is 11:52 AM.