Commit Graph

735 Commits

Author SHA1 Message Date
薇薇安
44d1a51001 1 2026-06-16 11:09:20 +08:00
薇薇安
b9b9a32762 1 2026-05-05 22:35:08 +08:00
薇薇安
5b0aac4e9d 1 2026-05-05 22:32:53 +08:00
薇薇安
e46fa4b117 1 2026-04-27 22:21:35 +08:00
薇薇安
70bc31dd31 feat(risk): Implement global risk lock mechanisms for daily and consecutive losses
Added configuration options for daily loss limits and global consecutive loss thresholds to enhance risk management. Implemented checks in the risk manager to prevent new trades when loss limits are reached, ensuring adherence to risk control principles. Updated logging to reflect the status of these new risk controls in the trading system.
2026-04-26 16:16:18 +08:00
薇薇安
c220a9034a feat(config): Enhance global configuration with auto trade filter defaults
Added support for auto trade filter defaults in the global configuration, ensuring consistency with account settings. Updated the frontend to include descriptions for the auto trade symbol whitelist, improving user understanding of the feature. This enhancement aims to provide better control over automated trading strategies.
2026-04-18 21:51:52 +08:00
薇薇安
a08b8d31c6 feat(config): Add auto trade symbol whitelist functionality
Introduced a new configuration option for an auto trade symbol whitelist, allowing only specified contracts to execute automatic trades. Updated relevant components to support this feature, enhancing control over automated trading strategies. The whitelist can be configured to restrict or allow trades based on user-defined criteria, improving risk management and trading precision.
2026-04-18 21:32:59 +08:00
薇薇安
f8afa22651 1 2026-03-30 20:00:36 +08:00
薇薇安
3e4b09724e 1 2026-03-24 22:43:45 +08:00
薇薇安
9a0061c06a 影子模式 2026-03-21 09:23:53 +08:00
薇薇安
c6103522be 1 2026-03-20 09:55:53 +08:00
薇薇安
a38f7cf09d 1 2026-03-20 08:42:36 +08:00
薇薇安
63e798f003 1 2026-03-18 08:41:05 +08:00
薇薇安
d68d3ad66c feat(strategy): Implement signal filtering mechanism for trade signals
Added a unified signal filtering layer to the trading strategy, allowing for enhanced analysis of trade signals based on market conditions. The filtering process includes logging reasons for acceptance or rejection, improving transparency and decision-making in automated trading. Exception handling is also implemented to ensure robustness during signal filtering application.
2026-03-12 19:11:06 +08:00
薇薇安
199c4a95dd 1 2026-03-12 16:01:08 +08:00
薇薇安
3e6ce55663 1 2026-03-11 20:11:49 +08:00
薇薇安
1446bf852b feat(config): Introduce layered profit locking mechanism and manual trading adjustments
Added new configurations for a layered profit locking system, allowing for gradual profit protection at specified thresholds. Introduced manual trading options, including reduced and blocked symbol lists, to enhance trading strategy flexibility. Updated relevant backend and frontend components to reflect these changes, improving risk management and user control over trading activities.
2026-03-09 14:51:08 +08:00
薇薇安
218ab7e195 增加小时限制 2026-03-05 08:43:03 +08:00
薇薇安
6858ddad6b 1 2026-03-03 09:21:38 +08:00
薇薇安
4ea1c53813 1 2026-03-01 18:08:21 +08:00
薇薇安
e2c37e6d62 周日开仓限制 2026-03-01 17:40:39 +08:00
薇薇安
1e55365d43 1 2026-03-01 14:18:36 +08:00
薇薇安
7bc384a58f 1 2026-03-01 13:56:50 +08:00
薇薇安
1f796a3fef 1 2026-03-01 13:42:54 +08:00
薇薇安
74c21bea9b feat(stats): Update admin dashboard stats to include recent 30-day account snapshots and enhance trade data source options
Modified the admin dashboard statistics to retrieve account snapshots from the last 30 days instead of just 1 day, ensuring more comprehensive data. Additionally, introduced a new data source option for trades, allowing users to select between 'binance' and 'local' records, with appropriate handling for each source. Updated the frontend components to reflect these changes and improve user experience in managing trade data.
2026-03-01 12:58:49 +08:00
薇薇安
007827464a 全局仪表板调整,增加管理中心管理用户及账号 2026-03-01 11:48:59 +08:00
薇薇安
0127edbc97 feat(config): Add new risk management configurations for Sunday and night trading hours
Introduced new configuration options to manage trading activities on Sundays and during night hours. This includes limits on the number of trades on Sundays, minimum signal strength requirements for Sunday trades, and restrictions on opening new positions during specified night hours. Updated relevant backend and frontend components to reflect these changes, enhancing risk control and user awareness of trading conditions.
2026-03-01 11:25:03 +08:00
薇薇安
8bb1bf7254 feat(position_manager): Improve monitoring logic for Binance positions without SL/TP orders
Updated the position monitoring logic to handle cases where positions exist on Binance without corresponding stop-loss or take-profit orders. Enhanced logging to provide clearer insights into the status of these positions, ensuring better risk management by avoiding unprotected positions. This change allows for automatic monitoring and order creation based on the presence of SL/TP orders.
2026-02-28 19:13:58 +08:00
薇薇安
c926586f8d feat(position_manager): Implement trailing stop-loss logic for profit protection
Enhanced the stop-loss mechanism to include a trailing stop-loss feature that activates when a position is significantly profitable. This update calculates a protective stop-loss price based on current profits, ensuring better risk management. Improved logging for tracking profit levels and stop-loss adjustments during monitoring.
2026-02-28 19:09:54 +08:00
薇薇安
4a5406c7e8 feat(position_manager): Enhance stop-loss logic for short positions and implement automatic SL/TP order synchronization
Updated the stop-loss calculation for short positions to ensure it locks in profits effectively. Added logic to automatically synchronize stop-loss and take-profit orders for positions without existing SL/TP on the exchange. This improves risk management and ensures positions are adequately protected. Enhanced logging for better tracking of stop-loss updates and synchronization events.
2026-02-28 19:01:59 +08:00
薇薇安
5d5ead36ac feat(strategy): Implement stagnation early exit strategy configuration and logic
Added new configuration options for the stagnation early exit strategy, allowing for partial position closure and stop-loss adjustments when a position has not reached a new high after a specified period. Updated relevant backend logic to handle this strategy, including tracking maximum profit and timestamps for the last new high. Frontend components were also updated to reflect these new settings and their descriptions, enhancing user control over trading strategies.
2026-02-27 23:48:05 +08:00
薇薇安
849b550910 feat(config): Add staggered scanning configuration for multi-account setups
Introduced new configuration options for staggered scanning in multi-account scenarios to reduce concurrency pressure. This includes settings for enabling staggered scanning, random delay intervals, and minimum/maximum delay times. Updated frontend components to reflect these new configurations and their descriptions, enhancing user awareness and control over scanning behavior.
2026-02-27 20:18:24 +08:00
薇薇安
78007040f1 feat(blacklist): Enhance blacklist logic and UI representation
Updated the trading system to differentiate between soft and hard blacklists based on recent performance metrics. The frontend now displays the blacklist status with clear visual indicators. This change aims to improve risk management and user awareness of trading conditions.
2026-02-27 20:08:07 +08:00
薇薇安
d5ef525224 1 2026-02-27 13:58:59 +08:00
薇薇安
861f1dc548 feat(stats): 增加全局交易统计功能
在后端新增了全局交易统计功能,包括按交易对和按小时的聚合统计,支持生成软黑名单和时段过滤建议。前端组件更新以展示基于最近N天交易统计的过滤结果,旨在提升交易策略的灵活性和风险控制能力。
2026-02-27 13:29:49 +08:00
薇薇安
076b597fb4 增加仪表板统计数据的导出功能 2026-02-27 13:04:25 +08:00
薇薇安
dfe29d70dc feat(stats): 添加交易统计API和前端展示
在后端新增了交易统计API,支持获取最近N天的交易数据,包括按交易对和按小时的聚合统计。同时,前端组件StatsDashboard更新,展示交易统计信息,包括净盈亏、胜率及策略建议。此改动旨在提升交易数据分析能力,帮助用户更好地理解交易表现。
2026-02-26 20:48:04 +08:00
薇薇安
e2e7effca2 feat(database): 添加交易统计模型和聚合逻辑
在数据库模型中新增了 `TradeStats` 类,包含交易统计功能,支持按交易对和日期聚合数据。实现了从 `binance_trades` 和 `trades` 表中提取交易数据的逻辑,并创建了相应的统计表 `trade_stats_daily` 和 `trade_stats_time_bucket`。此改动旨在增强交易数据分析能力,为后续的风险控制和决策提供支持。
2026-02-26 20:08:46 +08:00
薇薇安
30c5635570 2 2026-02-26 17:49:01 +08:00
薇薇安
ed0c6754e0 1 2026-02-26 17:40:08 +08:00
薇薇安
44aa7ef273 1 2026-02-26 17:37:50 +08:00
薇薇安
a34b6ba448 1 2026-02-26 17:36:01 +08:00
薇薇安
83bb687a97 1 2026-02-26 17:32:03 +08:00
薇薇安
99281395c1 fix(config_manager, api, trading_system): 添加 Algo 条件单请求超时配置
在配置管理模块中,新增了 `ALGO_ORDER_TIMEOUT_SEC` 配置项,以控制 Algo 条件单(止损/止盈)的单次请求超时,旨在应对币安接口高负载时可能出现的超时问题。同时,更新了相关模块的日志记录,提供更清晰的错误信息,确保在网络不稳定时能够有效调整超时设置。这一改动旨在增强系统的稳定性和风险控制能力。
2026-02-26 13:26:56 +08:00
薇薇安
e609d45fcd fix(config_manager, api, trading_system): 添加市场方案下的多空限制配置
在配置管理模块中,新增了 `BLOCK_SHORT_WHEN_BULL_MARKET` 和 `BLOCK_LONG_WHEN_BEAR_MARKET` 配置项,以控制在牛市和熊市中禁止开空和开多的策略。同时,更新了相关模块以支持这些新配置,确保在不同市场条件下的交易策略能够有效执行。这一改动旨在增强风险控制能力,确保交易决策与市场趋势一致。
2026-02-26 12:28:57 +08:00
薇薇安
10e6096cc1 fix(config_manager, api, database): 添加盈利保护配置项
在配置管理模块中,新增了 `PROFIT_PROTECTION_ENABLED` 和 `LOCK_PROFIT_AT_BREAKEVEN_AFTER_PCT` 配置项,以控制保本和移动止损的执行。同时,更新了数据库初始化脚本以包含这些新配置。这一改动旨在增强风险控制能力,确保在盈利时能够有效保护利润。
2026-02-26 12:07:16 +08:00
薇薇安
432fc85a79 增加移动止损单独的日志处理 2026-02-26 11:50:52 +08:00
薇薇安
df2b8d6372 fix(config_manager, api, database, position_manager, user_data_stream): 增强配置管理和日志记录
在配置管理模块中,新增了 `ONLY_AUTO_TRADE_CREATES_RECORDS` 配置项,以控制自动开仓记录的写入行为。同时,在多个模块中优化了日志记录,确保在数据库操作和交易记录完善时提供更清晰的错误信息。这一改动旨在提升系统的稳定性和可维护性,确保交易策略的有效性与安全性。
2026-02-26 11:19:23 +08:00
薇薇安
ab100bdc23 fix(account): 优化止损和止盈价格获取逻辑
在账户模块中,改进了止损和止盈价格的获取逻辑,确保在无数据库记录时能够根据币安持仓和配置比例进行计算。同时,增强了异常处理,确保在无法确定止损止盈价时提供详细的错误信息。这一改动旨在提升风险控制能力和系统的稳定性。
2026-02-26 09:59:45 +08:00
薇薇安
d80d4559c5 fix(position_manager): 优化代码结构和日志记录
在持仓管理模块中,调整了代码缩进和结构,提升了可读性和一致性。同时,增强了日志记录,确保在保存交易记录时提供更清晰的信息。这一改动旨在提升系统的稳定性和可维护性,确保交易策略的有效性与安全性。
2026-02-26 09:49:58 +08:00