OPEN-SOURCE SCRIPT
ATR Based TMA Bands [NeuraAlgo]

ATR-Based TMA Bands [NeuraAlgo]
ATR-Based TMA Bands is a volatility-adaptive channel system built around a smoothed Triangular Moving Average (TMA).
It identifies trend direction, momentum shifts, and reversal opportunities using a combination of TMA structure and ATR-driven channel expansion.
Perfect for traders who want a clean, intelligent, and adaptive market framework.
Made by NeuraAlgo.

🔷 How It Works
1. 🔹 TMA Midline (Core Trend)
The indicator builds a smooth and stable midline using:
This creates a low-noise trend curve that reacts cleanly to real momentum changes.
2. 📈 Volatility-Adjusted Bands
The channels are built from:
These bands:
3. 🔁 Trend Tilt Algorithm
Slope is measured using an ATR-normalized tilt formula:
Pine Script®
This classifies the trend into:
The bar colors and midline adjust automatically to match market direction.
4. 🔄 Reversal Detection (Turn Signals)
The indicator flags directional flips:

These are early reversal alerts ideal for swing traders.
5. 🎯 Flip Buy / Flip Sell Signals
Deep volatility extensions create high-probability re-entry zones:
Great for:

📌 How to Use This Indicator
✔ Trend Trading
✔ Reversal Trading
✔ Risk Management
⭐ Best For
Anyone wanting a smart, clean technical framework
💡 Core Features
ATR-Based TMA Bands is a volatility-adaptive channel system built around a smoothed Triangular Moving Average (TMA).
It identifies trend direction, momentum shifts, and reversal opportunities using a combination of TMA structure and ATR-driven channel expansion.
Perfect for traders who want a clean, intelligent, and adaptive market framework.
Made by NeuraAlgo.
🔷 How It Works
1. 🔹 TMA Midline (Core Trend)
The indicator builds a smooth and stable midline using:
- 📐 Triangular Moving Average
- 🔄 Additional EMA smoothing
This creates a low-noise trend curve that reacts cleanly to real momentum changes.
2. 📈 Volatility-Adjusted Bands
The channels are built from:
- 📊 Standard Deviation × Expansion Multiplier
- 📏 Three ATR-based outer layers
These bands:
- Expand in high volatility
- Contract in stable markets
- Reveal pullbacks, breakout zones, and exhaustion points
3. 🔁 Trend Tilt Algorithm
Slope is measured using an ATR-normalized tilt formula:
atrBase = ta.atr(smoothLen)
tilt = (midline - midline[1]) / (0.1 * atrBase)
This classifies the trend into:
- Bullish
- Bearish
- Neutral
The bar colors and midline adjust automatically to match market direction.
4. 🔄 Reversal Detection (Turn Signals)
The indicator flags directional flips:
- Turn Up → bearish → bullish shift
- Turn Down → bullish → bearish shift
These are early reversal alerts ideal for swing traders.
5. 🎯 Flip Buy / Flip Sell Signals
Deep volatility extensions create high-probability re-entry zones:
- Flip Buy → price rebounds from oversold ATR zone
- Flip Sell → price rejects from overbought ATR zone
Great for:
- Mean-reversion entries
- Trend re-tests
- Pullback trades
- Exhaustion signals
📌 How to Use This Indicator
✔ Trend Trading
- Follow trend using tilt-colored candles
- Use midline as dynamic trend filter
- Use channels for breakout/pullback entries
✔ Reversal Trading
- Watch for Turn Up / Turn Down labels
- Flip signals show where the market is over-stretched
✔ Risk Management
- ATR channels automatically adjust to volatility
- Helps with smarter SL/TP placement
⭐ Best For
- Trend traders
- Swing traders
- Reversal hunters
- Volatility lovers
Anyone wanting a smart, clean technical framework
💡 Core Features
- TMA-smoothed trend detection
- Multi-layer ATR expansion channels
- Intelligent trend tilt algorithm
- Turn Up / Turn Down reversal markers
- Flip Buy / Flip Sell exhaustion signals
- Adaptive bar coloring
- Clean and professional visual design
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.
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.
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.