Swing Hilo

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

A SWING LOW :–
A swing Low is defined as: a bar where:
– the high of the middle bar is lower than the high of the bar before it and after it
– and the low of the middle bar is lower that the low of the bar before and after it.

A SWING HIGH :—
A swing high is defined as: a bar where:
– the high of the middle bar is higher than the high of the bar before it and after it
– and the low of the middle bar is higher that the low of the bar before and after it.

res = 0
// Swing high
c1 = high[1] > high AND high[1] > high[2]
c2 = low[1] > low AND low[1] > low[2]

// Swing low
c3 = high[1] < high AND high[1] < high[2]
c4 = low[1] < low AND low[1] < low[2]

IF c1 and c2 THEN
     res = 1
ELSIF c3 and c4 THEN
     res = -1
ENDIF

return res

Download
Filename: Swing-Hilo.itf
Downloads: 111
lolo Average
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...