+1 888 340 6572 Try free for 30 days

WRO

Article/Author: "Automated Support and Resistance", Mel Widner, Ph.D., S&C Magazine, Traders Tips, 05/1998

Download: suppres.ela

File Includes:
Function - WRO
Function - WSO
Indicator - Support-Resistance
Strategy - Support-Resistance

Category: Function > WRO

Description:

Inputs:

EasyLanguage Code:
INPUTS: STRENGTH(NUMERIC), LENGTH(NUMERIC);

VARS: RCALC(0);
ARRAY: RESIST[100](0);

CONDITION1 = SWINGHIGH(1, HIGH, STRENGTH, STRENGTH+1) <> -1;

IF CONDITION1 THEN BEGIN
FOR VALUE1 = 100 DOWNTO 2 BEGIN
RESIST[VALUE1] = RESIST[VALUE1-1];
END;
RESIST[1] = HIGH[STRENGTH];
END;

IF RESIST[LENGTH] <> 0 THEN BEGIN
RCALC = 0;
FOR VALUE1 = 1 TO LENGTH BEGIN
RCALC = RCALC + INTPORTION(RESIST[VALUE1] / CLOSE);
END;
WRO = 100 * (1 - (RCALC / LENGTH));
END ELSE
WRO = 0;

{COPYRIGHT 1998 TECHNICAL ANALYSIS, INC.}