The Highest Since function contains many parameters, and
therefore may seem complex. Simply it returns the highest value of the selected
`data array' since the `N'th most recent occurrence of a defined expression was
true. Additionally, with regards to the `x'th most recent occurrence, if the
expression has occurred more than once, with this parameter it allows you to
select which occurrence to use (e.g. the third most recent occurrence).
SYNTAX HighestSince(Nth, Expression, Data Array)
Nth _ Is the number of occurrences, of the `expression', you
wish to refer back to when obtaining the highest value of the selected data
Expression _ The technical condition that you are referring
Data Array _ The highest value of this data array is returned
from the period that the `expression' was true `Nth' number of times ago.
The formula below identifies when the closing price last
crossed a 30 period exponential moving average, and from that period onwards, it
has found the highest high value:
In the formula above:
Nth = 1
Expression = Cross(C,Mov(C,30,E))
Data Array = H
A more useful application of this example would be:
This formula identifies the highest value found after the
closing price last crossed a 30 period exponential moving average. The formula
has then taken 3% from this value (denoted by `0.97*'), and finally, checks
whether or not the present closing price is above this. In other words, it
checks whether the present closing price is within 3% of the highest value since
the expression occured.
Looking at Figure
3.10, we can see this example applied to the chart as an indicator.
Figure 3.10 _ Highest Since
Construct formulas for the following:
1. Return the highest volume figure
since the last time the volume was less than a 10 period average of the volume:
2. Ensure that the present closing price is within 5% of the
highest high achieved since the last gap up:
article is a snippet from the
MetaStock Programming Study Guide...
The Simple Secret to Make Metastock Easy & Identify Profitable
copyright 2007 www.meta-formula.com