View Full Version : Maximum Bars Lookback
zweistein
10-26-2009, 07:22 AM
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
NinjaTrader_Ray
10-26-2009, 07:39 AM
Please try again with Beta 3 which I anticpate releasing later today. We resolved some issues with ZigZag indicator.
zweistein
10-26-2009, 07:45 AM
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
NinjaTrader_Ray
10-26-2009, 07:53 AM
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.
zweistein
10-26-2009, 03:27 PM
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
NinjaTrader_Ray
10-26-2009, 04:11 PM
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.
zweistein
10-26-2009, 05:56 PM
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
NinjaTrader_Dierk
10-27-2009, 06:13 AM
This is a bug which will be fixed with next update. Thanks for reporting.
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
NinjaTrader_Dierk
12-15-2009, 05:36 AM
To clarify: are you saying the NT standard ZigZap indicator would not work with NT7B5? If so, what in particular do you experience? Thanks