ASI Indicators use the same parameters as their traditional
Metastock counterparts. The only difference is that the "lookback
period" parameter is not restrained to be of type CONSTANT,
it may now also be of type DATA ARRAY. DATA ARRAY can represent
a price series (High, Low, Open, Close, Median Price, or any
other derived value of price), or it can represent an indicator
applied to a price series (smoothed price, a cycle period, a
volatility measurement, etc.).
The user can select from two period generating algorithms
provided with ASI: Ehlers' Cyber Cycle Period and
Ehlers' Homodyne Cycle Period.
Keep in mind that ANY type of adaptive input can be used.
This means these functions can utilize theory such as volatility
measurements, Ehlers' MESA algorithm, the Lomb Periodogram,
FFT, the Goertzal algorithm, or one of your own design.
Note: in all cases, all ASI & ADSI functions "maintain
the integrity" of output for each time period. In other
words, if the cycle period changes on the next bar,
amounts previously outputed are not retroactively recalculated.
Two examples illustrate application of these concepts:
In the examples you will see "Prices" used when naming
regular array inputs, and "Periods" used when naming arrays
that are used to calculate the number of lookback periods
for the indicator.
For purposes of this example, please ignore the cycle input
parameters. They are discussed in further detail under ADSI
section below.
Example #1:
Prices
:= MP( );
Periods := ExtFml( "ADSI.CyclePeriod", Prices, .11, .05, 1.1
);
ExtFml( "ASI.HHV", Prices, Periods);
Based on an adaptive lookback for each price bar determined
by the Cyber Cycle Period, this function returns the "Highest
High" of MP( ) (Median Price) at each bar.
Example #2:
Prices := MP( );
Periods := ExtFml( "ADSI.HomodyneCyclePeriod", Prices );
ExtFml( "ASI.HHV", Prices, Periods);
Based on an adaptive lookback for each price bar determined
by the Homodyne Cycle Period, this function returns the "Highest
High" of the Median Price at each bar.
Please note that for some indicators (e.g., RSI, Stochastics),
John Ehlers recommends use of ½ of the adaptive cycle input.
In order to achieve this, a user would simply multiply the
period variable described below (Examples 1 & 2) by ½. The
"½" relates to the logic behind these indicators' construction.
For further explanation, please refer to Chapter 22, "Making
Standard Indicators Adaptive" in Rocket Science.
Differences between ASI and the Metastock function format:
The three ASI functions SMA(), EMA(), and WMA() replace the
Metastock Mov() function, and its [Simple,Exponential,Weighted]
parameter.
The term "errors" in the StdErr() indicator and "deviations"
in StdDev() is the number of standard errors/deviations desired.
(i.e., two standard deviations out, or one-point-five standard
deviations out).
The ROC() function replaces the Metastock custom parameter
of [$,%] (for absolute or percent ROC) with a numeric parameter
of [0,1].
|