MetaStock Lowest Since Function

Provided By www.meta-formula.com

The Lowest Since function contains many parameters, and therefore may seem complex. Simply it returns the lowest 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 LowestSince(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 array.

Expression _ The technical condition that you are referring back to.

Data Array _ The lowest value of this data array is returned from the period that the `expression' was true `Nth' number of times ago.

EXAMPLE

The formula below identifies when the closing price last crossed down below a 21 period simple moving average, and from that period onwards, it has found the lowest value that the low has been:

LowestSince(1,Cross(Mov(C,21,S),C),L)

In the formula above:

Nth = 1

Expression = Cross(Mov(C,21,S),C)

Data Array = L

APPLICATION

A more useful application of this example would be:

C<1.04* LowestSince(1,Cross(Mov(C,21,S),C),L)

The above formula after identifying when the closing price last crossed down below a 21 period simple moving average, has found the lowest value the low has been since that time. It has then added 4% to that lowest value (denoted by `1.04*'), and finally, MetaStock checks whether the present closing price is within 4% of that lowest value. In other words, it will check whether the present closing price is less than this new value. 

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