OPEN-SOURCE SCRIPT

Expansion Contraction Indicator

Expansion Contraction measures the speed at which price moves through two moving averages, a 10 period SMA of the high and an 8 period SMA of the low (Moving Average Channel). When the Positive Short line crosses above the zero line and the cloud is green, we are in a strong uptrend and a buy signal can be taken. When the Negative Short line crosses above the zero line and the cloud is red, we are in a strong downtrend and a sell signal can be taken.

Standard deviation lines are added to measure the strength of the trend and support and resistance areas. When the short lines go above 1 or 2 standard deviations, it may indicate price may have gotten very high or very low too quickly in the short term. When the cloud goes above 2 standard deviations, it may indicate the overall trend may be getting ready for a reversal.

Formula created by Brian Latta, author of The Book on Trading - The Secret Language of the Markets. Moving Average Channel concept by Jake Bernstein, author of many best-seller books on day-trading, including The Compleat Day Trader, Seasonal Futures Spreads, and more.
expansioncontractionOscillatorsSimple Moving Average (SMA)xc

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer