Part of the average directional Index technical indicator (ADX). Return value of the DI+ line over N periods.
Syntax:
1 |
DIplus[N](price) |
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
minus = DIminus[14](open) plus = DIplus[14](open) if(minus>plus AND minus[1]<plus[1]) THEN bull = 1 bear = 0 ENDIF if(minus<plus AND minus[1]>plus[1]) THEN bull = 0 bear = -1 ENDIF RETURN bull, bear |