NinjaTrader Support Forum  

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 10-26-2009, 07:22 AM   #1
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
Default Maximum Bars Lookback

Hello,

currently I have a strange behaviour in the ZigZag indicator inside a strategy and I think it would be wise to enlight the Maximum Bars Lookback parameter further.

What does it mean for my strategies: Let's say I have strategy on ES 12-09 1 Minute bars running. and MaximumBarsLookBack is set to 256.


Inside OnBarUpdate()


1. Will input[257] give the correct value allthough it is outside the lookback parameter?

2. You state the 256 bars limit is applied to IDataSeries Objects excluding DataSeries objects. Does this mean DataSeries objects do NOT have the 256 bars lookback limitation? I don't understand? Are Objects based on the IDataSeries interface not DataSeries?


3. Will
int i= ZigZag(DeviationType.Percent,zzPercent,usehighlow) .HighBar(
0,1,257);
double zig= ZigZag(DeviationType.Percent, zzPercent, usehighlow)[i]

give the correct value?


Thank you


Andreas
zweistein is offline  
Old 10-26-2009, 07:39 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Default

Please try again with Beta 3 which I anticpate releasing later today. We resolved some issues with ZigZag indicator.
NinjaTrader_Ray is offline  
Old 10-26-2009, 07:45 AM   #3
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
Default

Excellent,

today I expected signals from ZigZag, but my strategies never triggered so I was -unexpectedly flat - all day.



Another question:

Parameter MinBarsRequired ad MaxBarsLookBack,

what if MinBarsRequired is 750 and MaxBarsLookBack is 256?

Does this make sense?


regards
Andreas
zweistein is offline  
Old 10-26-2009, 07:53 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Default

Quote:
Originally Posted by zweistein View Post


Another question:

Parameter MinBarsRequired ad MaxBarsLookBack,

what if MinBarsRequired is 750 and MaxBarsLookBack is 256?

Does this make sense?


regards
Andreas
The two do not conflict. This just means wait until I have 750 bars before calling OnBarUpdate() and and internal DataSeries type objects should only maintain the last 256 values.
NinjaTrader_Ray is offline  
Old 10-26-2009, 03:27 PM   #5
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
Default

1. MinBarsRequired. You are right.


2. ZigZag:

Are you sure to have resolved the issues? Currently I have exactly the same code in an indicator and there ZigZag High and Low Vertices are shown.

The very same code inide a strategy will not trigger the Highs vertices.

Currently I have the situation that inside a strategy only the ZigZag Low vetices are detected , but the ZigZag Highs not.

Identical code (...ok, a lot of wrappers in a bigger piece of code in the strategy...) for the ZigZag calls in both indicator and strategy, but only the indicator will work properly!

Any ideas? I will try to strip down the code to show better tomorrow, can I send you a private message for this?

regards

Andreas
zweistein is offline  
Old 10-26-2009, 04:11 PM   #6
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Default

Quote:
Originally Posted by zweistein View Post
1.
2. ZigZag:

Are you sure to have resolved the issues?
No I am not sure. If you have tried on Beta 3, then go ahead and provide us a sample script.
NinjaTrader_Ray is offline  
Old 10-26-2009, 05:56 PM   #7
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
Default ZigZag strange behaviour

OK, so I found out the following, for indicators and strategies:


In OnBarUpdate()

//double dummy=ZigZag(DeviationType.Percent,zzPercent,false)[0];

int FirstHigh=ZigZag(DeviationType.Percent,zzPercent,f alse).HighBar(0,1,20);


The above code will not give correct results forFirstHigh in such that -1 is returned all the time.

Uncomment the lines above and FirstHigh will be correct.

It seems that dummy=ZigZag(...) causes the ZigZag indicator to calculate some internal values which are needed for .HighBar and .LowBar.

If I remember well this internal calculation was done in 6.5 (not 100% sure) , but in NT7 you need to uncomment the lines above.

@Ray, will you change or are you happy as it is?

regards
Andreas
zweistein is offline  
Old 10-27-2009, 06:13 AM   #8
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

This is a bug which will be fixed with next update. Thanks for reporting.
NinjaTrader_Dierk is offline  
Old 12-15-2009, 04:54 AM   #9
ct
Senior Member
 
Join Date: Dec 2006
Location: Nelson, New Zealand
Posts: 371
Thanks: 1
Thanked 3 times in 3 posts
Question zigzag

Dierk

The trick with attaching private zigzag indicator to multiple time frames seems does not work on 7.0. i've tried different combinations but only crashed NT. this beta version is unstable - 7.0.5.

Is there to be an updated zigzag indicator or should I make my own?

Cheers

Cliff
ct is offline  
Old 12-15-2009, 05:36 AM   #10
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

To clarify: are you saying the NT standard ZigZap indicator would not work with NT7B5? If so, what in particular do you experience? Thanks
NinjaTrader_Dierk 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
Maximum Bars Lookback rt-trader Version 7 Beta General Questions & Bug Reports 19 04-06-2010 02:54 AM
Maximum bar size for minute bars. NickA Charting 4 08-07-2009 12:15 AM
NT not saving the lookback period on my charts properly? JS999 Charting 3 04-27-2009 04:47 AM
Lookback period? FireFly Charting 2 10-14-2008 02:22 PM
Highest High in a LookBack Period daven Indicator Development 2 09-28-2007 12:39 PM


All times are GMT -6. The time now is 08:25 AM.