Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions notifications/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
"market_status_blend_gate_defensive": "🛡️ 降杠杆({asset})",
"signal_blend_gate_risk_on": "{trend_symbol} 站上 {window} 日门槛线,持有 SOXL {soxl_ratio} + SOXX {soxx_ratio}",
"signal_blend_gate_defensive": "{trend_symbol} 跌破门槛线,防守持有 SOXX {soxx_ratio}",
"market_status_blend_gate_overlay_capped": "🧯 过热降档({asset})",
"signal_blend_gate_overlay_capped": "{trend_symbol} 仍在 {window} 日门槛线上方,但触发过热降档({reasons}),目标仓位 {allocation_text}",
"blend_gate_reason_rsi_cap": "RSI 超阈值",
"blend_gate_reason_bollinger_cap": "突破布林上轨",
"signal_hold": "趋势持有",
"signal_entry": "入场信号",
"signal_reduce": "减仓信号",
Expand Down Expand Up @@ -165,6 +169,10 @@
"market_status_blend_gate_defensive": "🛡️ DE-LEVER ({asset})",
"signal_blend_gate_risk_on": "{trend_symbol} above {window}d gated entry, hold SOXL {soxl_ratio} + SOXX {soxx_ratio}",
"signal_blend_gate_defensive": "{trend_symbol} below gated entry, hold defensive SOXX {soxx_ratio}",
"market_status_blend_gate_overlay_capped": "🧯 HEAT-CAP ({asset})",
"signal_blend_gate_overlay_capped": "{trend_symbol} stays above the {window}d gate, but overlay cap ({reasons}) cuts exposure to {allocation_text}",
"blend_gate_reason_rsi_cap": "RSI over threshold",
"blend_gate_reason_bollinger_cap": "price above upper band",
"signal_hold": "Trend Hold",
"signal_entry": "Entry Signal",
"signal_reduce": "Reduce Signal",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
flask
gunicorn
quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@c24d4c52e84c8c696006532590b15e9be92c8d89
us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@c0cf04f002fd6348c9af7ebd95c9c0ad03c36bcd
quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@e8ef5e7f9086ab1ca7a0f9b8cff69284d51b96d2
us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@5e23d6d84d4e53ea95db849084c2d669729309af
pandas
requests
pytz
Expand Down
14 changes: 14 additions & 0 deletions tests/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ def test_build_translator_supports_chinese(self):
),
"SOXX 站上 140 日门槛线,持有 SOXL 70.0% + SOXX 20.0%",
)
self.assertEqual(
translate("market_status_blend_gate_overlay_capped", asset="SOXX"),
"🧯 过热降档(SOXX)",
)
self.assertEqual(
translate(
"signal_blend_gate_overlay_capped",
trend_symbol="SOXX",
window=140,
reasons="RSI 超阈值 + 突破布林上轨",
allocation_text="SOXX 15.0%",
),
"SOXX 仍在 140 日门槛线上方,但触发过热降档(RSI 超阈值 + 突破布林上轨),目标仓位 SOXX 15.0%",
)
self.assertEqual(
translate(
"small_account_warning_note",
Expand Down
Loading