never fallback to default values for fee_usd

This commit is contained in:
Simon Moisy 2025-05-28 02:50:40 +08:00
parent 74c8048ed5
commit 5f03524d6a

View File

@ -61,7 +61,7 @@ def process_timeframe_data(min1_df, df, stop_loss_pcts, rule_name, initial_usd,
for trade in trades:
final_usd *= (1 + trade['profit_pct'])
total_fees_usd = sum(trade.get('fee_usd', 0.0) for trade in trades)
total_fees_usd = sum(trade['fee_usd'] for trade in trades)
row = {
"timeframe": rule_name,