Replay the past of a rebuilt account in its order
What an account did while the bot was off is now written before the splits and the dividends of those days, once and without acting on it; an attempt cut halfway is taken up from the same point. Until then the account is not valued at today's price, the guard keeps the last figures it knew with their time, and a stop order only cancels what is open. Protective sales of the archive are not continued, and the rest of a stop that fired in part is sold. Also the decisions of the phase (ADR 0020), the manuals and the dates under the equity chart. refs #69 #72 #75 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e58a26e8fa
commit
76b64ef147
31 files changed
+957
-130
No files matched your search
@@ -180,7 +180,7 @@ public sealed class LedgerTests
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
await rig.Ledger.MarkAsync(instrument.Id, price, _none).ConfigureAwait(false);
|
||||
await rig.Ledger.MarkAsync(account.AccountId, instrument.Id, price, _none).ConfigureAwait(false);
|
||||
await AssertBooksAsync(rig, account, strategy, step).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
@@ -363,7 +363,7 @@ public sealed class LedgerTests
|
||||
// A gain of 400 € on OKX, then the capital doubles: the return stays 10%, the deposit is no gain.
|
||||
var btc = await rig.InstrumentAsync(TradingRig.Btc).ConfigureAwait(false);
|
||||
await rig.Ledger.RecordFillAsync(rig.Fill(okx, btc, StrategyNames.CryptoTrend, OrderSide.Buy, 0.05m, 60000m), _none).ConfigureAwait(false);
|
||||
await rig.Ledger.MarkAsync(btc.Id, 68000m, _none).ConfigureAwait(false);
|
||||
await rig.Ledger.MarkAsync(okx.AccountId, btc.Id, 68000m, _none).ConfigureAwait(false);
|
||||
rig.Clock.Advance(TimeSpan.FromMinutes(5));
|
||||
await book.TakeAsync(_none).ConfigureAwait(false);
|
||||
await capital.SetAsync(Venues.Okx, 8000m, "test", _none).ConfigureAwait(false);
|
||||
|
||||
Reference in new issue
Block a user