JJCB Trading Bot - Setup Guide

Table of Contents

Introduction

JJCB Trading Bot is a powerful automated trading signal generator that analyzes forex market data in real-time and sends trading signals directly to your Telegram account. The bot uses advanced technical analysis including candlestick patterns, indicators, and trend analysis to find high-probability trading opportunities.

Signal Focus: This bot focuses on quality over quantity, sending only the highest probability signals to maximize win rate.

Key Features

Advanced Analysis

Multi-factor technical analysis with pattern recognition and indicator confirmation

Telegram Integration

Real-time signals and results delivered directly to your Telegram

Precise Timing

Signals timed perfectly around candle closes for maximum accuracy

Cross-Platform

Works on Windows, Linux, macOS and Android (via Termux)

Requirements

For all platforms:

  • Python 3.7 or higher
  • Internet connection
  • Telegram account
  • Telegram Bot Token (create using @BotFather)
  • Your Telegram Chat ID

PC-specific requirements:

  • Windows, macOS, or Linux operating system
  • Command-line interface (Terminal or Command Prompt)

Termux-specific requirements:

  • Android device
  • Termux app installed from F-Droid (preferred) or Google Play
  • Storage permissions for Termux
Important: Make sure you have a stable internet connection to ensure the bot can fetch market data and send Telegram messages consistently.

PC Setup Instructions

Windows Setup

1

Install Python

Download and install Python 3.9+ from python.org. Make sure to check "Add Python to PATH" during installation.

2

Download the Bot Code

Clone the repository or download the bot script to your computer.

git clone https://github.com/itzjubayer/jjcb-trading-bot.git
cd jjcb-trading-bot
3

Install Required Packages

pip install requests pandas numpy python-telegram-bot pytz

macOS/Linux Setup

1

Install Python

Most macOS/Linux systems come with Python pre-installed. Check your version:

python3 --version

If it's lower than 3.7 or not installed, update or install it:

For macOS (using Homebrew):

brew install python

For Ubuntu/Debian Linux:

sudo apt update
sudo apt install python3 python3-pip
2

Download the Bot Code

git clone https://github.com/itzjubayer/jjcb-trading-bot.git
cd jjcb-trading-bot
3

Install Required Packages

pip3 install requests pandas numpy python-telegram-bot pytz

Termux Setup Instructions (Android)

Note: Termux allows you to run the bot 24/7 on your Android device without a computer.
1

Install Termux

Download Termux from F-Droid (recommended) or Google Play Store.

2

Update Packages

Open Termux and run:

pkg update && pkg upgrade -y
3

Install Required Packages

pkg install python git -y
4

Download the Bot Code

git clone https://github.com/itzjubayer/jjcb-trading-bot.git
cd jjcb-trading-bot
5

Install Python Dependencies

pip install requests pandas numpy python-telegram-bot pytz

Note: This may take some time on Termux as it needs to compile some packages.

6

Keep Termux Running in Background

To prevent Android from killing Termux when it's minimized:

  1. Go to your Android Settings
  2. Find "Battery" or "Battery Optimization"
  3. Find Termux in the list
  4. Set it to "Don't optimize" or "Unrestricted"

For running in the background even when the screen is off, install Termux:Wake-Lock:

pkg install termux-api
termux-wake-lock

Configuration

Create a Telegram Bot

1

Create a Bot on Telegram

  1. Open Telegram and search for "@BotFather"
  2. Start a chat with BotFather
  3. Send the command: /newbot
  4. Follow the instructions to create your bot
  5. When finished, you'll receive an API token - save this for later
2

Get Your Chat ID

  1. Search for "@userinfobot" on Telegram
  2. Start a chat with this bot
  3. It will reply with your user information, including your Chat ID
  4. Save this Chat ID for configuring the bot

Bot Settings (Optional Advanced Configuration)

The bot has default settings that work well, but you can optionally customize these settings by editing the script:

# Currency pairs to monitor
PAIRS = [
    'EUR_USD', 'GBP_USD', 'USD_JPY', 'AUD_USD', 'USD_CAD',
    'EUR_JPY', 'GBP_JPY', 'EUR_GBP', 'USD_CHF', 'EUR_AUD', 'GBP_AUD'
]

# Enable/disable debug mode
DEBUG_MODE = False  # Set to True for more detailed logs

# Timezone setting (default: UTC+6)
TIMEZONE = pytz.timezone("Asia/Dhaka")

