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
+6 -3
View File
@@ -278,6 +278,7 @@ public sealed class Amat : ITValuePublisher, IDisposable
double prevSlowCompensated = GetCompensatedValue(_state.PrevSlowEma, _state.SlowE * (1.0 / _slowDecay), _state.SlowIsCompensated);
bool fastAboveSlow = fastEma > slowEma;
bool fastBelowSlow = fastEma < slowEma;
bool fastRising = fastEma > prevFastCompensated;
bool slowRising = slowEma > prevSlowCompensated;
bool fastFalling = fastEma < prevFastCompensated;
@@ -289,7 +290,7 @@ public sealed class Amat : ITValuePublisher, IDisposable
trend = 1.0;
}
// Bearish: Fast < Slow AND both falling
else if (!fastAboveSlow && fastFalling && slowFalling)
else if (fastBelowSlow && fastFalling && slowFalling)
{
trend = -1.0;
}
@@ -465,6 +466,7 @@ public sealed class Amat : ITValuePublisher, IDisposable
double prevSlowEma = slowSpan[i - 1];
bool fastAboveSlow = fastEma > slowEma;
bool fastBelowSlow = fastEma < slowEma;
bool fastRising = fastEma > prevFastEma;
bool slowRising = slowEma > prevSlowEma;
bool fastFalling = fastEma < prevFastEma;
@@ -476,7 +478,7 @@ public sealed class Amat : ITValuePublisher, IDisposable
trend[i] = 1.0;
}
// Bearish: Fast < Slow AND both falling
else if (!fastAboveSlow && fastFalling && slowFalling)
else if (fastBelowSlow && fastFalling && slowFalling)
{
trend[i] = -1.0;
}
@@ -567,6 +569,7 @@ public sealed class Amat : ITValuePublisher, IDisposable
double prevSlowEma = slowSpan[i - 1];
bool fastAboveSlow = fastEma > slowEma;
bool fastBelowSlow = fastEma < slowEma;
bool fastRising = fastEma > prevFastEma;
bool slowRising = slowEma > prevSlowEma;
bool fastFalling = fastEma < prevFastEma;
@@ -578,7 +581,7 @@ public sealed class Amat : ITValuePublisher, IDisposable
trend[i] = 1.0;
}
// Bearish: Fast < Slow AND both falling
else if (!fastAboveSlow && fastFalling && slowFalling)
else if (fastBelowSlow && fastFalling && slowFalling)
{
trend[i] = -1.0;
}
+1 -4
View File
@@ -85,10 +85,7 @@ public sealed class Dmx : ITValuePublisher
{
_prevBar = _lastInput;
}
else
{
_isInitialized = true;
}
// On correction, do NOT force initialization - only restore and recompute
}
// Update _lastInput to the current input
-1
View File
@@ -123,7 +123,6 @@ public sealed class Super : ITValuePublisher
{
_prevBar = _lastInput;
}
_sampleCount++;
}
_lastInput = input;