Skip to content

Repository files navigation

memecoin-freqtrade-bot

Virtual paper-trading bot for memecoins built on Freqtrade.

All trades are simulated with real exchange fees (0.1 % taker/maker) and order-book-based fill prices so the numbers reflect what live trading would actually cost and earn.


What this does

  • Runs entirely in dry-run / paper-trading mode (no real money ever moves).
  • Applies 0.1 % fee per side (0.2 % round-trip) — the standard Binance spot fee.
  • Uses order-book top-1 pricing to approximate realistic fill slippage.
  • Targets the 20 most liquid memecoins on Binance (configurable in user_data/config/pairs.json).
  • Exposes FreqUI at http://localhost:8080 for a live dashboard.

Prerequisites

  • Docker and Docker Compose (v2)
  • make (optional but convenient; all commands can be run with docker compose directly)

Quick start

1. Clone the repo

git clone https://github.com/YOUR_USERNAME/memecoin-freqtrade-bot.git
cd memecoin-freqtrade-bot

2. Configure credentials

cp .env.example .env
# Edit .env with any values you want to change.
# API keys are not required for paper trading.

Update user_data/config/config.json and set strong values for:

"jwt_secret_key": "your-random-secret",
"ws_token":       "your-random-token",
"username":       "freqtradeuser",
"password":       "your-password"

3. Download historical data (needed for backtesting)

make download-data TIMERANGE=20240101-20241231

This downloads 5 m OHLCV candles for all pairs from the pairs.json list.

4. Run a backtest

make backtest TIMERANGE=20240101-20241231

Freqtrade prints a full profit/loss table including:

  • Total profit (USDT and %)
  • Win/loss ratio
  • Max drawdown
  • Average trade duration
  • Per-pair breakdown

Because enable_protections: true and realistic fees are set, the numbers represent what you would have earned or lost on a real account.

5. Start paper trading (live simulation)

make trade

The bot connects to Binance, fetches real-time prices, and places virtual orders. Open http://localhost:8080 to see the FreqUI dashboard.

make logs    # tail the log
make status  # show container status
make stop    # stop the bot

Workflow for evaluating profitability

Download data  →  Backtest  →  Tune parameters  →  Paper trade live
   make            make           make hyperopt        make trade
download-data     backtest
  1. Backtest over a historical period to get a rough signal.
  2. Hyperopt to search for better parameter values.
  3. Paper trade live for at least 2–4 weeks before drawing conclusions.
  4. Compare paper-trading results to backtest to check for overfitting.

Pair list

Edit user_data/config/pairs.json to add or remove coins. Current list includes: DOGE, SHIB, PEPE, FLOKI, BONK, WIF, MEME, NEIRO, POPCAT, TURBO, BRETT, MOG, DOGS, HMSTR, CATI, NOT, 1000SATS, BOME, MYRO, SLERF.


Strategy overview (MemecoinStrategy)

Entry conditions (all must be true):

  1. Volume ratio > N × 24-candle rolling average (configurable, default 2×)
  2. RSI between 35 and 60 (momentum zone, not overbought)
  3. Price > EMA-9 and EMA-9 > EMA-21 (short-term uptrend)
  4. EMA-21 ≥ EMA-50 (medium-term trend)
  5. MACD histogram positive and rising
  6. Price < 98 % of upper Bollinger Band
  7. Stochastic RSI below 85

Exit conditions (any one triggers exit):

  1. RSI > 75 (overbought)
  2. Price crosses below EMA-9
  3. MACD histogram flips negative

ROI targets:

Time Target
Any time 6 %
30 min 4 %
1 h 2.5 %
2 h 1.5 %
4 h 1 %

Stop-loss: 8 % hard stop + trailing stop (activates at +4 %, trails 2 %)


Hyperopt

Find better parameter values automatically:

make hyperopt TIMERANGE=20240601-20241231 EPOCHS=300

After hyperopt completes, the best parameters are saved to user_data/hyperopt_results/. Update MemecoinStrategy.py with the printed values to apply them.


Cost model

Cost item Value
Taker fee 0.1 % (standard Binance spot)
Maker fee 0.1 %
Round-trip cost 0.2 % (two taker fills)
Slippage model Order-book top-1 (use_order_book)
Spread Included via order-book pricing

To model BNB fee discount (0.075 %), change taker/maker to 0.00075 in config.json.


Switching to live trading

Only do this after extensive paper-trading validation.

  1. Set real API keys in .env and update config.json accordingly.
  2. Change "dry_run": false in config.json.
  3. Remove "dry_run_wallet" or set it to your actual balance.
  4. Restart with make stop && make trade.

Project structure

memecoin-freqtrade-bot/
  user_data/
    config/
      config.json           Main bot configuration (fees, API server, etc.)
      config.backtest.json  Overrides for backtesting and hyperopt
      pairs.json            Memecoin pair whitelist
    strategies/
      MemecoinStrategy.py   Trading strategy
    data/                   Downloaded OHLCV data (gitignored)
    logs/                   Bot logs (gitignored)
    backtest_results/       Backtest JSON exports
  docker-compose.yml              Live paper-trading
  docker-compose.backtesting.yml  Backtesting
  docker-compose.hyperopt.yml     Hyperopt
  Makefile                        Convenience commands
  .env.example                    Environment variable template

Disclaimer

This project is for educational and simulation purposes only. Past backtest results do not guarantee future performance. Memecoins are extremely high-risk assets.

About

Virtual paper-trading bot for memecoins on Freqtrade with real fees

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages