Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- //
- study(title="Pivot5",overlay=true)
- //
- pivothigh5() =>
- ls = high[10]<high[5] and high[9]<high[5] and high[8]<high[5] and high[7]<high[5] and high[6]<=high[5]
- rs = high[0]<high[5] and high[1]<high[5] and high[2]<high[5] and high[3]<high[5] and high[4]<high[5]
- ret= ls and rs
- ret
- pivotlow5() =>
- ls = low[10]>low[5] and low[9]>low[5] and low[8]>low[5] and low[7]>low[5] and low[6]>=low[5]
- rs = low[0]>low[5] and low[1]>low[5] and low[2]>low[5] and low[3]>low[5] and low[4]>low[5]
- ret= ls and rs
- ret
- ph = pivothigh5()
- pl = pivotlow5()
- plotshape(ph, title='High Pivot', location=location.abovebar, style=shape.diamond, color=green, offset=-5,transp=0,size=size.auto)
- plotshape(pl, title='Low Pivot', location=location.belowbar, style=shape.diamond, color=red, offset=-5,transp=0,size=size.auto)
- //eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement