FeraTrading Compression Indicator v1.2

🔍 How It Works
The indicator operates using a combination of volatility compression, range expansion, and trend alignment filters:
Volatility Compression Detection
The script calculates short-term and long-term average candle ranges. A compression state is confirmed when the short-term average range is significantly smaller than the longer-term average, indicating a temporary pause or coiling in price action.
Range Expansion (Burst Condition)
Once compression is detected, the script waits for a breakout candle whose total range exceeds the long-term range average. This expansion—or "burst"—is the signal that the market is transitioning from compression into activity.
Directional Confirmation
For a signal to trigger, the candle must:
Have a strong body-to-wick ratio, confirming that most of the candle’s movement was in one direction.
Close above or below the fast EMA, aligned with a fast-vs-slow EMA trend filter to determine bullish or bearish bias.
Appear within the optional session filter window (08:30–11:30 EST) if enabled, focusing the signal to the most liquid time of day.
Signal Flip Functionality
The built-in "Signal Flip" toggle allows users to reverse the logic—converting buy conditions into sells and vice versa. This is useful when adapting to instruments or markets where the indicator's core logic behaves inversely due to structure or volatility style.
🧠 What Makes It Original
This indicator combines volatility analysis and trend confirmation in a compact signal logic that:
Reacts dynamically to the changing volatility of each instrument
Filters out weak or indecisive candles using body ratio logic
Avoids fixed thresholds or laggy oscillators
Offers modular control through session filtering and signal flipping to adapt across assets
The simplicity of the interface masks the depth of its logic, enabling it to remain effective across a range of instruments without the need for complex settings.
✅ How to Use It
Users typically apply the indicator by:
Enabling it on any timeframe
Watching for green arrows below candles (bullish breakout) and red arrows above candles (bearish breakout)
Entering trades at the open of the signal candle when a breakout arrow appears, managing their risk using personalized stop loss and take profit levels.
This tool is most effective when used in trending markets, after consolidation, or alongside structural or volume-based confirmation tools.
New Indicator Settings:
- Backtester Toggle – Show or hide the backtest overlays, including lines and the performance table
- Take Profit (points) – Define the point distance for your take profit
- Stop Loss (points) – Define the point distance for your stop loss
- Backtest Table Height – Adjusts vertical placement of the stats box on the chart
- Close Trades at End of Day – If enabled, trades are force-closed at the close of the final bar of the day
Backtest Logic & Assumptions:
If both stop loss and take profit are hit on the same bar, the stop loss is assumed to trigger first (conservative assumption)
Trades are entered at the open of the bar where the signal appears (since signals are based on the previous candle's data)
Stop Loss (SL) Triggers:
- Long trades: low <= SL
- Short trades: high >= SL
Take Profit (TP) Triggers:
- Long trades: high >= TP
- Short trades: low <= TP
Trade fees are not included as they affect dollar performance, not the number of points gained or lost.
Slippage is not included in these results, as the custom backtester operates on bar-level data and does not simulate intra-bar price movement.
Skrip jemputan sahaja
Hanya pengguna yang diberikan kebenaran oleh penulis mempunyai akses kepada skrip ini dan ini selalunya memerlukan pembayaran. Anda boleh menambahkan skrip kepada kegemaran anda tetapi anda hanya boleh menggunakannya selepas meminta kebenaran dan mendapatkannya daripada penulis — ketarhui lebih lanjut di sini. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi FeraTrading secara terus.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.
Use Code FIRST50 for 50% off any plan!
View some backtests at FeraTrading.com/backtests
Penafian
Skrip jemputan sahaja
Hanya pengguna yang diberikan kebenaran oleh penulis mempunyai akses kepada skrip ini dan ini selalunya memerlukan pembayaran. Anda boleh menambahkan skrip kepada kegemaran anda tetapi anda hanya boleh menggunakannya selepas meminta kebenaran dan mendapatkannya daripada penulis — ketarhui lebih lanjut di sini. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi FeraTrading secara terus.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Amaran: sila baca panduan kami untuk skrip jemputan sahaja sebelum memohon akses.
Use Code FIRST50 for 50% off any plan!
View some backtests at FeraTrading.com/backtests