tradestocsv.py update
This commit is contained in:
parent
91bde46bb9
commit
66492da604
Binary file not shown.
@ -23,8 +23,11 @@ largest_file = max(json_files, key=lambda x: x.stat().st_size)
|
||||
with open(largest_file) as f:
|
||||
data = json.load(f)
|
||||
|
||||
# 从环境变量中获取策略名称
|
||||
strategy_name = os.environ.get('STRATEGY_NAME', 'TheForceV7') # 如果未设置环境变量,则使用默认值 'TheForceV7'
|
||||
|
||||
# 提取交易记录
|
||||
trades = data['strategy']['TheForceV7']['trades']
|
||||
trades = data['strategy'][strategy_name]['trades']
|
||||
trades_df = pd.DataFrame(trades)
|
||||
|
||||
# 选择关键字段
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user