[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Metastockusers] Re: Zig Zag Formula



PureBytes Links

Trading Reference Links

>From what I can understand throughout this exchange is that Steve is
trying to plot linear lines, from one point to another.
Please appreciate the following:
Assuming that you want to "draw" a trendline using an indicator
formula, you need two points.
One in the past and one in the present.
Any metastock formula will assess your mathematical requirement BAR BY
BAR. Therefore, if you want to draw a linear line from the PAST to the
PRESENT, it's not possible. However, if you want to CONTINUE the
linear line which has been calculated from the past to the present,
into subsequent plots, it's possible. 
Guppy's website has the syntax for drawing automatic trendlines (using
the principles of co-ordinate geometry) which takes two points, one
the PAST, and the second the PRESENT.
Then, it calculates the difference of the two points, divided by the
number of bars, and increments or decrements it from the present value.
Hope this helps
Dusant

--- In Metastockusers@xxxxxxxxxxxxxxx, "SR" <raftsp@xxxx> wrote:
> Zigzag for Metastock was not created with Metastock formula language
(MFL).
> Metastock itself is not written in MFL of course.
> The zigzag indicator adapts its behavior according to new values added
> in the chart (my new article in S&C, next September deals with the
subject
> too).
> As new values come in, it has to go back and adjust its
> past plot. These back and forth movements cannot be accomplished
with MFL.
> So the problem is not the linear lines. The problem is the revisions.
> In order to be able to handle such revisions you need at least loops.
> There are no loops in MFL.
> I am not sure about the specific code used for creating Zigzag for MS,
> altough I can guess
> the basic algorithm. But, I am sure that you can find C++ VB or Delphi
> versions in various Internet sites. I also think that TradeStation's
code is
> open.
> So if you want to re-create Zigzag for MS, then YES you CAN (by
writting a
> dll)
> but if you want to do it WITH MFL, then sorry, you will not manage
to do it.
> But good luck anyway!
> 
> Spyros
> 
> 
> 
> ________________________________________________________________________
> 
> Message: 3
>    Date: Wed, 21 May 2003 12:25:15 -0400
>    From: "Steve Grala" <stevegrala@xxxx>
> Subject: Zig Zag Formula
> 
> Still looking for the zig zag formula & how it is created in MetaStock.
> Thanks for the suggestion on zig zag validity, but this indicator is not
> what I am looking for.  Zig zag validity uses MetaStocks zig function.
> Instead, I am looking to see how MetaStock mathematically calculates
the zig
> zag.  I would like to know how MetaStock is able to create a linear line
> that zigs & zags with the percent switch points.  The simple
indicator that
> I created works great for 1 linear line from point A to point B, but
when it
> comes to having it switched at predefined percentage points, i'm lost.
> Searching Stocks and Commodities magazine archives, I came across
the 10%
> Swing Filter which is the basic idea of the zig zag.  It can be
found in the
> February 1997 issue.  The formula is written in a spreadsheet
manner.  It
> works, but I cannot see how it can be implemented into the MetaStock
> language to draw linear lines.
> 
> Thanks,
> Steve
> 
> 
> ________________________________________________________________________
> ________________________________________________________________________


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/CNxFAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/