volume indicators

This commit is contained in:
Miha Kralj
2026-01-30 12:47:25 -08:00
parent 76d2b50cbb
commit 7b3a6520d2
99 changed files with 9539 additions and 283 deletions
+10
View File
@@ -173,6 +173,16 @@ public abstract class BiInputIndicatorBase : AbstractBase
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public TValue Update(TValue actual, TValue predicted, bool isNew = true)
{
// Save state BEFORE sanitizers mutate it (for bar correction restore)
if (isNew)
{
_p_state = _state;
}
else
{
_state = _p_state;
}
double actualVal = SanitizeActual(actual.Value);
double predictedVal = SanitizePredicted(predicted.Value);
double error = ComputeError(actualVal, predictedVal);
+1 -1
View File
@@ -288,7 +288,7 @@ public sealed class RingBuffer : IEnumerable<double>
/// If wrapped, returns span over a copy.
/// </summary>
/// <remarks>
/// <para><b>  Allocation Warning:</b> When the buffer wraps around (i.e., when data spans
/// <para><b>Allocation Warning:</b> When the buffer wraps around (i.e., when data spans
/// from the end of the internal array back to the beginning), this method allocates a new
/// array via <see cref="ToArray"/> to return contiguous data. For allocation-free iteration
/// over wrapped buffers, use <see cref="GetSequencedSpans"/> instead.</para>