OPEN-SOURCE SCRIPT
업데이트됨 Adaptive ALMA 2.0

This script is a indicator that builds upon the Arnaud Legoux Moving Average (ALMA). Unlike a standard ALMA, which uses fixed settings, this version is "Adaptive" and "Evasive."
Here is a breakdown of what the code is doing:
1. The Adaptive Engine (Efficiency Ratio)
The core logic uses an Efficiency Ratio (ER) to measure market noise versus trend strength:
High Volatility/Clear Trend: The ER is high. The script automatically shortens the length and reduces the offset to make the line react faster (minimizing lag).
Low Volatility/Consolidation: The ER is low. The script increases the length and sigma to make the line smoother, preventing "whipsaws" (fake signals).
2. Global Evasion Engine (Noise Filtering)
This is the most unique part of the script. It uses two ATRs (Fast and Slow) to create a "Noise Zone":
Auto-Tune Evasion: It calculates a visual_noise_th (threshold). If the price is wiggling inside this gray/aqua band, the trend state won't change easily.
Volatility-Based Sensitivity: In "noisy" markets, it requires a larger price move (determined by d_atr) to flip the trend from Bullish to Bearish.
PS1: ATR is calculated on the full range of candle prices - open + close
3. Trend Logic & Signals
Bullish (Green): When the ALMA is rising, the price is above it, and the move exceeds the noise threshold.
Bearish (Red): When the ALMA is falling, the price is below it, and the move exceeds the noise threshold.
Neutral (Gray): When the price is stuck within the "Noise Band."
4. Extra Layers
It includes Medium (50) and Long (200) ALMA lines to give you a broader context of the trend (e.g., only taking Buy signals when the Long ALMA is also green).
Source: It uses a custom price source (open + close + close) / 3 to give more weight to the closing price while maintaining some "breath" from the open.
PS2: the sample chart is for BTC with a 5-minute interval
PS3: Works on any interval - you only need to adjust the parameters, default values are for fast-moving and liquid assets (e.g. BTC intervals 1 minute - 1 day and higher) and suggested Japanese candles (including Heikin Ashi)
Here is a breakdown of what the code is doing:
1. The Adaptive Engine (Efficiency Ratio)
The core logic uses an Efficiency Ratio (ER) to measure market noise versus trend strength:
High Volatility/Clear Trend: The ER is high. The script automatically shortens the length and reduces the offset to make the line react faster (minimizing lag).
Low Volatility/Consolidation: The ER is low. The script increases the length and sigma to make the line smoother, preventing "whipsaws" (fake signals).
2. Global Evasion Engine (Noise Filtering)
This is the most unique part of the script. It uses two ATRs (Fast and Slow) to create a "Noise Zone":
Auto-Tune Evasion: It calculates a visual_noise_th (threshold). If the price is wiggling inside this gray/aqua band, the trend state won't change easily.
Volatility-Based Sensitivity: In "noisy" markets, it requires a larger price move (determined by d_atr) to flip the trend from Bullish to Bearish.
PS1: ATR is calculated on the full range of candle prices - open + close
3. Trend Logic & Signals
Bullish (Green): When the ALMA is rising, the price is above it, and the move exceeds the noise threshold.
Bearish (Red): When the ALMA is falling, the price is below it, and the move exceeds the noise threshold.
Neutral (Gray): When the price is stuck within the "Noise Band."
4. Extra Layers
It includes Medium (50) and Long (200) ALMA lines to give you a broader context of the trend (e.g., only taking Buy signals when the Long ALMA is also green).
Source: It uses a custom price source (open + close + close) / 3 to give more weight to the closing price while maintaining some "breath" from the open.
PS2: the sample chart is for BTC with a 5-minute interval
PS3: Works on any interval - you only need to adjust the parameters, default values are for fast-moving and liquid assets (e.g. BTC intervals 1 minute - 1 day and higher) and suggested Japanese candles (including Heikin Ashi)
릴리즈 노트
- Added additional options (timeframe = '', timeframe_gaps = false) - Change the time frame and set the marker after the end of the time interval (prevents "repainting")- Added offset options for drawing markers on the main chart
- Minor changes to the arguments panel (coloring moved to the styles panel)
- Slightly changed the coloring selection for averages (Adaptive ALMA first)
- Minor option change - FIXED ALMA medium and ALMA long averages are active by default - this is intended to enable the full range of indicator options.
The script does not repaint historical markers - the only option that "gives the impression of flickering" is the variability of the marker's appearance during the CURRENT candlestick until the end of the interval (candlestick), i.e., during the trading period of a given interval. This can be prevented by using the option from the first patch at the very top.
릴리즈 노트
- Fixed several bugs- Added Bollinger Bands with crossover markers
- Changed default settings to more universal ones (working on standard and Heikin Ashi candles)
- Added the "source" line as a guide
- For traditionalists, the code includes a hidden price switch for a standard set of price data (close, hlc, ohlc4, etc.) – just unlock and use.
I think this is the final version – it can be used as a ready-made system.
릴리즈 노트
minor code changes릴리즈 노트
minor code fixes오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.