Step 1 / 8

Connect to MetaTrader 5

Select your trading symbol (e.g. XAUUSDb), choose the number of data bars, pick a timeframe (H1, M15, etc.), and set the MT5 terminal path. Click "Detect Instances" to auto-find your MetaTrader installation.

🧠 FxMath RL Studio — RL Advanced Trader v1.0 (FREE) — □ ✕
🔌 MT5 Connection
⚙️ RL Parameters
🎮 Controls
📊 Stats
Episode:
Reward:
Epsilon:
Balance:
Equity:
🆘 Support
Email:fxmathsolution@gmail.com
Website:https://www.fxmath.com
📝 Log
[10:00:01] FxMath RL Studio v1.0 (FREE) initialized.
[10:00:02] Ready — connect to MT5 to begin.
💡 Tip: Each line shows real-time status. During training you'll see episode rewards, epsilon decay, and errors here.
📈 Training Reward Chart
Reward Episode 10-ep avg
📌 Pan · Zoom · Home
Ready
Frequently Asked Questions

Reinforcement Learning is a machine learning paradigm where an agent learns to make decisions by interacting with its environment. In trading:

  • Agent = Your trading bot
  • Environment = Historical or live market data (price, volume, indicators)
  • Action = Buy, Sell, or Hold
  • Reward = Profit / loss from each trade

The agent explores thousands of trading scenarios during training, learning which actions lead to profit and which cause losses — without you writing a single trading rule.

  1. Make sure MetaTrader 5 is installed and running on your PC.
  2. Select your Symbol (e.g. XAUUSDb, EURUSDb).
  3. Choose Number of Bars — how much historical data to load.
  4. Pick a Timeframe (H1 for hourly, M15 for 15-min bars, etc.).
  5. Set the path to your MT5 terminal64.exe or click "Detect Instances" to auto-find it.
  6. Click "Connect". A green [Connected] status confirms success.

⚠️ If "Detect Instances" shows nothing, check that MT5 is installed in the default location or browse manually.

ParameterMeaningTypical Value
Alpha (α)Learning rate — how quickly the agent adapts to new information. Higher = faster learning but less stable.0.1
Gamma (γ)Discount factor — how much the agent values future rewards vs. immediate profit. Higher = more forward-looking.0.95
Epsilon (ε)Exploration rate — chance the agent picks a random action instead of the "best" known one. Higher = more exploration.0.3
Eps DecayEpsilon shrinks each episode by this multiplier, so the agent explores less over time.0.995
Min EpsFloor for epsilon — ensures the agent never stops exploring entirely.0.01

Rule of thumb: Start with defaults. If the agent's rewards are flat, increase epsilon or learning rate. If it's too erratic, lower them.

Training time depends on:

  • Number of episodes — 500–1000 is typical for H1 data.
  • Bars per episode — 100 bars per episode means each episode simulates 100 trading decisions.
  • Your CPU — training is compute-heavy. Expect 5–30 minutes for 1000 episodes on a modern CPU.

When to stop: Watch the Reward Chart. If the blue reward curve trends upward and the pink 10-episode average stabilizes near the top, training has converged. If the curve is still noisy after 1000 episodes, increase the episode count.

FeatureFREEPRO
SymbolsSingleMulti-symbol portfolio
TimeframesSingleMulti-timeframe analysis
Grid Trading✔ Grid + Martingale
Risk ManagementBasic (Max DD)Advanced (trailing SL, TP, position sizing)
Email Alerts✔ Trade & error notifications
Model PersistenceSave/Load singleVersioned model checkpoints
LoggingConsoleFull CSV export + dashboard

Upgrade at fxmath.com.

  • Blue line = Raw reward per episode. Spiky = the agent is still exploring.
  • Pink dashed line = 10-episode rolling average. Smoother — use this to judge progress.

Good sign: Both lines trend upward over time → the agent is learning profitable patterns.

Bad sign: Flat or declining rewards after many episodes → check parameters or data quality.

Normal: Some variance is expected. The agent tries random actions (epsilon) which sometimes lose money even when the strategy is sound.

  1. After training, click "Save Model" in the Controls panel.
  2. Choose a location and filename (e.g. xauusd_h1_rl.pkl).
  3. To reload later: click "Load Model", select the file, and the agent will resume from where it left off.
  4. Use "Save Settings" to persist your current parameters (symbol, timeframe, alpha, etc.) for quick setup next time.

⚠️ Models are tied to the symbol and timeframe they were trained on. Loading a model trained on EURUSD H1 while connected to XAUUSD M15 will produce poor results.

Error MessageLikely CauseSolution
No connection to MT5MT5 not running or path is wrong.Open MT5, click "Detect Instances" or browse manually.
Symbol not foundSymbol name differs in your broker's Market Watch.Check Market Watch in MT5 and type the exact name (e.g. XAUUSDb).
Insufficient barsNot enough historical data for the requested bars × episodes.Reduce bar count or download more history in MT5.
Trade timeoutBroker rejected the order or server was busy.Check if manual trading is allowed. Increase slippage.
Out of memoryData set too large (too many bars × episodes).Reduce bars per episode or max episodes.

Still stuck? Email fxmathsolution@gmail.com with a screenshot of the log.