增加策略交易
This commit is contained in:
@@ -1318,11 +1318,20 @@ def init_db():
|
||||
close_reason TEXT, closed_at TEXT)"""
|
||||
)
|
||||
|
||||
from strategy_db import init_strategy_tables
|
||||
|
||||
init_strategy_tables(conn)
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
init_db()
|
||||
|
||||
from strategy_config import build_strategy_config
|
||||
from strategy_register import attach_strategy_templates, register_strategy_trading
|
||||
|
||||
attach_strategy_templates(app, _REPO_ROOT)
|
||||
register_strategy_trading(app, build_strategy_config(sys.modules[__name__]))
|
||||
|
||||
def get_db():
|
||||
conn = sqlite3.connect(DB_PATH)
|
||||
conn.row_factory = sqlite3.Row
|
||||
|
||||
@@ -154,6 +154,8 @@
|
||||
<div class="header"><h1>加密货币|交易监控 + AI复盘一体化</h1></div>
|
||||
<div class="top-nav">
|
||||
<a href="/trade" class="{% if page == 'trade' %}active{% endif %}">交易执行</a>
|
||||
<a href="/strategy/trend" class="{% if page == 'strategy_trend' %}active{% endif %}">策略·趋势回调</a>
|
||||
<a href="/strategy/roll" class="{% if page == 'strategy_roll' %}active{% endif %}">策略·顺势加仓</a>
|
||||
<a href="/records" class="{% if page == 'records' %}active{% endif %}">交易记录与复盘</a>
|
||||
<a href="/stats" class="{% if page == 'stats' %}active{% endif %}">统计分析</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user