kruskakli

Super Squeeze

// SUPER SQUEEZE
//
// The idea is to make it possible to identify the ongoing Trend.
// The algoritm works as:
//
// 1. Apply SMMA on the Price.
// 2. Apply Bollinger Band and keltner Channel on the SMMA
//. 3. If BB is inside KC then there is NoTrend.
// 4. Else, if SMMA > KC-Upper then it is a strong UpTrend and
// if SMMA < KC-Lower then it is a strong DownTrend
// else it is NoTrend
//
// I've written the 'super_sqeeze' as one single function to make it easy to make
// use of it in other projects of mine. The function takes the follwing input arguments:
//
//. super_squeeze(Price, // example: close
// Length, // number of lookback periods, example: 66
// BBmult, // Bollinger Band multipier of the Standard Deviation, example: 1.5
// KCmult) // Keltner Channel multiplier, example: 1
//
// The return values from the function are:
//
//. 1 = Strong Up Trend
// 0.5. = Weak Up Trend
//. 0. = No Trend
//. -0.5. = Weak Down Trend
// -1. =. Strong Down Trend
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?