SOURCE-LED SYSTEM / MT5 EXPERT ADVISOR

A gold scalper
that shows its rules.

KLAN EA BOT is an XAUUSD strategy for MetaTrader 5—built around a closed-bar signal, a higher-timeframe trend filter, and explicit trade limits.

NOT CONNECTEDNo MT5 terminal or website bridge is linked. STATUS / 00

The website does not connect to FXPro, read account data, or place trades. Live execution requires an MT5 terminal running the EA.

FIG. 01RULE ARCHITECTURE
Abstract cyan wireframe around a gold-toned signal core, illustrating the EA's rule-based design
K / 01ILLUSTRATIVE SYSTEM ART
NOT LIVE MARKET DATA
INPUT / CLOSED M1 BAROUTPUT / RULE CHECK
01 / EXECUTIONM1Closed candle
02 / TREND FILTERM5EMA 200
03 / VOLATILITYATR 14M1 stop input
04 / CONNECTIONOFFNo terminal linked
01 SIGNAL DESIGN

Confluence, not a prediction.

Every entry condition is checked on a newly opened M1 bar against the previous closed candle. A setup is valid only when all six rules for one direction agree.

A
DIRECTION / M5

Respect the larger trend.

The previous closed M1 candle must finish above the M5 EMA 200 for buys, or below it for sells.

B
ALIGNMENT / M1

Check momentum alignment.

The candle close must be on the matching side of EMA 9. EMA 9 must be above EMA 21 for buys, or below EMA 21 for sells; the source checks values, not slopes.

C
CONFIRMATION / M1

Require candle and RSI agreement.

A bullish candle with RSI above 55 and below 75 is required for a buy. A bearish candle with RSI below 45 and above 25 is required for a sell.

02 TRADE LIFECYCLE

From check to management.

Volatility informs the initial stop and later position management. The flow below is a source walkthrough, not a live signal feed.

POSITION SIZE / DEFAULT RISK SETTING

1.0% is an input—not a loss guarantee.

The EA estimates a one-lot stop loss with OrderCalcProfit, derives volume from account equity and the configured risk percentage, then rounds volume down to the symbol's lot step. Slippage, gaps, fees, execution, and broker conditions can make actual losses differ.

1.0%
03 RISK CONTROLS

Limits are part of the logic.

These are programmed entry filters and management rules. They reduce certain exposures in code but cannot eliminate trading risk or prevent all losses.

02ENTRY GUARD
80 pts

Maximum spread

Skips a new entry when the current symbol spread is above the configured points limit.

SPREAD / FILTERED
03ENTRY GUARD
03 / day

Entry-deal cap

Counts entry deals for the selected symbol and magic number on the server day.

SERVER DAY / CAPPED
04POSITION RULE
01 max

One matching position

Does not open another position for the same symbol and magic number while one is open.

SYMBOL + MAGIC / CHECKED

i The daily equity snapshot is initialized on first use of that date's stored key; the source does not guarantee it is captured exactly at midnight. The EA blocks new entries at the limit while continuing position management.

04 POSITION MANAGEMENT

Manage the open trade, then look for the next one.

On each tick, the EA first checks positions that match its symbol and magic number. Break-even and trailing are enabled by default and observe the broker's minimum stop distance.

A
Break-even / from 1 ATR

When favorable movement reaches at least one ATR, the stop may move to the entry price.

B
ATR trailing / from 1.5 ATR

Trailing starts after 1.5 ATR of favorable movement and follows at one ATR from the current bid or ask.

MANAGEMENT THRESHOLDSILLUSTRATIVE
ENTRYPosition opened
+1.0 ATRBreak-even may activate
+1.5 ATRTrailing may activate
FAVORABLE PRICE MOVEMENT →NOT MARKET DATA
05 SOURCE PARAMETERS

Defaults, in the open.

Reference values from the attached EA source, version 1.00. This page documents the inputs; it does not change settings in MetaTrader.

SOURCE

Defaults are copied from the supplied MQL5 file. “Points” and minimum lot size are interpreted by the selected broker symbol. Confirm the available instrument name, quote precision, contract settings, and lot limits in your own MT5 terminal.

Get the .mq5 source
06 FXPRO / MT5 SETUP PATH

Live execution starts in the terminal.

You selected live automated trading as the intended deployment. The MT5 desktop terminal must stay running and online on a PC or VPS for ongoing automation. There is no terminal connected yet, so this site remains disconnected and cannot send orders.

CURRENT STATENO TERMINALBridge inactive · no broker data
REMOTE CONTROL / LOCKED

Start and Stop are unavailable until a terminal is linked.

These controls are inactive because there is no terminal or secure bridge. No control request will be sent from this page.

LOCKED / NO TERMINAL

CONTROL POLICY / FUTURE CONNECTION Start will require a separate confirmation before enabling live entries. Stop will first halt new entries while leaving position management active. A subsequent Close EA Positions action will require a separate explicit confirmation before closing this EA's matching symbol/magic-number positions; no positions will close silently as a side effect of Stop. This is the policy for a future bridge, not functionality implemented in the supplied source.

01

Use an FXPro MT5 account

Choose an account specifically for MetaTrader 5, then install the MT5 desktop terminal. FXPro account credentials are platform-specific; a cTrader or FxPro-only account does not become an MT5 account.

FXPro: algo trading and MT5 help
02

Compile and attach the EA

Open the MT5 data folder, copy KLAN_EA_BOT.mq5 into MQL5/Experts, compile it in MetaEditor, and attach the EA to the intended XAUUSD chart. With TradeSymbol blank, the chart symbol is used.

Download the supplied source
03

Test before any live permission

Review symbol settings and test the source in the MT5 Strategy Tester, then consider a demo account before live use. The EA source can submit trades when its terminal and EA trading permissions are enabled; do not enable those permissions until you intend to trade.

This website does not turn on AutoTrading or “Allow live trading.”
07 RISK DISCLOSURE

Automation does not remove risk.

This page describes code, not investment advice or expected results. Leveraged forex and CFD trading can cause rapid losses, including losses greater than an intended risk amount because of slippage, gaps, execution, or broker conditions. No performance history was supplied, and no return is promised. Understand the strategy and test it before considering any live trading.

FXPro responsible-trading information