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

VIDYA

Article/Author: “Identifying Powerful Breakouts Early”, Tushar Chande, S&C Magazine, Traders Tips, 10/1995

Download: FUNCTION-VIDYA.ELA

File Includes: Function - VIDYA

Category: Function > VIDYA

Description:

Inputs:
Length
Smooth

EasyLanguage Code:
INPUTS: LENGTH(NUMERICSIMPLE), SMOOTH(NUMERICSIMPLE);

VARS: UP(0), DN(0), UPSUM(0), DNSUM(0), ABSCMO(0), SC(0);

UP=IFF(CLOSE>CLOSE[1], CLOSE-CLOSE[1],0);
DN=IFF(CLOSE<CLOSE[1], ABSVALUE(CLOSE-CLOSE[1]),0);

UPSUM=SUMMATION(UP,LENGTH);
DNSUM=SUMMATION(DN,LENGTH);

IF UPSUM-DNSUM >0 THEN
ABSCMO=ABSVALUE((UPSUM-DNSUM)/(UPSUM+DNSUM));

SC= 2/(SMOOTH+1);

IF CURRENTBAR=LENGTH THEN VIDYA=CLOSE;
IF CURRENTBAR>LENGTH THEN
VIDYA=(SC*ABSCMO*CLOSE)+((1-(SC*ABSCMO))*VIDYA[1]);


{COPYRIGHT C 1997, TECHNICAL ANALYSIS, INC.}