Thank you Rob and Hitendra .I'll see what I can do.
I'm trying to find a way to determine the smoothness of a sinusoid .
Regards
Horia
--- On Fri, 6/19/09, Hitendra Vasudeo <hitendra@xxxxxxxxxxx> wrote:
From: Hitendra Vasudeo <hitendra@xxxxxxxxxxx> Subject: RE: [EquisMetaStock Group] zigzag help To: equismetastock@xxxxxxxxxxxxxxx Date: Friday, June 19, 2009, 3:42 PM
You can change the values in Zig(CLOSE , 10 ,$ ) as per your requirement
For Buy-
a:= Cross(CLOSE , Peak(1 , Zig(CLOSE , 10 ,$ ) , 0.001) ) ;
b:= Cross( Trough(1 , Zig(CLOSE , 10 , $) ,0.001 ) , CLOSE) ;
state:=If(BarsSince (a)<BarsSince(b) ,1,0);
state>Ref(state,-1)
For Sell
a:= Cross(CLOSE , Peak(1 , Zig(CLOSE , 10 ,$ ) , 0.001) ) ;
b:= Cross( Trough(1 , Zig(CLOSE , 10 , $) ,0.001 ) , CLOSE) ;
state:=If(BarsSince (a)<BarsSince(b) ,1,0);
state<Ref(state,-1)
Hitendra Vasudeo
www.stockmechanics. com
From: equismetastock@ yahoogroups. com [mailto:equismetast ock@xxxxxxxxxxxx com] On Behalf Of Rob Tinley Sent: Friday, June 19, 2009 4:52 PM To: equismetastock@ yahoogroups. com Subject: Re: [EquisMetaStock Group] zigzag help
Try using either Peak Value [Peak(Nth,Data Array,% Minimum Change)] or Trough Value [Trough(Nth, Data Array,% Minimum Change)].
From your post you've obviously picked up on the inherent dangers of using indicators that utilise the ZigZag function.
--- On Thu, 18/6/09, hailasarmale@ yahoo.com <hailasarmale@ yahoo.com> wrote:
From: hailasarmale@ yahoo.com <hailasarmale@ yahoo.com> Subject: [EquisMetaStock Group] zigzag help To: equismetastock@ yahoogroups. com Received: Thursday, 18 June, 2009, 6:22 PM
I'm new to this forum and to metastock programming .I need a little help please .
This is what i'm trying to do :
- read values of the last 3 or 4 tops of a zigzag indicator and average them .
- read values of the last 3 or 4 bottoms of the same indicator and average them
( find an average magnitude )
- find distances between the last consecutive 8 tops and bottoms and find an average wavelength
- generate a sinusoid using the average magnitude/wavelengt h that I can extrapolate a little in the future .
BUT I want to ignore the last top/bottom that is not yet confirmed .
Could someone help me please ?
| |
Access Yahoo!7 Mail on your mobile. Anytime. Anywhere. Show me how.
|