Home    |    Trading Alchemy Manual    |    Alchemy Functions Index

AlchemyPercentK (Function)

This is a Stochastic function. Stochastics are oscillators that are used to indicate overbought and oversold conditions in the market based on the premise that during periods of price decreases, bar closes tend to accumulate near the Low of the bar, and during periods of price increases, bar closes tend to accumulate near the High of the bar.  AlchemyPercentK returns the values for the Stochastics %K line.

AlchemyPercentK (LoPrice, HiPrice, ClPrice, Length)

Parameters

LoPrice

Specifies the value to use as the low in stochastic calculations

HiPrice

Specifies the value to use as the high in stochastic calculations

ClPrice

Specifies the value to use as the close in stochastic calculations

Length

The number of bars to consider for the average of the fast K line

 

Returns

A numeric value containing PercentK for the current bar.

Usage

When using Stochastics, most people use the slow Stochastic since its smoothed values are less subject to whipsaws. The indicator itself is composed of a percentK and a percentD line that will always oscillate between 0 and 100; a higher value indicates an overbought market while a lower value indicates an oversold market. 

A value greater than 80 is usually used as an overbought signal and a value less than 20 is used for the oversold signal. The 80 value is often called the sell zone and the 20 value is called the buy zone. The crossover of the buy zone and sell zone values in conjunction with a percentD and percentK crossover is a good indication of a switch in trend direction. 
George C. Lane, developer of the Stochastic, says the only valid signal derived from the percentD is a divergence from the price where the divergence is an indication of a trend reversal. When using the percentK and the percentD together, crossovers of the two generate valid signals and should be used to indicate rising and declining markets.

Home    |    Trading Alchemy Manual    |    Alchemy Functions Index