LazyBear

3 projection Indicators - PBands, PO & PB

All these indicators are by Mel Widner.

Projection Bands :
-------------------------------------------------------
These project market data along the trend with the maxima and minima of the projections defining the band. The method provides a way to signal potential direction changes relative to the trend. Usage is like any other trading band.

Projection Oscillator :
-------------------------------------------------------
This indicates the relative position of price with in the bands. It fluctuates between the values 0 to 100. You can configure the "basis" to make it oscillate around a specific value (for ex., basis=50 will make it oscillate between +50 and -50). EMA of PO (length configurable, default is 5) is plotted as a signal line. There is also an option to plot the difference (oscillator - signal), just like MACD histogram. When you see a divergence in this oscillator, remember that it just indicates a potential movement with in the band (for ex., a bullish divergence shown may cause the price to cross the median and move up to the top band).

Projection Bandwidth :
-------------------------------------------------------
This shows the % width of the projection bands. A trend reversal is signaled by a high value. Low value may indicate the start of a new trend. This is also a trend strength indicator.

More info: drive.google.co...ERtc1haNVE/edit?usp=sharin...

Borrowed the color theme for this chart from @liw0. Thanks :)

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//
// @author LazyBear
//
// If you use this code in its original/modified form, do drop me a note.
//
study("Projection Bands [LazyBear]", shorttitle="ProjectionBands_LB", overlay=true)
//length=input(14, title="Length")
length=14 // See below why this is a not an input()
sum_c=sum(cum(1),length)
psum_c=pow(sum_c,2)
sump_c=sum(pow(cum(1),2),length)
lsump_c=(length*sump_c)
denom=(lsump_c-psum_c)
rlh=((length*(sum(cum(1)*high,length)))-(sum_c*(sum(high,length))))/denom
rll=((length*(sum(cum(1)*low,length)))-(sum_c*(sum(low,length))))/denom

// Currently there is no way to do a loop. So, "length" is hardcoded to 14. 
// Bands
upb=max(high,
    max(high[1]+1*rlh,  
    max(high[2]+2*rlh,    
    max(high[3]+3*rlh,
    max(high[4]+4*rlh,
    max(high[5]+5*rlh,
    max(high[6]+6*rlh,
    max(high[7]+7*rlh,
    max(high[8]+8*rlh,
    max(high[9]+9*rlh,
    max(high[10]+10*rlh,
    max(high[11]+11*rlh,
    max(high[12]+12*rlh,
    high[13]+13*rlh)))))))))))))

//LowerProjectionBand
lpb=min(low,
    min(low[1]+1*rll,
    min(low[2]+2*rll,
    min(low[3]+3*rll,
    min(low[4]+4*rll,
    min(low[5]+5*rll,
    min(low[6]+6*rll,
    min(low[7]+7*rll,
    min(low[8]+8*rll,
    min(low[9]+9*rll,
    min(low[10]+10*rll,
    min(low[11]+11*rll,
    min(low[12]+12*rll,
    low[13]+13*rll)))))))))))))

ul=plot(upb, linewidth=2, color=teal)
ll=plot(lpb, linewidth=2, color=teal)
plot(avg(upb,lpb), linewidth=1, color=maroon)
fill(ul,ll,color=teal)