OPEN-SOURCE SCRIPT
업데이트됨 EMA (Fractional Length EMA) [A II]

EMA (Fractional Length EMA)
Description
This is a standard Exponential Moving Average (EMA) with artificial length constraints removed. It preserves the classic EMA formula while allowing decimal and sub-1 length values. The goal is to provide a mathematically complete EMA implementation rather than a restricted preset.
Basic Formula (Pine)
Pine Script®
Key Features
■ Caveats
Sub-1 values do not behave like traditional smoothing EMAs.
Overshoot and higher reactivity are expected outcomes of the formula.
Practical use example
I use an EMA with n = 0.6 for responsiveness and then smooth it with a DEMA(12). The short length captures impulses quickly Whilst the higher length DEMA filters out noise whilst maintaining reactivity. This resembles a hybrid between an oscillator and a moving average, ideal for spotting momentum changes without being overwhelmed by noise.
🇯🇵 日本語概要(Japanese Summary)
本スクリプトは、EMA(指数移動平均)を数理仕様に忠実に実装した拡張版です。特徴として、期間パラメータに1未満を含む小数値を指定可能です。これにより、従来の整数期間では不可能だった極めて細かい重み付けの調整や、高速な応答特性のシミュレーションを実現します。計算式は標準的なEMAと同一であり、パラメータの制約のみを排除しています。
中文概要(Chinese Summary)
本指標為標準 EMA 的擴充實作,核心公式保持不變,但開放了小數與小於 1 的週期設定。透過取消整數限制,提供更微細的權重微調空間。小於 1 的週期在數學上依舊有效,可呈現不同的濾波動態。本工具旨在回歸 EMA 數理定義的完整靈活性,而非創造新指標。
Disclaimer:
This script is a research tool for market structure analysis and educational purposes only. It does not constitute financial advice. Trading involves risk.
Description
This is a standard Exponential Moving Average (EMA) with artificial length constraints removed. It preserves the classic EMA formula while allowing decimal and sub-1 length values. The goal is to provide a mathematically complete EMA implementation rather than a restricted preset.
Basic Formula (Pine)
Key Features
- Decimal Lengths
Length accepts real numbers instead of integers. Provide finer control over weighting and transition between speeds— unlocks non-integer Fibonacci, golden ratio, or custom tuning. - Sub-1 Lengths (N < 1)
Allows smoothing factors greater than 1, which changes the filter’s response characteristics while remaining mathematically valid. When N < 1, the smoothing coefficient exceeds 1 and the recursive term becomes negative-weighted. In practice, the EMA overshoots the current price, then corrects in the opposite direction on the next bar, creating zig-zag oscillations around price. This enables:
■Strong responsiveness to change
■Impulse sensitivity
■Use within multi-pole or stacked filter designs
■Combination with slower averages for spread or difference constructions
■ Caveats
Sub-1 values do not behave like traditional smoothing EMAs.
Overshoot and higher reactivity are expected outcomes of the formula.
Practical use example
I use an EMA with n = 0.6 for responsiveness and then smooth it with a DEMA(12). The short length captures impulses quickly Whilst the higher length DEMA filters out noise whilst maintaining reactivity. This resembles a hybrid between an oscillator and a moving average, ideal for spotting momentum changes without being overwhelmed by noise.
🇯🇵 日本語概要(Japanese Summary)
本スクリプトは、EMA(指数移動平均)を数理仕様に忠実に実装した拡張版です。特徴として、期間パラメータに1未満を含む小数値を指定可能です。これにより、従来の整数期間では不可能だった極めて細かい重み付けの調整や、高速な応答特性のシミュレーションを実現します。計算式は標準的なEMAと同一であり、パラメータの制約のみを排除しています。
中文概要(Chinese Summary)
本指標為標準 EMA 的擴充實作,核心公式保持不變,但開放了小數與小於 1 的週期設定。透過取消整數限制,提供更微細的權重微調空間。小於 1 的週期在數學上依舊有效,可呈現不同的濾波動態。本工具旨在回歸 EMA 數理定義的完整靈活性,而非創造新指標。
Disclaimer:
This script is a research tool for market structure analysis and educational purposes only. It does not constitute financial advice. Trading involves risk.
릴리즈 노트
1. Updated a typo in the EMA function.2. Under development: This indicator is planned to from the basis of a fractional length "noisy" carrier signal that is then fed through a Kalman filter.
Fractional length EMA with length at 0.1. A band forms around price showing the raw volatility or carrier signal of price.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.