OPEN-SOURCE SCRIPT
Updated SMA7 Tail Reversal

๐ Description:
The SMA7 Tail Reversal indicator is designed to identify potential counter-trend trading opportunities by checking if candle wicks (tails) respect a key moving average level (SMA7).
This indicator highlights price action where candles are clearly separated from the moving average, suggesting a possible reversal or temporary correction.
๐ How It Works:
๐ Visual Representation:
๐ Usage:
The SMA7 Tail Reversal indicator is designed to identify potential counter-trend trading opportunities by checking if candle wicks (tails) respect a key moving average level (SMA7).
This indicator highlights price action where candles are clearly separated from the moving average, suggesting a possible reversal or temporary correction.
๐ How It Works:
- Moving Average Calculation:
Calculates a simple moving average (SMA) of length 7 to act as the primary trend filter. - Candle Classification:
Bullish Candle: A candle where the closing price is higher than the opening price, with a short upper wick.
Bearish Candle: A candle where the closing price is lower than the opening price, with a short lower wick. - Conditions for Coloring Candles:
Long Condition (Green Candle):
High & Low are both below the SMA7 line.
Volume is above the 20-period average.
A bullish candle is detected.
Short Condition (Red Candle):
High & Low are both above the SMA7 line.
Volume is above the 20-period average.
A bearish candle is detected.
๐ Visual Representation:
Green Candles: Potential long signals when price action stays below the SMA7 line.
Red Candles: Potential short signals when price action stays above the SMA7 line.
Yellow Line: SMA7, used as the dynamic threshold for signal generation.
๐ Usage:
Best applied to volatile markets with clear trends.
Effective in detecting counter-trend opportunities where price diverges from the SMA7 line.
Works well with additional confirmation tools for better accuracy.
Release Notes
// Softer candle color settingsvar color longCol = #6EE7B7 // Light Green (Soft long signal)
var color shortCol = #FCA5A5 // Light Red (Soft short signal)
Release Notes
without plot sma7Release Notes
sma 7Release Notes
plotbar(open, high, low, close, color=barCol)Release Notes
ALMA condition updated!
Release Notes
color updated!Release Notes
rollbackedRelease Notes
Zigzag mode updated
Release Notes
no zigzagRelease Notes
Zigzag styled dottedOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites โ learn more here.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites โ learn more here.
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.