第一版策略

This commit is contained in:
ddrwode
2026-02-26 16:34:30 +08:00
parent 0edf741849
commit cf499863a3
19 changed files with 6067 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
"""
布林带均值回归策略 — 实盘交易 (D方案: 递增加仓)
BB(10, 2.5) | 5分钟K线 | ETH | 50x杠杆 | 递增加仓+1%/次 max=3
BB(10, 2.5) | 5分钟K线 | ETH | 50x杠杆 逐仓 | 递增加仓+1%/次 max=3
逻辑:
- 价格触及上布林带 → 平多(如有) + 开空; 已持空则加仓
@@ -43,7 +43,7 @@ class BBTradeConfig:
# 仓位管理
LEVERAGE = 50 # 杠杆倍数
OPEN_TYPE = "cross" # 仓模式
OPEN_TYPE = "isolated" # 仓模式
MARGIN_PCT = 0.01 # 首次开仓用权益的1%作为保证金
# 递增加仓 (D方案)
@@ -207,7 +207,7 @@ class BBTrader:
return False
def set_leverage(self) -> bool:
"""设置杠杆和仓模式"""
"""设置杠杆和仓模式"""
try:
resp = self.api.post_submit_leverage(
contract_symbol=self.cfg.CONTRACT_SYMBOL,