OPEN-SOURCE SCRIPT
Fractal Retracement [Jamallo]

(2025)
Intro
FRAMA is a moving average that adapts its speed based on fractal geometry — specifically, the fractal dimension (D) of recent price action. When price is trending strongly (low fractal dimension), it moves fast. When price is choppy/ranging (high fractal dimension), it slows down. This makes it far more responsive than a standard EMA or SMA.
Breakdown:
The indicator wraps this[FRAMA logic] with a continuous range logic layer: thePine Script® only moves if price breaks beyond the FRAMA ± ATR-based range, creating a stepped/ratcheting effect that filters out noise.
Two sets of bands are plotted around the filtered line, scaled by ATR multiplied by user-defined multipliers (tight at 0.5×, medium at 1.0×). They're smoothed with a short EMA to reduce jitter, and filled with gradient colors for visual clarity.
Direction is simply determined by whetherPine Script® is rising or falling, and colors everything green (uptrend) or pink/red (downtrend).
END
In short, it's a noise-filtered trend indicator useful for identifying trend direction, dynamic support/resistance, and gauging how far price has retraced from the trend baseline.
Intro
FRAMA is a moving average that adapts its speed based on fractal geometry — specifically, the fractal dimension (D) of recent price action. When price is trending strongly (low fractal dimension), it moves fast. When price is choppy/ranging (high fractal dimension), it slows down. This makes it far more responsive than a standard EMA or SMA.
Breakdown:
The indicator wraps this[FRAMA logic] with a continuous range logic layer: the
filtered line = k
Two sets of bands are plotted around the filtered line, scaled by ATR multiplied by user-defined multipliers (tight at 0.5×, medium at 1.0×). They're smoothed with a short EMA to reduce jitter, and filled with gradient colors for visual clarity.
Direction is simply determined by whether
k
END
In short, it's a noise-filtered trend indicator useful for identifying trend direction, dynamic support/resistance, and gauging how far price has retraced from the trend baseline.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Join the Growing (Econophysics Trading) Community! ⚛️
discord.com/invite/qb4RKFdwYJ
Trade the physics of price.
discord.com/invite/qb4RKFdwYJ
Trade the physics of price.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Join the Growing (Econophysics Trading) Community! ⚛️
discord.com/invite/qb4RKFdwYJ
Trade the physics of price.
discord.com/invite/qb4RKFdwYJ
Trade the physics of price.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.