Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- study("3 Lower Highs", overlay=true)
- // Inputs
- leftbars = input(3)
- rightbars = input(3)
- // Define highs
- ph = pivothigh(high, leftbars, rightbars)
- // Three lower highs
- firsthighs = if valuewhen(ph, high, 0) < valuewhen(ph[1], high, 0)
- 1
- lasthighs = if valuewhen(ph[1], high, 0) < valuewhen(ph[2], high, 0)
- 1
- threelowerhighs = firsthighs==1 and lasthighs==1
- // Plot
- plotshape(threelowerhighs, color=red, location=location.belowbar, style=shape.labelup, text="3 Lower Highs")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement