Phase 5: AccountState-Split (Copytrading-Limits -> Modul)
- Copytrading-Detail-Einstellungen (PerMarketLimit, MaxBuyPrice, PerMasterLimit, Zeit-Limits, PreRedeemLimit, ProfitTarget, MaxPriceDifference) aus dem Core- AccountState in das Modul-Modell CopyTradingAccountSettings verschoben. - CopyTradingState.AccountSettings + GetAccountSettings(accountId) (Default-safe). - Consumer umgestellt: CopyTradingEngine, TraderMonitorService, PolymarketWssClient, frm_main lesen die Limits jetzt aus den Account-Settings. - Neues Modul-Repo ICopyTradingAccountSettingsRepository (Collection ct_account_settings), in CopyTradingModule registriert. - StartupHydration: Settings laden + EINMALIGE Migration der Alt-Limits aus dem Roh-accounts-Dokument (keine konfigurierten Limits gehen verloren). - Build 0 Fehler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
37f9d0fae2
commit
095c4b64aa
@@ -51,36 +51,9 @@ namespace PolyTraderSharp.Models
|
||||
public decimal AvailableBalance { get; set; }
|
||||
|
||||
// Risk Settings
|
||||
[Category("04. Risk Management")]
|
||||
public decimal PerMarketLimit { get; set; } = 5.0m;
|
||||
|
||||
[Category("04. Risk Management")]
|
||||
public decimal MaxPriceDifference { get; set; } = 2.0m;
|
||||
|
||||
[Category("04. Risk Management")]
|
||||
public decimal MaxBuyPrice { get; set; } = 0.98m;
|
||||
|
||||
[Category("04. Risk Management")]
|
||||
public decimal ProfitTarget { get; set; } = 50.0m;
|
||||
|
||||
[Category("04. Risk Management")]
|
||||
public decimal PreRedeemLimit { get; set; } = 0.0m;
|
||||
|
||||
[Category("04. Risk Management")]
|
||||
public decimal PerMasterLimit { get; set; } = 10.0m;
|
||||
|
||||
// Time limits
|
||||
[Category("05. Time Limits")]
|
||||
public decimal perMaxTime6h { get; set; } = 20.0m;
|
||||
|
||||
[Category("05. Time Limits")]
|
||||
public decimal perMaxTime24h { get; set; } = 20.0m;
|
||||
|
||||
[Category("05. Time Limits")]
|
||||
public decimal perMaxTime72h { get; set; } = 20.0m;
|
||||
|
||||
[Category("05. Time Limits")]
|
||||
public decimal perMaxTimeNone { get; set; } = 40.0m;
|
||||
// Copytrading-Detail-Einstellungen (PerMarketLimit, MaxBuyPrice, Zeit-Limits …)
|
||||
// liegen bewusst NICHT mehr hier, sondern im Copytrading-Modul
|
||||
// (CopyTradingAccountSettings), da sie modulspezifisch sind.
|
||||
|
||||
[Browsable(false)]
|
||||
public ConcurrentDictionary<string, Position> OpenPositions { get; } = new(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
Reference in New Issue
Block a user