Files
mt5_python_ea_suite/main.py
T

22 lines
726 B
Python
Raw Normal View History

2025-07-25 17:35:01 +08:00
import pandas as pd
2025-08-14 10:13:04 +08:00
from core.utils import initialize, shutdown, get_rates
2025-07-25 17:35:01 +08:00
from logger import logger
from optimizer import run_optimizer
2025-08-14 10:13:04 +08:00
# Note: The run_backtest and run_realtime functions have been moved to
# start_backtest.py and start_realtime.py respectively.
# This file is kept as a reference for the optimizer entry point.
2025-07-25 17:35:01 +08:00
if __name__ == "__main__":
# --- 选择运行模式 ---
2025-08-14 10:13:04 +08:00
# 1. 运行回测, 请执行 python start_backtest.py
# run_backtest()
2025-07-25 17:35:01 +08:00
2025-08-14 10:13:04 +08:00
# 2. 运行实盘交易, 请执行 python start_realtime.py
# from realtime_trader import RealtimeTrader
# trader = RealtimeTrader()
# trader.start()
2025-07-25 17:35:01 +08:00
# 3. 运行遗传算法优化,寻找最佳权重
2025-08-11 18:06:53 +08:00
# run_optimizer()
2025-08-14 10:13:04 +08:00
pass