mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-23 21:18:04 +00:00
fix(docs): correct .md documentation across errors, dynamics, filters, forecasts, momentum, numerics, oscillators, reversals, statistics, trends, volatility, volume
Deep review of all indicator categories verified .md headers against .cs WarmupPeriod, parameters, inputs, and outputs. Fixes include warmup corrections, parameter documentation, output type accuracy, and Pine Script alignment.
This commit is contained in:
@@ -18,9 +18,9 @@ namespace QuanTAlib;
|
||||
[SkipLocalsInit]
|
||||
public sealed class Decay : AbstractBase
|
||||
{
|
||||
private readonly int _period;
|
||||
private readonly double _scale;
|
||||
private int _count;
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
private record struct State(double LastValid, double LastOutput);
|
||||
private State _state, _p_state;
|
||||
private int _p_count;
|
||||
@@ -40,7 +40,6 @@ public sealed class Decay : AbstractBase
|
||||
throw new ArgumentException("Period must be >= 1", nameof(period));
|
||||
}
|
||||
|
||||
_period = period;
|
||||
_scale = 1.0 / period;
|
||||
Name = $"Decay({period})";
|
||||
WarmupPeriod = 1;
|
||||
|
||||
@@ -8,8 +8,6 @@ indicator("Linear Decay (DECAY)", "DECAY", overlay=true)
|
||||
//@param length Decay period
|
||||
//@returns Decayed value that tracks peaks and descends linearly
|
||||
decay(series float source, simple int length) =>
|
||||
if length <= 0
|
||||
runtime.error("Length must be greater than 0")
|
||||
var float prev = na
|
||||
float scale = 1.0 / length
|
||||
float result = na
|
||||
|
||||
Reference in New Issue
Block a user