this is my code. i dont want to print trade details, i only want ending capital at the end of each day after all trades executed: import yfinance as yf
import pandas as pd
import pandas_ta as ta
import datetime as dt

# Define the initial capital
initial_capital = 1000

# Define the strategy parameters
short_window = 10
long_window = 30

# Download historical data for GBP/USD with a 5-minute interval
data = yf.download('GBPUSD=X', period='7d', interval='5m')

# Calculate Exponential Moving Averages (EMAs)
data['Short_EMA'] = data['Close'].ewm(span=short_window, adjust=False).mean()
data['Long_EMA'] = data['Close'].ewm(span=long_window, adjust=False).mean()

# Calculate RSI
data['RSI'] = ta.rsi(data['Close'], window=14)

# Calculate MACD
data['Short_MA'] = data['Close'].rolling(window=12, min_periods=1).mean()
data['Long_MA'] = data['Close'].rolling(window=26, min_periods=1).mean()
data['MACD'] = data['Short_MA'] - data['Long_MA']
data['Signal_Line'] = data['MACD'].rolling(window=9, min_periods=1).mean()

# Generate signals
data['Signal'] = 0.0
conditions_long = (data['Short_EMA'] > data['Long_EMA']) & \
                 (data['RSI'] > 30) & \
                 (data['MACD'] > 0) & \
                 (data['Signal_Line'] > 0) & \
                 (data['Close'] > data['Short_EMA']) & \
                 (data['Close'].shift(1) < data['Short_EMA'].shift(1))

conditions_short = (data['Short_EMA'] < data['Long_EMA']) & \
                  (data['RSI'] < 70) & \
                  (data['MACD'] < 0) & \
                  (data['Signal_Line'] < 0) & \
                  (data['Close'] < data['Short_EMA']) & \
                  (data['Close'].shift(1) > data['Short_EMA'].shift(1))

data.loc[conditions_long, 'Signal'] = 1.0  # Long signal
data.loc[conditions_short, 'Signal'] = -1.0  # Short signal

# Initialize the variables for the backtest
position = 0
capital = initial_capital
entry_price = 0.0
entry_time = None

# Run the backtest
for index, row in data.iterrows():
    # Check for long signals
    if row['Signal'] == 1.0 and position <= 0:
        position = 1
        entry_price = row['Close']
        entry_time = index
        print(f"Trade {index}: Going Long | Buying at {entry_price}")

    # Check for short signals
    elif row['Signal'] == -1.0 and position >= 0:
        position = -1
        entry_price = row['Close']
        entry_time = index
        print(f"Trade {index}: Going Short | Selling at {entry_price}")

    # Exit long position after an hour
    elif position == 1 and index - entry_time >= pd.Timedelta(hours=1):
        exit_price = row['Close']
        trade_profit = exit_price - entry_price
        capital += trade_profit * capital
        print(f"Trade {index}: Exit Long Position | Selling at {exit_price} | Profit from trade: {trade_profit * capital}")
        position = 0

    # Exit short position after an hour
    elif position == -1 and index - entry_time >= pd.Timedelta(hours=1):
        exit_price = row['Close']
        trade_profit = entry_price - exit_price
        capital += trade_profit * capital
        print(f"Trade {index}: Exit Short Position | Buying at {exit_price} | Profit from trade: {trade_profit * capital}")
        position = 0

# Print the final results
print(f"Starting capital: {initial_capital}")
print(f"Ending capital: {capital}")