OPEN-SOURCE SCRIPT
IDAHL | QuantEdgeB

IDAHL | QuantEdgeB
🔍 Overview
The IDAHL indicator builds adaptive, volatility-aware threshold bands from two separate ALMA lines—one smoothed from recent highs, the other from recent lows—then uses percentiles of those lines to define a dynamic “high/low” channel. Price crossing above or below that channel triggers clear long/short signals, with on-chart candle coloring, fills, optional labels and even a built-in backtest table.
✨ Key Features
• 📈 Dual ALMA Bands (with DEMA pre-smoothing)
o High ALMA: ALMA applied to DEMA-smoothed highs (high → DEMA(30) → ALMA).
o Low ALMA: ALMA applied to DEMA-smoothed lows (low → DEMA(30) → ALMA).
• 📊 Percentile Thresholds
o Computes a high threshold at the Xth percentile of the High ALMA over a lookback window.
o Computes a low threshold at the Yth percentile of the Low ALMA.
o Shifts each threshold forward by a small period to reduce repainting.
• ⚡ Dynamic Channel Logic
o When price closes above the high percentile line, the “final” threshold flips down to the low percentile line (and vice versa), creating an adaptive channel that only moves when the outer bound is violated.
o Inside the channel, the threshold holds its last value to avoid whipsaw.
• 🎨 Visual & Alerts
o Plots the two percentile lines and fills between them with a color that reflects the current regime (green for long, yellow for neutral, orange for short).
o Colors your candles to match the active signal.
o Optional “Long”/“Short” labels on confirmed flips.
o Alert conditions fire on each long/short crossover.
• 📊 On-Chart Backtest Metrics
o Toggle on a small performance table—complete with win-rate, net P/L, drawdown—from your chosen start date, without any extra code.
⚙️ How It Works
1. Adaptive Smoothing (ALMA)
o Uses ALMA (Arnaud Legoux Moving Average) for smooth, low-lag filtering. In this script, the inputs are additionally pre-smoothed with DEMA(30) to reduce noise before ALMA is applied—improving stability on highs/lows.
2. Percentile Lines
o The High ALMA series feeds a linear-interpolation percentile function to generate the upper bound; the Low ALMA produces the lower bound.
o These lines are offset by a small look-ahead (X bars) to reduce repaint behavior.
3. Channel Logic
o Breakout Flip: When the selected source (default: Close) closes above the upper bound, the active threshold “jumps” to the lower bound—locking in a new channel until price next crosses.
o Breakdown Flip: Conversely, a close below the lower bound flips the threshold to the upper bound.
4. Signal Generation
o Long while the source is above the current “final” threshold.
o Short while below.
o Neutral inside the channel before any flip.
5. Visualization & Alerts
o Dynamic fills between the two percentile lines change hue as the regime flips.
o Candles adopt the regime color.
o Optional pinned “Long”/“Short” labels at flip bars.
o Alerts on every signal crossover of the zero-based regime line.
6. Backtest Table
o From your chosen start date, a mini-table displays cumulative P/L, win rate and drawdown for this strategy—handy for quick in-chart validation.
🎯 Who Should Use It
• Breakout Traders hunting for adaptive channels that auto-recenter on new highs/lows.
• Volatility Traders who want thresholds that expand and contract with market turbulence.
• Trend-Chasers seeking a fresh take on high/low channels with built-in smoothing.
• Systematic Analysts who appreciate on-chart backtesting without leaving TradingView.
⚙️ Default Settings
• ALMA Length: 14
• Percentile Length: 35 bars
• Percentile Lookback Period (offset): 4 bars
• Upper Percentile: 92%
• Lower Percentile: 50%
• Threshold Source: Close
• Visuals: Candle coloring on, labels off by default, “Strategy” palette
• Backtest Table: on by default (toggleable)
• Start Date (Backtest): 09 Oct 2017
📌 Conclusion
IDAHL blends two smooth, low-lag ALMA filters (fed by DEMA-smoothed highs/lows) with percentile-based channel construction for a self-rewiring high/low envelope. It gives you robust breakout/breakdown signals, immediate visual context via colored fills and candles, optional labels, alerts, and even performance stats—everything you need to spot and confirm regime shifts in one compact script.
🔹 Disclaimer: Past performance is not indicative of future results. Always backtest and align settings with your risk tolerance and objectives before live trading.
🔹 Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
🔍 Overview
The IDAHL indicator builds adaptive, volatility-aware threshold bands from two separate ALMA lines—one smoothed from recent highs, the other from recent lows—then uses percentiles of those lines to define a dynamic “high/low” channel. Price crossing above or below that channel triggers clear long/short signals, with on-chart candle coloring, fills, optional labels and even a built-in backtest table.
✨ Key Features
• 📈 Dual ALMA Bands (with DEMA pre-smoothing)
o High ALMA: ALMA applied to DEMA-smoothed highs (high → DEMA(30) → ALMA).
o Low ALMA: ALMA applied to DEMA-smoothed lows (low → DEMA(30) → ALMA).
• 📊 Percentile Thresholds
o Computes a high threshold at the Xth percentile of the High ALMA over a lookback window.
o Computes a low threshold at the Yth percentile of the Low ALMA.
o Shifts each threshold forward by a small period to reduce repainting.
• ⚡ Dynamic Channel Logic
o When price closes above the high percentile line, the “final” threshold flips down to the low percentile line (and vice versa), creating an adaptive channel that only moves when the outer bound is violated.
o Inside the channel, the threshold holds its last value to avoid whipsaw.
• 🎨 Visual & Alerts
o Plots the two percentile lines and fills between them with a color that reflects the current regime (green for long, yellow for neutral, orange for short).
o Colors your candles to match the active signal.
o Optional “Long”/“Short” labels on confirmed flips.
o Alert conditions fire on each long/short crossover.
• 📊 On-Chart Backtest Metrics
o Toggle on a small performance table—complete with win-rate, net P/L, drawdown—from your chosen start date, without any extra code.
⚙️ How It Works
1. Adaptive Smoothing (ALMA)
o Uses ALMA (Arnaud Legoux Moving Average) for smooth, low-lag filtering. In this script, the inputs are additionally pre-smoothed with DEMA(30) to reduce noise before ALMA is applied—improving stability on highs/lows.
2. Percentile Lines
o The High ALMA series feeds a linear-interpolation percentile function to generate the upper bound; the Low ALMA produces the lower bound.
o These lines are offset by a small look-ahead (X bars) to reduce repaint behavior.
3. Channel Logic
o Breakout Flip: When the selected source (default: Close) closes above the upper bound, the active threshold “jumps” to the lower bound—locking in a new channel until price next crosses.
o Breakdown Flip: Conversely, a close below the lower bound flips the threshold to the upper bound.
4. Signal Generation
o Long while the source is above the current “final” threshold.
o Short while below.
o Neutral inside the channel before any flip.
5. Visualization & Alerts
o Dynamic fills between the two percentile lines change hue as the regime flips.
o Candles adopt the regime color.
o Optional pinned “Long”/“Short” labels at flip bars.
o Alerts on every signal crossover of the zero-based regime line.
6. Backtest Table
o From your chosen start date, a mini-table displays cumulative P/L, win rate and drawdown for this strategy—handy for quick in-chart validation.
🎯 Who Should Use It
• Breakout Traders hunting for adaptive channels that auto-recenter on new highs/lows.
• Volatility Traders who want thresholds that expand and contract with market turbulence.
• Trend-Chasers seeking a fresh take on high/low channels with built-in smoothing.
• Systematic Analysts who appreciate on-chart backtesting without leaving TradingView.
⚙️ Default Settings
• ALMA Length: 14
• Percentile Length: 35 bars
• Percentile Lookback Period (offset): 4 bars
• Upper Percentile: 92%
• Lower Percentile: 50%
• Threshold Source: Close
• Visuals: Candle coloring on, labels off by default, “Strategy” palette
• Backtest Table: on by default (toggleable)
• Start Date (Backtest): 09 Oct 2017
📌 Conclusion
IDAHL blends two smooth, low-lag ALMA filters (fed by DEMA-smoothed highs/lows) with percentile-based channel construction for a self-rewiring high/low envelope. It gives you robust breakout/breakdown signals, immediate visual context via colored fills and candles, optional labels, alerts, and even performance stats—everything you need to spot and confirm regime shifts in one compact script.
🔹 Disclaimer: Past performance is not indicative of future results. Always backtest and align settings with your risk tolerance and objectives before live trading.
🔹 Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🔹 Get access to our premium tools:
whop.com/quantedgeb/ 💎
🔹 Unlock our free toolbox:
tradinglibrary.carrd.co/ 🛠️
Disclaimer: All resources and indicators provided are for educational purposes only
whop.com/quantedgeb/ 💎
🔹 Unlock our free toolbox:
tradinglibrary.carrd.co/ 🛠️
Disclaimer: All resources and indicators provided are for educational purposes only
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
🔹 Get access to our premium tools:
whop.com/quantedgeb/ 💎
🔹 Unlock our free toolbox:
tradinglibrary.carrd.co/ 🛠️
Disclaimer: All resources and indicators provided are for educational purposes only
whop.com/quantedgeb/ 💎
🔹 Unlock our free toolbox:
tradinglibrary.carrd.co/ 🛠️
Disclaimer: All resources and indicators provided are for educational purposes only
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.