MetaStock Zig Zag Function

Provided By www.meta-formula.com

The Zig Zag indicator assists with spotting reversals within a chart. The Zig Zag indicator will identify where there has been significant changes in the security's price and then draw a series of straight lines to highlight these.

SYNTAX Zig(Data Array, Change, % $)

Data Array _ This is the data array used to locate the significant changes.

Change _ This specifies how much a security must change direction in order to declare that a significant change has occurred.

% $ _ This is how the change is going to be determined, i.e. as a percentage or in dollar terms. Either `%' or `$' is to be used but not both.

Just a word of caution when using the Zig Zag function; the last leg (i.e., segment) of the Zig Zag is dynamic, meaning that it can change. Therefore, be careful when designing system tests, experts, etc. based on the Zig Zag indicator. The results can appear unusually good but this is only due to the dynamic last leg.

EXAMPLE

Here is an example using the Zig Zag:

Zig(C,3,%)

In the above example:

Data Array = C

Change = 3

% $ = % 

APPLICATION

The formula above could be used as an indicator on a chart and can assist with identifying peaks and troughs or trend analysis.

You can see this example applied to the chart in Figure 3.34 as an indicator.

 
 

Figure 3.34 _ Zig Zag Indicator    

EXERCISES

Construct formulas for the following:

1. A ZigZag line that highlights 50 cent changes in the closing price:

__________________________________________________

This article is a snippet from the
MetaStock Programming Study Guide...

"Discover The Simple Secret to Make Metastock Easy & Identify Profitable Trades"

Click Here To Find For More About
The MetaStock Programming Study Guide

copyright 2007 www.meta-formula.com