HA count

Category: Indicators By: lolo Created: October 12, 2015, 8:16 PM
October 12, 2015, 8:16 PM
Indicators
0 Comments

counts the number of times in a row the high is greater than the previous high, or the low is lower than the previous low. reset every time this rule was breached.
+ the average of the past x periods.

AVPeriod = 20

IF High >= High[1] THEN
     CHigh=CHigh+1
ELSE
     CHigh=0
ENDIF

IF low <= low[1] THEN
     Clow=Clow+1
ELSE
     Clow=0
ENDIF

CAvHigh = Average[AVPeriod](CHigh)
CAvLow = Average[AVPeriod](CLow)


RETURN CHigh COLOURED (220,100,100) AS"CHigh", Clow COLOURED (80,210,80) AS"CLow", CAvHigh AS"Average High", CAvLow AS"Average Low"

Download
Filename: HA-count.itf
Downloads: 41
lolo New
Currently debugging life, so my bio is on hold. Check back after the next commit for an update.
Author’s Profile

Comments

Logo Logo
Loading...