Revise strategy: TTM+ATM+leverage option pick, % exit, perp leverage/margin.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 08:38:03 +08:00
parent 7db4c9c8a3
commit 3957a83761
16 changed files with 532 additions and 261 deletions
+12 -1
View File
@@ -1,5 +1,4 @@
from .clock import can_open_new, window_key
from .engine import StrategyEngine, get_engine, set_engine
from .exits import check_exits
from .group import next_group_id
from .signal import Signal, decide
@@ -15,3 +14,15 @@ __all__ = [
"set_engine",
"window_key",
]
def __getattr__(name: str):
if name in ("StrategyEngine", "get_engine", "set_engine"):
from .engine import StrategyEngine, get_engine, set_engine
return {
"StrategyEngine": StrategyEngine,
"get_engine": get_engine,
"set_engine": set_engine,
}[name]
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")