Respect the larger trend.
The previous closed M1 candle must finish above the M5 EMA 200 for buys, or below it for sells.
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.
The website does not connect to FXPro, read account data, or place trades. Live execution requires an MT5 terminal running the EA.
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.
The previous closed M1 candle must finish above the M5 EMA 200 for buys, or below it for sells.
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.
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.
Volatility informs the initial stop and later position management. The flow below is a source walkthrough, not a live signal feed.
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.
These are programmed entry filters and management rules. They reduce certain exposures in code but cannot eliminate trading risk or prevent all losses.
Blocks new entries when the loss reaches the configured threshold against the day's stored starting-equity value. Open-position management continues.
Skips a new entry when the current symbol spread is above the configured points limit.
Counts entry deals for the selected symbol and magic number on the server day.
Does not open another position for the same symbol and magic number while one is open.
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.
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.
When favorable movement reaches at least one ATR, the stop may move to the entry price.
Trailing starts after 1.5 ATR of favorable movement and follows at one ATR from the current bid or ask.
Reference values from the attached EA source, version 1.00. This page documents the inputs; it does not change settings in MetaTrader.
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 sourceThese controls are inactive because there is no terminal or secure bridge. No control request will be sent from this page.
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.
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 helpOpen 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.
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.”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.