Add files via upload

This commit is contained in:
xiaochuan
2025-11-14 23:16:51 +00:00
committed by GitHub
parent 8c9371683e
commit 53c7aa9182
85 changed files with 6789 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# strategies/base.py
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from typing import Dict, Any
class Strategy:
"""
只负责“发信号”,不做撮合和资金结算。
on_bar 输入 state,输出 {"action": "ENTER_LONG"/"EXIT_LONG"/"HOLD"}。
"""
def __init__(self, **params: Any) -> None:
self.params = params
def on_bar(self, state: Dict[str, Any]) -> Dict[str, Any]:
return {"action": "HOLD"}