The Lowest Since Bars Ago function is a variation on the
Lowest Since function. The difference being that instead of returning the lowest
value of the selected `data array' since the `N'th most recent occurrence of a
defined expression occurred; it will return how many periods have passed since
this last low was achieved. In other words, this function returns the number of
periods that have passed since the lowestsince() function returned its value.
SYNTAX LowestSinceBars(Nth, Expression, Data Array)
Nth _ Is the number of occurrences, of the `expression', you
wish to refer back to when obtaining the lowest value of the selected data
Expression _ The technical condition that you are referring
Data Array _ The lowest value of this data array is returned
from the period that the `expression' was true `Nth' number of times ago.
The following formula identifies when the closing price last
crossed down below a 30 period simple moving average, and from that period
onwards, it has found the lowest value that the close has reached. However,
rather than returning this value, it has counted the number of periods that have
passed since this low was achieved:
In the formula above:
Nth = 1
Expression = Cross(C,Mov(C,30,S))
Data Array = C
A more useful application of this example could be:
This formula, after identifying when the closing price last
crossed down below a 30 period simple moving average, has found the lowest value
the close has been since then. It has then counted how many periods have passed
since that low was achieved and checked that this is less than 10 periods
(denoted by `<10').
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