Cloudy Momentum Bands for ThinkorSwim

BenTen

Administrative
Staff member
Staff
VIP
Leading Cloud-Based Momentum Indicator:
  • Above Orange Line => uptrend
  • Below Orange Line => downtrend
  • Cloud breakout => strong trend confirmation

This indicator can also be used for mean reversion trading.

tdS3HMg.png

25UAj2N.png


thinkScript Code

Code:
# Cloudy Momentum
# Assembled by BenTen at useThinkScript.com
# Converted from https://raw.githubusercontent.com/f13end/tradingview-custom-indicators/master/indicators/CloudyMomentum.pine

input length = 26;
input emaLength = 55;

def lower = lowest(close, length) - (highest(close, length) - lowest(close, length)) * 0.618;
def upper = highest(close, length) + (highest(close, length) - lowest(close, length)) * 0.618;

def lowerEMA = expAverage(lower, emaLength);
def upperEMA = expAverage(upper, emaLength);
def basis = (lowerEMA + upperEMA) / 2;

plot lower_band = lowerEMA;
plot upper_band = upperEMA;
plot middle = basis;

AddCloud(upper_band, lower_band, color.gray, color.gray);

upper_band.SetDefaultColor(GetColor(1));
lower_band.SetDefaultColor(GetColor(0));
middle.SetDefaultColor(GetColor(4));
 

horserider

Well-known member
VIP
@john3 Looks like a price channel. Different calculations than BB. From charts shown look for reversals when price leaves the outer bands.
 
Top