fix(simulation,technicals): fix EMA 200 warmup distortion, intrabar execution path, and zero slippage

This commit is contained in:
2026-09-01 17:38:34 +02:00
parent cb8a169043
commit d161efb370
5 changed files with 25 additions and 19 deletions
@@ -62,8 +62,7 @@ public static class TechnicalIndicatorsEngine
public static decimal CalculateEma(IReadOnlyList<CandleDto> candles, int period)
{
if (candles == null || candles.Count == 0 || period <= 0) return 0m;
if (candles.Count < period) return CalculateSma(candles, candles.Count);
if (candles == null || candles.Count < period || period <= 0) return 0m;
decimal k = 2m / (period + 1);
// Seed with SMA