Docs Download
Home / Docs / Getting Started / Installation Guide

Installation Guide

Prerequisites

  • Docker Desktop (only required if using Redis)
  • A supported exchange account with API keys
  • Your server’s public IP address (for API whitelisting)

Table of Contents

  1. Bot Configuration
  2. API Key Setup
  3. Redis Setup
  4. RedisMarketBridge
  5. Running the Bot
  6. Troubleshooting
  7. TradingView Integration

1. Bot Configuration

All configuration is done via the online configurator.

  1. Open: Configurator
  2. Select MagicTradeBot
  3. Configure:
SectionPurpose
ExchangesTrading pairs + exchange setup
Decision MakingStrategy + risk management
SignalsIndicators / signal sources
NotificationsTelegram, email, webhook alerts

Export settings:

  1. Click Export All YAML
  2. Unzip
  3. Replace /settings folder in project
magictradebot/
├── settings/  ← replace
├── MagicTradeBot
├── MagicTradeBot.exe
└── .env

2. API Key Setup

🔐 Security: Always use environment variables. Never store API keys in config files.

Whitelist IP

curl ifconfig.me

Add this IP to your exchange API whitelist.

Using .env

BINANCE_API_KEY=your_key
BINANCE_API_SECRET=your_secret

⚠️ Add .env to .gitignore


3. Redis Setup (Optional)

Required only if Redis is enabled.

Run Redis via Docker

docker run -d \
--name magictradebot-redis \
-p 6379:6379 \
--restart unless-stopped \
redis:latest

Verify

docker exec -it magictradebot-redis redis-cli ping

Expected: PONG


4. RedisMarketBridge

This component feeds live market data into Redis.

⚠️ Exchange + pairs + intervals MUST match the bot config exactly

Steps:

  1. Configure via configurator
  2. Export YAML
  3. Replace adapters/redismarketbridge/settings

5. Running the Bot

Order of startup

  1. Start Redis
  2. Start RedisMarketBridge
  3. Wait 2 minutes
  4. Start MagicTradeBot

Linux / macOS

chmod +x MagicTradeBot
./MagicTradeBot

Windows

MagicTradeBot.exe

💡 Run from terminal to see logs


6. Troubleshooting

API Errors

  • Check IP whitelist
  • Check permissions
  • Verify env variables

No market data

  • Wait 2 minutes after RedisMarketBridge start
  • Check matching config

Redis issues

  • Check Docker running
  • Port 6379 open

7. TradingView Signal Integration

MagicTradeBot supports external signals from TradingView via webhooks.

How it works

  • TradingView sends alerts → webhook
  • MagicTradeBot receives signals
  • Bot executes trades automatically

Step 1 — Enable Webhook in Bot

In your bot configuration:

  • Enable Signals → Webhook
  • Copy your webhook URL

Example:

http://your-server:port/webhook

Step 2 — Create TradingView Alert

  1. Open TradingView chart
  2. Add your indicator or strategy
  3. Click Alert
  4. Enable Webhook URL
  5. Paste your bot webhook URL

Step 3 — Define Alert Message

Example JSON payload:

{
  "symbol": "BTCUSDT",
  "action": "buy",
  "price": "{{close}}",
  "time": "{{time}}"
}

Supported Actions

  • buy
  • sell
  • close

Important Notes

  • Ensure symbol matches bot config exactly
  • Use correct timeframe alignment
  • Test with small trades first

⚠️ Incorrect payload format = ignored signals

Testing

You can simulate a webhook using:

curl -X POST http://your-server/webhook \
-H "Content-Type: application/json" \
-d '{"symbol":"BTCUSDT","action":"buy"}'

✅ If configured correctly, the bot will execute a trade


💡 For full details, refer to official TradingView integration docs.

Ready to trade? Download MagicTradeBot free and test in paper mode before going live.