To edit the file, you can use a text editor on PC, or in Termux:

pkg install nano
nano jjcb_bot.py

Running the Bot

Running on PC

1

Start the Bot

Open Command Prompt or Terminal, navigate to the bot directory:

cd path/to/jjcb-trading-bot

Run the bot:

# On Windows:
python jjcb_bot.py

# On macOS/Linux:
python3 jjcb_bot.py
2

Enter Your Telegram Details

When prompted, enter your Telegram Bot Token and Chat ID that you got earlier.

Running 24/7: For continuous operation, consider running the bot on a VPS or cloud server.

Running on Termux

1

Start the Bot

cd jjcb-trading-bot
python jjcb_bot.py
2

Enter Your Telegram Details

When prompted, enter your Telegram Bot Token and Chat ID.

3

Keep Termux Running in Background

To keep the bot running when you close Termux or lock your screen:

Option 1: Before starting the bot, use tmux:

pkg install tmux
tmux
# Now run your bot inside tmux
# To detach from tmux: Press Ctrl+B, then D
# To resume: tmux attach

Option 2: Use nohup:

nohup python jjcb_bot.py > bot.log 2>&1 &
# This will run the bot in the background

Stopping the Bot

The bot is designed to stop gracefully when you press Ctrl+C. It will:

  1. Stop sending new signals
  2. Wait for any current trade to complete
  3. Send the final result of that trade
  4. Display a summary of all trades
  5. Exit cleanly
Important: Always stop the bot using Ctrl+C rather than forcefully closing the terminal to ensure all pending trades are properly completed and results are sent.

If running in tmux (Termux):

# First attach to the session
tmux attach
# Then press Ctrl+C to stop the bot
# Exit tmux with: exit

If running with nohup (Termux):

# Find the process ID
ps | grep python
# Kill the process (replace 1234 with the actual PID)
kill -SIGINT 1234

Troubleshooting

Common Issues and Solutions

Telegram Issues
Connection Errors
Termux Problems
Dependency Errors

Telegram Bot not sending messages

  • Problem: Bot doesn't send messages to Telegram
  • Solution:
    1. Verify your bot token is correct
    2. Make sure you've started a chat with your bot on Telegram
    3. Check your internet connection
    4. Ensure your Chat ID is correct

Connection Errors

  • Problem: Bot shows API connection errors
  • Solution:
    1. Check your internet connection
    2. Verify the API endpoint is accessible
    3. If using a VPN, try changing servers or disabling it
    4. Increase the timeout in the requests.get() function

Termux Specific Issues

  • Problem: Bot stops when Termux is closed
  • Solution: Use tmux or nohup as described in the Running section
  • Problem: Pandas installation fails
  • Solution:
    pkg install clang
    MATHLIB="m" pip install pandas numpy

Dependency Errors

  • Problem: ModuleNotFoundError for any package
  • Solution: Install the specific missing package
  • pip install package_name
  • Problem: Version incompatibility
  • Solution: Specify version when installing
  • pip install python-telegram-bot==13.7

Frequently Asked Questions

How accurate are the trading signals?

The bot uses multiple technical indicators and pattern recognition with strict confirmation rules to identify high-probability setups. While no trading system is 100% accurate, the bot prioritizes quality over quantity, only sending signals when multiple conditions align for a high-confidence trade.

Can I run the bot 24/7?

Yes, the bot is designed to run continuously, but the computer or device running it must stay on. For PC users, consider using a VPS. For Android users, Termux with tmux or nohup and battery optimization disabled will allow 24/7 operation.

How many signals will I receive per day?

The bot focuses on quality over quantity. You might receive anywhere from 1-15 signals per day, depending on market conditions. The bot is selective and only sends signals when it identifies high-probability setups.

Is this bot fully automated for trading?

No, this is a signal generator only. It will send you trading signals, but you need to manually execute the trades on your preferred trading platform.

Can I modify the trading strategy?

Yes, advanced users can modify the code to adjust strategy parameters, add new indicators, or change signal criteria. The analyze_strategies() function contains the main trading logic.

Will the bot work during weekends?

The bot is programmed to skip weekends when forex markets are closed, as there's no valid data to analyze during this time.

Contact Support

Need help or have questions about the JJCB Trading Bot?

For bug reports or feature requests, please include detailed information about your setup and the issue you're experiencing.