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
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.