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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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 |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials