Download: FUNCTION-GETTIME.ELA
File Includes: Function - Gettime
Description: Returns the TIME of the NTH occurence of FORMULA
Inputs: Formula (TrueFalse)
NTH (Numeric)
Example: GetTime(Close > Open, 5) will return the time of the fifth time that the Close was greater than the Open
EasyLanguage Code:
INPUTS: FORMULA(TRUEFALSE), NTH(NUMERIC);
ARRAY: FSTORE[10](0);
IF FORMULA THEN
BEGIN
FOR VALUE1 = 10 DOWNTO 2
BEGIN
FSTORE[VALUE1] = FSTORE[VALUE1-1];
END;
FSTORE[1] = TIME;
END;
GETTIME = ROUND(FSTORE[NTH],0);