PureBytes Links
Trading Reference Links
|
I guess all the "smart" MS formula writers were out to lunch the day
you posted the quesiton. I don't know why the "dumb" MS formula
writers didn't step up because they almost always embrace the zig zag
formula, and it's close cousin the peak and trough functions. Rather
than waste brain cells on this, simply go here and knock yourself out.
http://trader.online.pl/MSZ/!-MSZ-index-en.html
--- In Metastockusers@xxxxxxxxxxxxxxx, "Steve Grala"
<stevegrala@xxxx> wrote:
>
>
>
>
>
>
>
> To any smart Metastock formula writer:
>
>
>
>
>
> I have asked this question before but never got an answer. I
would like to know how to reproduce the zigzag formula. The zigzag
formula is used and talked about here but I do believe no one here
knows how to reproduce it with the basic metastock formulas.
Obviosly one can not use the peak or troughs function since this is
derived from the zig zag itself. I wanted to write the equivalent
formula using the basic MetaStock formulas. In order to reproduce
the zigzag you need to draw a linear line from point A to point B. I
created a simple formula to do this. First I needed to know the
slope of point A to point B. In my sample formula point A is the
first day of data loaded and point B is the last day of data loaded.
Slope = rise over run. Rise is the difference between point A and
point B. The run is the number of days over the data. Once you have
the slope you just add this each day to the previous day of the
data. The result is a nice linear line going from point A to point
B. The problem I need to figure out is how to get point A and point
B to change according to a certain percentage like in the zig zag
formula.
>
>
>
> Sample formula for drawing a linear line from first to last day of
data.
>
>
>
> slope:=(LastValue(C)-ValueWhen(1,Cum(1)=1,C))/LastValue(Cum(1));
>
>
>
> line:=ValueWhen(1,Cum(1)=1,C)+Cum(slope);
>
>
>
> line;
>
>
>
> You might ask why write a formula to do what the basic zig(data
array, min change,diff method) all ready does. I guess it is just
curiosity. I figure it could help in writing other formulas.
>
>
>
> Thanks
>
>
>
> Steve
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|