Hurst Bands/Hurst Oscillator
Forums › ProRealTime English forum › ProBuilder support › Hurst Bands/Hurst Oscillator
- This topic has 4 replies, 2 voices, and was last updated 7 years ago by denmar.
Viewing 5 posts - 1 through 5 (of 5 total)
-
-
06/05/2017 at 9:39 AM #37430
Hi everybody, anybody willing to have a bash at converting this code (Pine Script) – link: https://www.tradingview.com/script/yl3pK2zM-Indicators-Hurst-Bands-and-Hurst-Oscillator/
Thanks
Hurst Bands123456789101112131415161718192021222324252627282930313233343536373839//// @author LazyBear//// If you use this code in its original/modified form, do drop me a note.//study("Hurst Bands [LazyBear]", shorttitle="H%Bands_LB", overlay=true)price = hl2length = input(10, title="Displacement length")InnerValue = input(1.6, title="Innerbands %")OuterValue = input(2.6, title="Outerbands %")ExtremeValue = input(4.2, title="Extremebands %")showExtremeBands = input(false, type=bool, title="Display Extreme Bands?")showClosingPriceLine = input(false, type=bool, title="Plot Close price?")smooth = input(1, title="EMA Length for Close")displacement = (length / 2) + 1dPrice = price[displacement]CMA = not na(dPrice) ? sma(dPrice, abs(length)) : nz(CMA[1]) + (nz(CMA[1]) - nz(CMA[2]))CenteredMA=plot(not na(dPrice) ? CMA : na, color=blue , linewidth=2)CenterLine=plot(not na(price) ? CMA : na, linewidth=2, color=aqua)ExtremeBand = CMA * ExtremeValue / 100OuterBand = CMA * OuterValue / 100InnerBand = CMA * InnerValue / 100UpperExtremeBand=plot(showExtremeBands and (not na(price)) ? CMA + ExtremeBand : na)LowerExtremeBand=plot(showExtremeBands and (not na(price)) ? CMA - ExtremeBand : na)UpperOuterBand= plot(not na(price) ? CMA + OuterBand : na)LowerOuterBand= plot(not na(price) ? CMA - OuterBand : na)UpperInnerBand= plot(not na(price) ? CMA + InnerBand : na)LowerInnerBand= plot(not na(price) ? CMA - InnerBand : na)fill(UpperOuterBand, UpperInnerBand, color=red, transp=85)fill(LowerInnerBand, LowerOuterBand, color=green, transp=85)FlowValue = close > close[1] ? high : close < close[1] ? low : hl2FlowPrice = plot(showClosingPriceLine ? sma(FlowValue, smooth) : na, linewidth=1)06/06/2017 at 12:04 PM #3760306/06/2017 at 12:53 PM #3760906/07/2017 at 7:20 AM #37691Please find attached the translated version of the Hurst Bands. I’ll make a better version with color and proper lines formatting later to add it into the library.
1 user thanked author for this post.
06/07/2017 at 7:33 AM #37695 -
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)