chore: Update action versions in Publish.yml; improve .gitignore entries; refactor Alma, Super, and Trima classes for clarity and performance

This commit is contained in:
Miha Kralj
2025-12-17 10:16:37 -08:00
parent 80237b3b5a
commit facc814ede
5 changed files with 36 additions and 23 deletions
+19 -5
View File
@@ -180,15 +180,29 @@ public sealed class Super : ITValuePublisher
}
// SuperTrend
if (input.Close <= (_state.IsBullish ? _state.LowerBand : _state.UpperBand))
if (_state.IsBullish)
{
superTrend = _state.UpperBand;
_state.IsBullish = false;
if (input.Close < _state.LowerBand)
{
_state.IsBullish = false;
superTrend = _state.UpperBand;
}
else
{
superTrend = _state.LowerBand;
}
}
else
{
superTrend = _state.LowerBand;
_state.IsBullish = true;
if (input.Close > _state.UpperBand)
{
_state.IsBullish = true;
superTrend = _state.LowerBand;
}
else
{
superTrend = _state.UpperBand;
}
}
upperBand = _state.UpperBand;