Slice 6 (Fable-Fixes): Totcode/Demo-Balance/Settings-Validierung + Plan-Abschluss
- Totcode: services/SnapshotService.cs entfernt (nirgends registriert). - Demo-Balance/PnL-Reconciliation: Demo-BUY zieht jetzt die Entry-Fee ab, Demo-Close schreibt netto (exitUsd - Exit-Fee) gut -> Summe(Balance-Aenderungen) = Summe(PnL) statt um die Fees zu driften (Demo als Validierung konsistent). - Settings-Validierung: SellLogic.IsLadderConfigInverted (Max-Preisabstand >= SELL-Floor -> Leiter startet am Floor) + Warnung beim Settings-Laden (StartupHydration). Bewusst als Follow-up dokumentiert (Live-Verifikation/Risiko): M3-Autoincrement-Migration, PersistenceService-Dedup-Zeitfenster, Perf (UpsertLive-Dirty-Check, Leiter-Parallelitaet). Tests: +3 (IsLadderConfigInverted). Build 0 Fehler, 236 gruen, --smoke-ui ok. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
84b2b276d9
commit
782c08a860
@@ -199,5 +199,16 @@ namespace PolyTrader.Tests
|
||||
decimal usdc = size * price;
|
||||
Assert.Equal(size, usdc / price);
|
||||
}
|
||||
|
||||
// ----- IsLadderConfigInverted (Slice 6) -----
|
||||
|
||||
[Theory]
|
||||
[InlineData(2.0, 15.0, false)] // Default: Abstand < Floor -> ok
|
||||
[InlineData(15.0, 15.0, true)] // gleich -> Start am Floor
|
||||
[InlineData(20.0, 15.0, true)] // Abstand > Floor -> invertiert
|
||||
public void IsLadderConfigInverted_flags_buydiff_ge_floor(double maxDiff, double floor, bool expected)
|
||||
{
|
||||
Assert.Equal(expected, IsLadderConfigInverted((decimal)maxDiff, (decimal)floor));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user