The Highest High Value function will return the highest value
of the selected `data array' from a specified number of periods. For example,
assume we wanted to identify the highest value of the volume from the last 10
periods. To do this we would simply code a highest high value function.
SYNTAX HHV(Data Array, Periods)
Data Array _ The highest value of this data array will be
returned, from the specified number of periods.
Periods _ How many periods we wish MetaStock to refer back to
when finding the highest high value of the data array.
EXAMPLE
The following formula identifies the highest value that the
closing price has reached in the last 40 periods:
HHV(C,40)
In the formula above:
Data Array = C
Periods = 40
APPLICATION
A more useful application of this example could be:
C= HHV(C,40)
This formula identifies the highest closing price the
security has reached in the last 40 periods. It then checks to see whether the
present closing price is equal to that. In other words, we're asking MetaStock
whether or not the security has just achieved a new 40 period high.
Due to the versatility of MetaStock many of the formulas we
used can be rewritten in other ways. For example, perhaps a better way to check
whether a security has made a new 40 period high could be:
C>Ref(HHV(H,40),1)
This formula will check to see if today's close is greater
than the highest high value in the last 40 periods, prior to the present period
(denoted by `Ref(HHV(H,40),1)'). Please refer to the Reference function (Ref)
on page 75 for an explanation of its use in this formula.
Looking at Figure
3.8, we can see this example applied to the chart.
Figure 3.8 _ Highest High Value
EXERCISES
Construct formulas for the following:
1. Return the highest high value of
the open in the last 55 periods:
__________________________________________________
2. Ensure that the present close is within 4% of the highest
price in the last 30 periods:
__________________________________________________
This
article is a small snippet of MetaStock Programming
Study Guide...
"Discover
The Simple Secret to Make Metastock Easy & Identify
Profitable Trades"


copyright 2007 www.metaformula.com