- 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>
48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
using System.ComponentModel;
|
|
|
|
namespace PolyTraderSharp.Models
|
|
{
|
|
/// <summary>
|
|
/// Copytrading-spezifische Detail-Einstellungen je Account (Investment-/Zeit-Limits).
|
|
/// Bewusst getrennt vom Core-<see cref="AccountState"/> (allgemeine Account-Daten):
|
|
/// Diese Werte gehören dem Copytrading-Modul und werden im Modul-View bearbeitet.
|
|
/// Persistiert in der Collection "ct_account_settings" (BsonId = AccountId).
|
|
/// </summary>
|
|
public class CopyTradingAccountSettings
|
|
{
|
|
[Browsable(false)]
|
|
[MongoDB.Bson.Serialization.Attributes.BsonId]
|
|
public int AccountId { get; set; }
|
|
|
|
[Category("01. Risk Management")]
|
|
public decimal PerMarketLimit { get; set; } = 5.0m;
|
|
|
|
[Category("01. Risk Management")]
|
|
public decimal MaxPriceDifference { get; set; } = 2.0m;
|
|
|
|
[Category("01. Risk Management")]
|
|
public decimal MaxBuyPrice { get; set; } = 0.98m;
|
|
|
|
[Category("01. Risk Management")]
|
|
public decimal ProfitTarget { get; set; } = 50.0m;
|
|
|
|
[Category("01. Risk Management")]
|
|
public decimal PreRedeemLimit { get; set; } = 0.0m;
|
|
|
|
[Category("01. Risk Management")]
|
|
public decimal PerMasterLimit { get; set; } = 10.0m;
|
|
|
|
[Category("02. Time Limits")]
|
|
public decimal perMaxTime6h { get; set; } = 20.0m;
|
|
|
|
[Category("02. Time Limits")]
|
|
public decimal perMaxTime24h { get; set; } = 20.0m;
|
|
|
|
[Category("02. Time Limits")]
|
|
public decimal perMaxTime72h { get; set; } = 20.0m;
|
|
|
|
[Category("02. Time Limits")]
|
|
public decimal perMaxTimeNone { get; set; } = 40.0m;
|
|
}
|
|
}
|