pine files

This commit is contained in:
Miha Kralj
2026-01-31 14:05:53 -08:00
parent 51e885a4a6
commit 5ed4b6c0fc
102 changed files with 2883 additions and 593 deletions
+6 -9
View File
@@ -3,19 +3,16 @@ using System.Runtime.CompilerServices;
namespace QuanTAlib;
/// <summary>
/// RMA: Running Moving Average (also known as Wilder's Moving Average or SMMA)
/// RMA: Running Moving Average (Wilder's Moving Average)
/// </summary>
/// <remarks>
/// RMA is an Exponential Moving Average (EMA) with a different smoothing factor.
/// While EMA uses alpha = 2 / (period + 1), RMA uses alpha = 1 / period.
/// EMA variant using α=1/period for smoother, slower response than standard EMA.
/// Commonly used in ATR and RSI calculations per Wilder's original methodology.
///
/// Calculation:
/// alpha = 1 / period
/// RMA_new = RMA_old + alpha * (newest - RMA_old)
///
/// This implementation wraps the EMA implementation to ensure identical behavior and performance,
/// utilizing the same O(1) update complexity and zero-allocation architecture.
/// Calculation: <c>RMA_t = α×Price + (1-α)×RMA_{t-1}</c>, where <c>α = 1/period</c>.
/// </remarks>
/// <seealso href="Rma.md">Detailed documentation</seealso>
/// <seealso href="rma.pine">Reference Pine Script implementation</seealso>
[SkipLocalsInit]
public sealed class Rma : AbstractBase
{