OPEN-SOURCE SCRIPT
업데이트됨 DAMA OSC - Directional Adaptive MA Oscillator

Overview:
The DAMA OSC (Directional Adaptive MA Oscillator) is a highly customizable and versatile oscillator that analyzes the delta between two moving averages of your choice. It detects trend progression, regressions, rebound signals, MA cross and critical zone crossovers to provide highly contextual trading information.
Designed for trend-following, reversal timing, and volatility filtering, DAMA OSC adapts to market conditions and highlights actionable signals in real-time.
Features:
How It Works:
Histogram Logic:
The histogram measures the percentage difference between the fast and slow MA:
Pine Script®
Trend State Logic (Green / Blue / Red):
Rebound Logic:
A rebound is detected when price:
Inputs:
Display Options:
DAMA Settings:
Rebound Settings:
Available MA type:
Notes:
Alerts Included (Fully Configurable):
Credits:
Created by Eff_Hash. This code is shared with the TradingView community and full free. do not hesitate to share your best settings and usage.
The DAMA OSC (Directional Adaptive MA Oscillator) is a highly customizable and versatile oscillator that analyzes the delta between two moving averages of your choice. It detects trend progression, regressions, rebound signals, MA cross and critical zone crossovers to provide highly contextual trading information.
Designed for trend-following, reversal timing, and volatility filtering, DAMA OSC adapts to market conditions and highlights actionable signals in real-time.
Features:
- Support for 11 custom moving average types (EMA, DEMA, TEMA, ALMA, KAMA, etc.)
- Customizable fast & slow MA periods and types
- Histogram based on percentage delta between fast and slow MA
- Trend direction coloring with “Green”, “Blue”, and “Red” zones
- Rebound detection using close or shadow logic
- Configurable thresholds: Overbought, Oversold, Underbought, Undersold
- Optional filters: rebound validation by candle color or flat-zone filter
- Full visual overlay: MA lines, crossover markers, rebound icons
- Complete alert system with 16 preconfigured conditions
How It Works:
Histogram Logic:
The histogram measures the percentage difference between the fast and slow MA:
hist_value = ((FastMA - SlowMA) / SlowMA) * 100
Trend State Logic (Green / Blue / Red):
- Green_Up = Bullish acceleration
- Blue_Up (or Red_Up, depending the display settings) = Bullish deceleration
- Blue_Down (or Green_Down, depending the display settings) = Bearish deceleration
- Red_Down = Bearish acceleration
Rebound Logic:
A rebound is detected when price:
- Crosses back over a selected MA (fast or slow)
- After being away for X candles (rebound_backstep)
- Optional: filtered by histogram zones or candle color
Inputs:
Display Options:
- Show/hide MA lines
- Show/hide MA crosses
- Show/hide price rebounds
- Enable/disable blue deceleration zones
DAMA Settings:
- Fast/Slow MA type and length
- Source input (close by default)
- Overbought/Oversold levels
- Underbought/Undersold levels
Rebound Settings:
- Use Close and/or Shadow
- Rebound MA (Fast/Slow)
- Candle color validation
- Flat zone filter rebounds (between UnderSold and UnderBought)
Available MA type:
- SMA (Simple MA)
- EMA (Exponential MA)
- DEMA (Double EMA)
- TEMA (Triple EMA)
- WMA (Weighted MA)
- HMA (Hull MA)
- VWMA (Volume Weighted MA)
- Kijun (Ichimoku Baseline)
- ALMA (Arnaud Legoux MA)
- KAMA (Kaufman Adaptive MA)
- HULLMOD (Modified Hull MA, Same as HMA, tweaked for Pine v6 constraints)
Notes:
- **DEMA/TEMA** reduce lag compared to EMA, useful for faster reaction in trending markets.
- **KAMA/ALMA** are better suited to noisy or volatile environments (e.g., BTC).
- **VWMA** reacts strongly to volume spikes.
- **HMA/HULLMOD** are great for visual clarity in fast moves.
Alerts Included (Fully Configurable):
- Golden Cross:
Fast MA crosses above Slow MA - Death Cross:
Fast MA crosses below Slow MA - Bullish Rebound:
Rebound from below MA in uptrend - Bearish Rebound:
Rebound from above MA in downtrend - Bull Progression:
Transition into Green_Up with positive delta - Bear Progression:
Transition into Red_Down with negative delta - Bull Regression:
Exit from Red_Down into Blue/Green with negative delta - Bear Regression:
Exit from Green_Up into Blue/Red with positive delta - Crossover Overbought:
Histogram crosses above Overbought - Crossunder Overbought:
Histogram crosses below Overbought - Crossover Oversold:
Histogram crosses above Oversold - Crossunder Oversold:
Histogram crosses below Oversold - Crossover Underbought:
Histogram crosses above Underbought - Crossunder Underbought:
Histogram crosses below Underbought - Crossover Undersold:
Histogram crosses above Undersold - Crossunder Undersold:
Histogram crosses below Undersold
Credits:
Created by Eff_Hash. This code is shared with the TradingView community and full free. do not hesitate to share your best settings and usage.
릴리즈 노트
Chart updates, default value for display updated.오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.