AssetManager.API/AssetManager.Models/DTOs/StrategyDTO.cs
niannian zheng 2d1fbd37d8 feat: 添加策略引擎实现及相关组件
实现策略引擎核心功能,包括三种策略计算器和相关DTO定义:
1. 添加双均线策略(ma_trend)计算器
2. 添加吊灯止损策略(chandelier_exit)计算器
3. 添加风险平价策略(risk_parity)计算器
4. 定义策略类型常量类和策略配置DTO
5. 实现策略引擎服务接口和扩展方法
6. 更新项目引用和README文档
2026-03-02 14:15:34 +08:00

96 lines
2.6 KiB
C#

namespace AssetManager.Models.DTOs;
public class StrategyListResponse
{
public List<StrategyItem> items { get; set; }
}
public class StrategyItem
{
public string id { get; set; }
public string iconChar { get; set; }
public string title { get; set; }
public string tag { get; set; }
public string desc { get; set; }
public string bgClass { get; set; }
public string tagClass { get; set; }
public string btnText { get; set; }
public string btnClass { get; set; }
public string[] Tags { get; set; }
public string Id { get; set; }
public string IconChar { get; set; }
public string Title { get; set; }
public string Tag { get; set; }
public string Desc { get; set; }
public string BgClass { get; set; }
public string TagClass { get; set; }
public string BtnText { get; set; }
public string BtnClass { get; set; }
}
public class StrategyDetail
{
public string Id { get; set; }
public string IconChar { get; set; }
public string Title { get; set; }
public string Tag { get; set; }
public string Desc { get; set; }
public string BgClass { get; set; }
public string TagClass { get; set; }
public string[] Tags { get; set; }
public string BtnText { get; set; }
public string BtnClass { get; set; }
public object Parameters { get; set; }
public object Backtest { get; set; }
}
public class StrategyDetailResponse
{
public string id { get; set; }
public string iconChar { get; set; }
public string title { get; set; }
public string riskLevel { get; set; }
public string description { get; set; }
public List<string> tags { get; set; }
public List<ParameterItem> parameters { get; set; }
}
public class ParameterItem
{
public string name { get; set; }
public string displayName { get; set; }
public string type { get; set; }
public string value { get; set; }
}
public class CreateStrategyRequest
{
public string name { get; set; }
public string type { get; set; }
public string description { get; set; }
public string riskLevel { get; set; }
public List<string> tags { get; set; }
public object parameters { get; set; }
public string Title { get; set; }
}
public class StrategyResponse
{
public string Id { get; set; }
public string Title { get; set; }
public string Status { get; set; }
}
public class UpdateStrategyRequest
{
public string name { get; set; }
public string type { get; set; }
public object parameters { get; set; }
}
public class DeleteStrategyResponse
{
public string Id { get; set; }
public string Status { get; set; }
}