Candle Length Average Multi-timeframe (CLAM)

Why use CLAM?

Because candle length may be difficult to discern in fast, choppy markets. CLAM plots current price activity against previous trends. The calculation is similar to Know Sure Thing ( KST ) without the lag. CLAM uses Triple EMAs ( TEMA ) instead of Simple Moving Averages ( SMAs ), and raw open - close instead of clunky Rate of Change ( ROC ). CLAM does not squash values into a percentage as ROC does.

Who doesn't need CLAM?

Those who are already proficient with candlesticks , volume , support, and resistance don't need CLAM. They can spot weakness in the chart and the order book.


Two indicators. CLAM overlays two indicators over the chart, a fast trend and a slow trend.

The fast trend. A translucent area graph changes color from aqua to purple as candlesticks start shrinking. This is the first sign of weakness and may eventually indicate a reversal. Usually, it is best to wait for the second or third bump or dip in the extreme area of the fast trend, far from the centerline, and away from the slow trend, as it changes color. Or wait for them to cross for more confirmation. Look at history to get a feel for how it behaves. When the shaded area is above the centerline, the market is strong.

The slow trend. The slow trend is the TEMA of the fast trend, shown as a thick line that changes from lime to fuchsia to alert traders that candles are getting shorter in a higher time frame (and the larger trend could be reversing).

Color and slope. Rising slope and lime color indicate strength in a trend. Falling slope and fuchsia color indicate weakness. Colors are based solely on the slope of the lines.

Market cycles. Repeating waves and triangles can be identified in the fast and slow candlestick size trends. As with the ROC indicator, there is the possibility of detecting tops and bottoms early, but with caution. with steep trends, CLAM detects too early, because of detrended prices. This might be an advantage for those who want to ease out of risky positions over time. If not sure, consider other entry and exit strategies for steep trends like setting good targets instead of relying on indicators.

Divergence. CLAM divergence should work the opposite way of other indicators. It will often look like price is chasing it. When CLAM changes direction, it can seem to push prices that way. When CLAM moves and price does not follow, support or resistance is stopping the flow. After divergence, the reaction tends to follow the market bias of the slow trend. In a bear market, patterns seem to be more likely to break down, for example. CLAM can diverge widely during steep trends.

Default values. The default values should work in all time frames. But feel free to adjust them to filter out additional noise and false signals.


CLAM merely reveals trends in candle height. Markets don't always work in our favor. Strong trends may develop with no pullbacks. Prices can go into consolidation and poison indicators with chop. There are times to trade and times to take a break and set volume alerts. Use Bollinger Bands to see if the price is consolidating or going flat. Some might use margin to get more leverage during that time.


As always, this is for entertainment or study purposes, not investment advice. This software and interpretation are provided with no warranties expressed, or implied.

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.


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?