I used this code: def signal_generator(df):
    if df is None:
        return ''
    
    ema_analysis = []
    candle_analysis = []
    bollinger_signal = []

    df['EMA7'] = df['Close'].ewm(span=7, adjust=False).mean()
    df['EMA23'] = df['Close'].ewm(span=23, adjust=False).mean()

    if (
        df['EMA7'].iloc[-1] > df['EMA23'].iloc[-1] and
        df['EMA7'].iloc[-2] < df['EMA23'].iloc[-2]
    ):
        ema_analysis.append('golden_cross')

    elif (
        df['EMA7'].iloc[-1] < df['EMA23'].iloc[-1] and
        df['EMA7'].iloc[-2] > df['EMA23'].iloc[-2]
    ):
        ema_analysis.append('death_cross')

    # Candlestick analysis
    df['Body'] = df['Close'] - df['Open']
    df['Range'] = df['High'] - df['Low']
    df['UpperShadow'] = df['High'] - df[['Close', 'Open']].max(axis=1)
    df['LowerShadow'] = df[['Close', 'Open']].min(axis=1) - df['Low']
    
    df['BullishEngulfing'] = (df['Body'] > 0) & (df['Body'].shift() < 0) & (df['Open'] < df['Close'].shift())
    df['BearishEngulfing'] = (df['Body'] < 0) & (df['Body'].shift() > 0) & (df['Open'] > df['Close'].shift())
    df['Hammer'] = (df['UpperShadow'] >= 2 * df['Body']) & (df['LowerShadow'] <= 0.1 * df['Body'])
    df['HangingMan'] = (df['UpperShadow'] >= 2 * df['Body']) & (df['LowerShadow'] >= 2 * df['Body'])

    for i in range(len(df)):
        if df['BullishEngulfing'].iloc[i]:
            candle_analysis.append('bullish_engulfing')
        elif df['BearishEngulfing'].iloc[i]:
            candle_analysis.append('bearish_engulfing')
        elif df['Hammer'].iloc[i]:
            candle_analysis.append('hammer')
        elif df['HangingMan'].iloc[i]:
            candle_analysis.append('hanging_man')
        else:
            candle_analysis.append('')
    
    if ('golden_cross' in ema_analysis and 'bullish_engulfing' in candle_analysis):
        return 'buy'
    elif ('death_cross' in ema_analysis and 'bearish_engulfing' in candle_analysis):
        return 'sell'
    else:
        return ''

end_time = int(time.time() * 1000)
start_time = end_time - lookback * 60 * 1000
    
TradeType = "BUY" or "SELL"

secret_key = API_KEY_BINANCE  # Replace with your actual secret key obtained from MXC Exchange
access_key = API_SECRET_BINANCE # Replace with your actual access key obtained from MXC Exchange

import binance


while True:
    # Get data and generate signals
    df = get_klines(symbol, interval, lookback)
    if df is not None:
        signals = signal_generator(df)
        print(f"The signal time is: {dt.datetime.now().strftime('%Y-%m-%d %H:%M:%S')} - Signals: {signals}")

        # Check if signals is 'buy' or 'sell'
        if signals == 'buy':
            try:
                client.new_order(symbol=symbol, side='BUY', type='MARKET', quantity=0.1)
                print("Long order executed!")
            except binance.error.ClientError as e:
                print(f"Error executing long order: {e}")
            
            time.sleep(1)

        if signals == 'sell':
            try:
                client.new_order(symbol=symbol, side='SELL', type='MARKET', quantity=0.1)
                print("Short order executed!")
            except binance.error.ClientError as e:
                print(f"Error executing short order: {e}")
            
            time.sleep(1)
    
    # Wait for a specific interval before placing the next order
    time.sleep(1)  # Adjust the sleep duration as per your requirements
But it doesn't give me any right signals