PINE LIBRARY

AdaptiveMovingAverages

تم تحديثه
AdaptiveMovingAverages Library Documentation
This library provides functions for adaptive moving averages using various adaptation styles.

---

get_coeff
*Description:
Calculates the adaptation coefficient based on the selected adaptation style.

*Usage:


*Parameters:
- src: *(series float)* Input price series or data (e.g., `close`, `high`, or a custom calculation).
- length: *(simple int)* Length of the adaptation calculation.
- style: *(AdaptationStyle)* Selected adaptation style:
- AdaptationStyle.atr: Average True Range
- AdaptationStyle.roc: Rate of Change
- AdaptationStyle.stddev: Standard Deviation
- AdaptationStyle.rsi: Relative Strength Index
- AdaptationStyle.bbw: Bollinger Band Width
- AdaptationStyle.hv: Historical Volatility
- AdaptationStyle.fdi: Fractal Dimension Index
- AdaptationStyle.volumen: Volume-Based

*Returns:
*(float)* Adaptation coefficient in the range [0.01, 1.0].

---

adaptive_ema
*Description:
Calculates an Adaptive Exponential Moving Average (Adaptive EMA) using the specified adaptation style.

*Usage:


*Parameters:
- src: *(series float)* Input price series or data.
- length: *(int)* EMA length.
- adaptation_style: *(AdaptationStyle)* Adaptation style (e.g., AdaptationStyle.atr, AdaptationStyle.roc).
- adaptation_length: *(int)* Length used for calculating the adaptation coefficient.

*Returns:
*(float)* Adaptive EMA value.

---

adaptive_dema
*Description:
Calculates an Adaptive Double Exponential Moving Average (Adaptive DEMA).

*Usage:


*Parameters:
- src: *(series float)* Input price series or data.
- length: *(int)* DEMA length.
- adaptation_style: *(AdaptationStyle)* Adaptation style.
- adaptation_length: *(int)* Length used for calculating the adaptation coefficient.

*Returns:
*(float)* Adaptive DEMA value.

---

adaptive_tema
*Description:
Calculates an Adaptive Triple Exponential Moving Average (Adaptive TEMA).

*Usage:


*Parameters:
- src: *(series float)* Input price series or data.
- length: *(int)* TEMA length.
- adaptation_style: *(AdaptationStyle)* Adaptation style.
- adaptation_length: *(int)* Length used for calculating the adaptation coefficient.

*Returns:
*(float)* Adaptive TEMA value.

---

adaptive_wma
*Description:
Calculates an Adaptive Weighted Moving Average (Adaptive WMA).

*Usage:


*Parameters:
- src: *(series float)* Input price series or data.
- length: *(int)* WMA length.
- adaptation_style: *(AdaptationStyle)* Adaptation style.
- adaptation_length: *(int)* Length used for calculating the adaptation coefficient.

*Returns:
*(float)* Adaptive WMA value.

---

adaptive_hma
*Description:
Calculates an Adaptive Hull Moving Average (Adaptive HMA) using a combination of adaptive WMA and adaptive EMA.

*Usage:


*Parameters:
- src: *(series float)* Input price series or data.
- length: *(int)* HMA length.
- adaptation_style: *(AdaptationStyle)* Adaptation style.
- adaptation_length: *(int)* Length used for calculating the adaptation coefficient.

*Returns:
*(float)* Adaptive HMA value.

---

AdaptationStyle Enum
*Description:
The `AdaptationStyle` enum provides predefined options for selecting the adaptation method.

*Options:
- AdaptationStyle.atr: Average True Range
- AdaptationStyle.roc: Rate of Change
- AdaptationStyle.stddev: Standard Deviation
- AdaptationStyle.rsi: Relative Strength Index
- AdaptationStyle.bbw: Bollinger Band Width
- AdaptationStyle.hv: Historical Volatility
- AdaptationStyle.fdi: Fractal Dimension Index
- AdaptationStyle.volumen: Volume-Based

---

Example Usage

ملاحظات الأخبار
v2
ملاحظات الأخبار
v2
adaptiveAdaptive Moving Average (AMA)moving_averagetechindicator

مكتبة باين

كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشور تحكمه قوانين الموقع.

إخلاء المسؤولية