OPEN-SOURCE SCRIPT
VSA Trail

Effort-Displacement VSA Trail
Effort-Displacement VSA Trail is a scalping-oriented VSA-style indicator built around a custom effort-result signal gate.
The script uses common technical-analysis building blocks such as ATR, SMA, volume, candle body, and trailing-stop direction, but the signal logic and the way these parts are combined are original to this script.
The core idea is simple: a directional signal should not appear only because price crossed a trailing stop, and it should not appear only because volume increased.
A Buy or Sell label is printed only when three things align on the same bar:
1. ATR trailing-stop direction confirms the active side.
2. Volume expands above its own baseline.
3. Price displacement expands above its own baseline.
The displacement layer is calculated as:
body = abs(close - open)
gap = abs(open - previous close)
displacement = body + gap
This is the main design difference of the script.
Instead of measuring only candle body size, the script also includes the opening gap from the previous close.
This creates a stricter effort-result model: volume must be accompanied by real directional displacement before a signal is allowed.
The ATR trailing stop acts as the directional regime layer.
The volume condition acts as the effort layer.
The displacement condition acts as the result layer.
Only when direction, effort, and result confirm each other does the script print a Buy or Sell signal.
This is not a generic volume spike tool and it is not a plain ATR trailing-stop indicator.
It is a combined VSA-style confirmation model designed to reduce weak signals where volume increases but price movement does not meaningfully follow.
Public / common components used:
- ATR calculation with ta.atr()
- SMA baselines with ta.sma()
- ATR-style trailing-stop direction logic
Original elements:
- Body-plus-gap displacement confirmation
- Same-bar effort-result validation
- Signal gating that requires ATR direction, volume expansion, and displacement expansion together
- Stateful Buy/Sell logic that avoids repeating the same-side signal until direction changes
This script does not include copied third-party script code.
It was built as an original combination of standard Pine Script functions and custom signal logic.
Use case:
This indicator is intended for short-term chart analysis where the trader wants to see only those directional moments where trailing-stop bias, volume expansion, and displacement expansion confirm each other.
Limitations:
The script is not a complete trading system.
It does not include position sizing, take-profit rules, slippage modeling, spread handling, or full risk management.
Signals can still fail in choppy, illiquid, or news-driven market conditions.
Disclaimer:
This script is for educational and informational purposes only.
It is not financial advice, investment advice, or a recommendation to buy or sell any asset.
Trading involves risk.
Past signals do not guarantee future results.
Always use your own analysis and risk management.
Effort-Displacement VSA Trail is a scalping-oriented VSA-style indicator built around a custom effort-result signal gate.
The script uses common technical-analysis building blocks such as ATR, SMA, volume, candle body, and trailing-stop direction, but the signal logic and the way these parts are combined are original to this script.
The core idea is simple: a directional signal should not appear only because price crossed a trailing stop, and it should not appear only because volume increased.
A Buy or Sell label is printed only when three things align on the same bar:
1. ATR trailing-stop direction confirms the active side.
2. Volume expands above its own baseline.
3. Price displacement expands above its own baseline.
The displacement layer is calculated as:
body = abs(close - open)
gap = abs(open - previous close)
displacement = body + gap
This is the main design difference of the script.
Instead of measuring only candle body size, the script also includes the opening gap from the previous close.
This creates a stricter effort-result model: volume must be accompanied by real directional displacement before a signal is allowed.
The ATR trailing stop acts as the directional regime layer.
The volume condition acts as the effort layer.
The displacement condition acts as the result layer.
Only when direction, effort, and result confirm each other does the script print a Buy or Sell signal.
This is not a generic volume spike tool and it is not a plain ATR trailing-stop indicator.
It is a combined VSA-style confirmation model designed to reduce weak signals where volume increases but price movement does not meaningfully follow.
Public / common components used:
- ATR calculation with ta.atr()
- SMA baselines with ta.sma()
- ATR-style trailing-stop direction logic
Original elements:
- Body-plus-gap displacement confirmation
- Same-bar effort-result validation
- Signal gating that requires ATR direction, volume expansion, and displacement expansion together
- Stateful Buy/Sell logic that avoids repeating the same-side signal until direction changes
This script does not include copied third-party script code.
It was built as an original combination of standard Pine Script functions and custom signal logic.
Use case:
This indicator is intended for short-term chart analysis where the trader wants to see only those directional moments where trailing-stop bias, volume expansion, and displacement expansion confirm each other.
Limitations:
The script is not a complete trading system.
It does not include position sizing, take-profit rules, slippage modeling, spread handling, or full risk management.
Signals can still fail in choppy, illiquid, or news-driven market conditions.
Disclaimer:
This script is for educational and informational purposes only.
It is not financial advice, investment advice, or a recommendation to buy or sell any asset.
Trading involves risk.
Past signals do not guarantee future results.
Always use your own analysis and risk management.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.