Black Friday great discounts start today Learn more
+1 888 340 6572

StochasticCustom

Article/Author: "Tales from the Front: Rober Zellner", Thom Hartle, S&C Magazine, Traders Tips, 03/1999

Download: Stochsc.ela

File Includes:
Function - StochasticCustom
Indicator - Stochastic S&C
Strategy - Stochastic S&C

Category: Function > StochasticCustom

Description:

Inputs:

EasyLanguage Code:
INPUTS: KPERIODS(NUMERICSIMPLE), KSLOW(NUMERICSIMPLE);

VARIABLES: LOLO(0), HIHI(0), HLDIFF(0);

LOLO = LOWEST(LOW, KPERIODS);
HIHI = HIGHEST(HIGH, KPERIODS);
HLDIFF = HIHI - LOLO;

IF HLDIFF > 0 THEN BEGIN
IF KSLOW <= 1 THEN
STOCHASTICCUSTOM = (CLOSE - LOLO) / HLDIFF * 100
ELSE
STOCHASTICCUSTOM = AVERAGE(CLOSE - LOLO, KSLOW) / AVERAGE(HLDIFF, KSLOW) * 100;
END;