PDA

View Full Version : Correct use of "Peak" and "Trough" funct


adrian77
1st September 2005, 11:35 PM
I am testing a system with the entry trigger being a close above a previous peak and have been using the following formula as the entry trigger.

Cross(C,ref(Peak(1,C,5),-1) = 1

I am a little concerned that the test results are unrealistic because the peak and trough help section in Metastock says "...be careful when designing system tests, experts, etc. based on the Zig Zag indicator."

The trouble is i don't know what "be careful" means here. Can anyone tell me if the above entry trigger will produce valid test results or does it use hindsight and therefore produce invalid results

Thanks

Adrian

Jose
5th September 2005, 03:53 AM
Adrian, the last Peak/Trough in MetaStock is always dynamic - i.e., it may disappear as a higher peak or lower trough develops.
Ref(Peak(1,C,5),-1) will only shift the dynamic peak value by one bar.

To avoid this hindsight problem, you could either hard-code peaks & trough conditions, or use previous peaks/troughs - i.e.: Peak(2,C,5).

jose '-)

adrian77
29th September 2005, 07:46 AM
I have been out of the country and only just got your reply...Thanks for the input.