Skip to main content

Quick Start Guide

Get your AI-powered XAUUSD trading bot up and running in just a few minutes. This guide will walk you through installation, configuration, and running your first analysis.
This quickstart assumes you have Python 3.8+ installed and a MetaTrader 5 account. If not, see the Installation Guide for detailed setup.

Prerequisites

Before you begin, ensure you have:
  • Python 3.8 or higher
  • MetaTrader 5 with an active account
  • A Groq API key (Get one here)

Installation

1

Clone the Repository

Clone the XAUUSD Trading Assistant AI repository to your local machine:
git clone https://github.com/codebytemirza/XAUUSD_TRADING_ASISTENT_AI.git
cd XAUUSD_TRADING_ASISTENT_AI
2

Install Dependencies

Install the required Python packages:
pip install MetaTrader5 pandas numpy langchain-groq streamlit
If you don’t have a requirements.txt file, use the first command to install packages directly.
3

Configure Groq API Key

Create a .streamlit/secrets.toml file in your project directory:
mkdir -p .streamlit
Add your Groq API key to .streamlit/secrets.toml:
GROQ_API_KEY = "your-groq-api-key-here"
Never commit your secrets.toml file to version control. Add .streamlit/ to your .gitignore.
4

Set Up MetaTrader 5

Ensure MetaTrader 5 is installed and running:
  1. Open MetaTrader 5
  2. Go to Tools → Options → Expert Advisors
  3. Enable Allow automated trading
  4. Enable Allow DLL imports
See the MetaTrader Setup Guide for detailed instructions.

Running Your First Analysis

1

Start the Dashboard

Launch the Streamlit dashboard:
streamlit run app.py
The dashboard will open in your browser at http://localhost:8501.
2

Run Analysis

In the dashboard sidebar:
  1. Click the 📈 Run New Analysis button
  2. Wait for the bot to analyze market data across all timeframes
  3. View results in the Analysis and Trading Signal tabs
The first analysis may take 10-15 seconds as the bot fetches data from MetaTrader 5 and processes it through the AI engine.
3

Review Your Signal

The dashboard will display:
  • Technical Analysis: Multi-timeframe indicator readings (RSI, EMA, ATR)
  • Market Data: Price data for all 6 timeframes (D1, H4, H1, M30, M15, M5)
  • Trading Signal: AI-generated recommendation with entry, stop-loss, take-profit, and reasoning
Example signal output:
Signal: BUY
Entry: 2015.50
Stop-Loss: 2010.20
Take-Profit: 2025.80
Risk-Reward: 1:2.0
Position Size: 0.10 lots (1% risk)
Reasoning: Strong bullish confluence across H4/H1 with RSI showing oversold bounce...

Understanding Your Results

The bot provides three main sections:

1. Technical Analysis Tab

Displays calculated indicators across all timeframes:
  • RSI: Momentum indicator (oversold below 30, overbought above 70)
  • EMA: Trend direction and dynamic support/resistance
  • ATR: Volatility measurement for stop-loss calculation
  • Order Blocks: Institutional supply/demand zones
  • Fair Value Gaps: Price imbalances for entry opportunities

2. Market Data Tab

Shows OHLC (Open, High, Low, Close) data for each timeframe in expandable sections.

3. Trading Signal Tab

AI-generated trading recommendation with:
  • Direction (BUY/SELL/HOLD)
  • Entry price
  • Stop-loss level
  • Take-profit targets
  • Position sizing (based on 1% risk)
  • Detailed reasoning from the AI engine
Learn how to interpret signals effectively in the Interpreting Signals Guide.

Next Steps

Dashboard Features

Explore auto-refresh, spread monitoring, and advanced features

Risk Management

Understand the 1% rule and stop-loss strategies

Technical Indicators

Deep dive into RSI, EMA, ATR, Order Blocks, and FVGs

Troubleshooting

Common issues and solutions

Performance Expectations

This bot has achieved 65% accuracy on real trading accounts. However, past performance does not guarantee future results. Always use proper risk management.

Tips for Success

  • Start Small: Begin with 1% risk per trade until you understand the signals
  • Verify Signals: Always check the AI reasoning and confirm with your own analysis
  • Use Auto-Refresh: Enable the 30-minute auto-refresh for continuous monitoring
  • Monitor Spread: High spreads can significantly impact profitability
  • Multi-Timeframe Confluence: The strongest signals align across multiple timeframes
This bot is for educational purposes only. Trading involves substantial risk of loss. See the Trading Disclaimer.

Build docs developers (and LLMs) love