# Indicators: Hurst Bands and Hurst Oscillator

19087 lượt xem
19087
These 2 indicators are derivative work from Jim Hurst's book - "The Magic of Stock Transaction Timing".

The bands are % bands around a median that gets calculated according to Hurst's formula. The outer bands (called ExtremeBands) signify extreme overbought/oversold conditions. Inner bands signify potential pullback points. As you can see, they also act as dynamic S/R levels.

The oscillator bands match the bands overlaid on price, so you will get an excellent indication of where the price is gonna do by using the oscillator along with the bands. Note that Hurst Oscillator can be used separately too, there is no technical dependency on Hurst Bands.

```//
// @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 = hl2
length = 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) + 1
dPrice = 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 / 100
OuterBand   = CMA * OuterValue / 100
InnerBand   = CMA * InnerValue / 100

UpperExtremeBand=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 : hl2
FlowPrice = plot(showClosingPriceLine ? sma(FlowValue, smooth) : na, linewidth=1)
```
List of my free indicators: http://bit.ly/1LQaPK8
List of my indicators at Appstore: http://blog.tradingview.com/?p=970

## Bình luận

Im not able to show the HO oscillator at all just the bands, is the indicator still valide?
Phản hồi
Do you have script for hurst oscillator? The above script only plots the bands....Thank you
Phản hồi
Night-mode, engage!https://www.
Phản hồi
grahvity
haha, thanks! so much easier to read!
Phản hồi
grahvity
:) You may want to change the colors of the extreme (outermost) bands.
Phản hồi
LazyBear
Cool. Changing them to white gives it almost & and embossed look.
Phản hồi
grahvity
Nice. As @StephenShaffer mentioned, very pleasing on eyes.
Phản hồi
grahvity
@grahvity, How did you get the oscillator please?
Phản hồi
grahvity
@grahvity, can you please share the code of oscillator.Its no more available in share option
Phản hồi
Is there a code for this indicator?
Phản hồi