The Bot
How the Bot Works
A current walkthrough of the live bot loop, runtime setup, and trade flow.
The Runtime Loop
The live bot runs in a repeating loop and refreshes both market state and user settings while it is active.
- 1
Verifies the license
The bot validates the saved license key before trading.
- 2
Loads settings and local secrets
General config comes from settings.json and local MT5 secrets are merged in at runtime.
- 3
Waits for MT5 credentials if needed
If the user has not completed setup yet, the bot stays alive and waits instead of forcing file edits.
- 4
Connects or reconnects to MT5
The bot checks the terminal connection and retries automatically if it drops.
- 5
Polls for command and settings changes
Updates from the dashboard can refresh running state, strategy mode, pairs, risk, and Telegram settings.
- 6
Manages open trades
Breakeven, partial close, trailing logic, timeout close, and pending-order invalidation happen here.
- 7
Runs global safety gates
Weekend, Friday close, session filters, and high-impact news checks are applied before new entries.
- 8
Checks risk limits
Daily loss, peak-equity drawdown, daily trade cap, spread, open-trade cap, and loss streak rules are enforced.
- 9
Builds a signal
The bot picks a strategy automatically or respects the user’s forced strategy mode and then evaluates each pair.
- 10
Applies optional AI and sentiment gates
If enabled, extra filters can block low-quality or contradictory setups before an order is sent.
- 11
Places and tracks the order
The bot executes, logs, and pushes trade/account updates back into the dashboard flow.
Auto Mode vs Forced Strategy Mode
The recommended mode is Auto, where the bot chooses the best strategy for the current market regime. Users can also force a single strategy from the Bot page if their plan allows it.
| Mode | What it does | Best for |
|---|---|---|
| Auto | Chooses strategy by live market regime and pair conditions. | Most users and most live accounts |
| SMC only | Forces order-block and imbalance-style entries. | Users testing that strategy specifically |
| Trend Pullback only | Forces trend continuation style entries. | Strong directional conditions |
| Breakout only | Forces breakout behavior instead of auto-selection. | Users validating breakout setups separately |
⚠ Caution: Seeing the bot do nothing for long periods can be normal. It may be outside session, blocked by risk, waiting for cleaner structure, or skipping weak conditions. That is usually safer than forcing action.
Trade Lifecycle
License valid
-> MT5 credentials available
-> MT5 connection healthy
-> Dashboard settings refreshed
-> Strategy selected (Auto or forced)
-> Filters pass (session / news / spread / risk)
-> Optional AI + sentiment checks pass
-> Order sent to MT5
-> Trade is monitored each cycle:
- partial/breakeven handling
- trailing stop updates
- timeout close
- dashboard + Telegram updatesHow Users Control It
Users do not manage the trading loop manually. They control the bot through the dashboard: Setup or Accounts for MT5 login, Bot for running state and strategy mode, Settings for safety limits, and Dashboard for monitoring live outcomes.
Note: The bot primarily trades during the configured London and New York windows and applies extra protective behavior around Friday close and shutdown events.