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 05-20-2010, 10:04 AM   #1
MicroTrends
Senior Member
 
Join Date: Nov 2009
Location: Portugal
Posts: 157
Thanks: 1
Thanked 11 times in 8 posts
Send a message via Skype™ to MicroTrends
Default Maximum Bars Look Back + Comparisons

CrossBelow(Close,Bollinger(BollStdDev,BollPeriod). Lower,1)
With Maximum Bars Look Back = 256 does not function the same as
Maximum Bars Look Back = Infinite

BollStdDev=2
BollPeriod=14

The same is true of:
Close[0]< Bollinger(BollStdDev,BollPeriod).Lower[0]


With 256 i get hundreds of signals with infinite i get the same behaviour as NT 6.5

I think i may missing something fundamental in my understanding - what would that be?
MicroTrends is offline  
Old 05-20-2010, 11:30 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thank you for your forum post.

The setting of Maximum Bar look back will effect your indicator values moving forward with some indicators. What other indicators methods do you use in your strategy?

You mention that with NT 7 you get hundreds of signals but with NT 6.5 you get the same behavior, this would be true as Maximum bars look back is a new feature in NT7 to help with improving performance for those indicators or strategies that didn't need more then then this to calculate. However 256 bars should be enough bars for this to calculate.

Is it possible you could post your code for testing on the forum or sending an email to support at ninjatrader dot com and reference this forum post so that we may test this and make sure everything is working as expected.


Let me know if I can be of further assistance.
NinjaTrader_Brett is offline  
Old 05-20-2010, 11:56 AM   #3
MicroTrends
Senior Member
 
Join Date: Nov 2009
Location: Portugal
Posts: 157
Thanks: 1
Thanked 11 times in 8 posts
Send a message via Skype™ to MicroTrends
Default

What I mean is the same code for the same period produces different results

NT6.5 results are correct
NT 7.0 with infinity are correct,
256 is not correct - the conditional statements have inconsistent results for the code posted.

If it returns true when the other doesn’t....

I will post some of the source to you - but it will take a while to pull it all out the classes etc - i will also post a image of it to clarify
MicroTrends is offline  
Old 05-20-2010, 01:13 PM   #4
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

I received the code and will be taking a look into it shortly.

Thank You for your patience.
NinjaTrader_Brett is offline  
Old 05-20-2010, 01:35 PM   #5
MicroTrends
Senior Member
 
Join Date: Nov 2009
Location: Portugal
Posts: 157
Thanks: 1
Thanked 11 times in 8 posts
Send a message via Skype™ to MicroTrends
Default

it seems to be ok with 30min bars - but 1 through to 15min are not

this is code being migrated over to 7. perhaps i missed something -
MicroTrends is offline  
Old 05-20-2010, 05:46 PM   #6
MXASJ
Senior Member
 
Join Date: May 2009
Location: Asia
Posts: 304
Thanks: 0
Thanked 9 times in 5 posts
Default

Try adding this to OnBarUpdate()

PHP Code:
if (CurrentBars[0] < 1) return; //first data series
if (CurrentBars[1] < 1) return; // second data series, etc 
That solved some issues I was having with an indicator that didn't play nicely with 1 min bars.

Just a thought, YMMV, etc.
MXASJ is offline  
Old 05-20-2010, 05:55 PM   #7
MicroTrends
Senior Member
 
Join Date: Nov 2009
Location: Portugal
Posts: 157
Thanks: 1
Thanked 11 times in 8 posts
Send a message via Skype™ to MicroTrends
Default issue resolved

Quote:
Originally Posted by MXASJ View Post
Try adding this to OnBarUpdate()

PHP Code:
if (CurrentBars[0] < 1) return; //first data series
if (CurrentBars[1] < 1) return; // second data series, etc 
That solved some issues I was having with an indicator that didn't play nicely with 1 min bars.

Just a thought, YMMV, etc.
That sounds like a great idea...
I did eventually resolve it:
What i actually did was make sure i set the dataseries onbarupdate - to a value even if it wasn't used....

e.g


if(entry(true))
{
base.Signal(signalStates.signalLong);
}
else if(entry(false))
{
base.Signal(signalStates.signalShort);
}
else
{
base.Signal(signalStates.signalNone);
}
base.onBarUpdate()
(does stuff in an inherited class and plots if base.signalDataSeries[0] has a state)

thank for your reply :-)
Last edited by MicroTrends; 05-20-2010 at 05:57 PM.
MicroTrends is offline  
 

Tags
maximum bars look back

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
Maximum Bars Lookback rt-trader Version 7 Beta General Questions & Bug Reports 19 04-06-2010 02:54 AM
maximum bars look back not working ciremo Version 7 Beta General Questions & Bug Reports 1 01-19-2010 10:28 AM
Maximum Bars Lookback zweistein Version 7 Beta General Questions & Bug Reports 9 12-15-2009 05:36 AM
HH and LL Bars back RickB Indicator Development 1 09-10-2009 05:38 AM
Maximum bar size for minute bars. NickA Charting 4 08-07-2009 12:15 AM


All times are GMT -6. The time now is 04:30 PM.