style patterns

This commit is contained in:
Miha Kralj
2026-01-25 16:01:45 -08:00
parent 2836f253c4
commit e59665c8f0
399 changed files with 6892 additions and 1323 deletions
+11 -1
View File
@@ -41,7 +41,10 @@ public class SlopeIndicator : Indicator, IWatchlistIndicator
protected override void OnUpdate(UpdateArgs args)
{
if (_slope == null || _selector == null) return;
if (_slope == null || _selector == null)
{
return;
}
var item = HistoricalData[0, SeekOriginHistory.End];
double value = _selector(item);
@@ -60,11 +63,18 @@ public class SlopeIndicator : Indicator, IWatchlistIndicator
double slope = _slope.Last.Value;
Color color;
if (slope > 0)
{
color = Color.Green;
}
else if (slope < 0)
{
color = Color.Red;
}
else
{
color = Color.Gray;
}
LinesSeries[0].SetMarker(0, new IndicatorLineMarker(color));
}
}