This manual explains how to install and use OneSet X, how it decides to trade, what the dashboard shows and what every setting does. It applies to version 1.00.
1. What OneSet X is
OneSet X is a moving average cross trend Expert Advisor for MetaTrader 5. It trades the cross of a fast and a slow exponential moving average, waits for one confirmation candle, only trades in the direction of the daily trend and reverses on the opposite cross. The default settings are made for XAUUSD on the M15 chart. OneSet X is free and has no time, account or symbol limits. It does not use grid or martingale.
2. Installation
- In MetaTrader 5, open the Market tab in the Toolbox, find OneSet X and click Download. It installs into Navigator under Expert Advisors, Market.
- Open an XAUUSD chart and set it to M15.
- Drag OneSet X onto the chart. On the Common tab, tick "Allow Algo Trading". On the Inputs tab, check the risk %.
- Make sure the "Algo Trading" button on the toolbar is on. The dashboard appears in the top left corner.
3. Quick start
The built-in defaults are the recommended settings for XAUUSD M15. Most users only need to check three things:
- Risk per trade (default 0.20% of the balance).
- Your broker's gold price digits. On a 2-digit price (for example 2345.67), the default 1000-point stop distance is a 10.00 move. On a 3-digit price (2345.678), change "Stop loss (points)" to 10000 for the same distance.
- Whether you want a hard stop at the broker. By default there is none. See section 6.
4. How a signal becomes a trade
- The fast average (13 EMA) closes above the slow average (50 EMA) for a buy signal, or below it for a sell signal, on a finished candle.
- The EA waits for the next candle to close. This is the confirmation candle. If "Cancel if the cross fails to hold" is true, the signal is dropped when the averages have crossed back by then.
- At the start of the following candle, the EA checks the trend filter, any optional filters you switched on, the protection limits, the spread and your margin. If everything allows it, the trade opens.
The trend filter compares the last closed daily candle with the D1 50 EMA. Above it, only buys are taken. Below it, only sells. When a signal is skipped, the "Last event" row on the dashboard says why, and the same line is written to the Experts tab.
5. How trades are closed
With the default settings, the opposite cross closes the trade and opens a trade the other way, if the filters allow it. If the filters block the new trade, the old one is still closed. You can also use these exits, alone or together:
- A fixed take profit in points (the default 50000 is set very wide on purpose).
- An exit when price touches the slow average.
- A trailing stop (needs "Send stop loss to broker" set to true).
- The adaptive take profit, which learns a target from recent trades.
6. Stop loss and lot size
In risk mode, the lot size is set so that a move equal to the stop distance would cost the chosen % of the balance. Example on a 2-digit gold price with a 100-ounce contract: a balance of 10,000 and 0.20% risk gives 20. A 1000-point move is worth 10 per 0.01 lot, so the EA trades 0.02 lots.
By default, the stop loss is not sent to the broker. It is used only to size the lot, and trades close on the opposite cross. This means price gaps, fast news moves, or the EA being offline can cause a loss larger than the sizing distance. The dashboard shows an orange warning bar while this mode is on. If you prefer a real stop, set "Send stop loss to broker" to true. The same distance then becomes a stop at your broker, and the trailing stop becomes available.
Small accounts: the smallest lot is usually 0.01. With the default settings, 0.01 lot equals 0.20% risk at a balance of about 5,000. Below that, each trade risks more than 0.20%. Turn on "Skip if minimum lot is too risky" if you want those trades skipped.
7. The dashboard
| Row | What it shows |
|---|---|
| Status | What the EA is doing: watching for a cross, confirming, in a trade, paused or stopped. |
| Spread | The current spread in points. Red when it is above your limit. |
| Balance, Equity | The real account balance and equity. |
| Day P&L, Week P&L | Change in equity since the daily reset and since the start of the week. |
| Drawdown | Drawdown from the starting balance, or from the equity peak if trailing is chosen. |
| Fast and slow averages | The values of both averages on the last closed candle. |
| Trend | Whether the fast average is above or below the slow one. |
| HTF trend | Whether the trend filter allows buys only or sells only. |
| Sessions | The session windows in server time, and whether one is open. |
| Extra filters | Which optional filters are switched on. |
| Position, Open P/L | The open trade and its current result. |
| Stop / target | The stop and target in points. "Hidden" means the stop is not sent to the broker. |
| Risk / lots | The risk % in use and the lot size the next trade would use. |
| Trades today | New trades today, against the daily maximum, and the cooldown time if one is running. |
| Losses in a row | The current losing streak, or how many signals are still being skipped after one. |
| Protection | Whether any limit is close or has been reached. |
| Last event | Why the last signal was taken, skipped or cancelled. |
8. Account protection
The protection limits are for live and demo accounts. Daily limits reset at the server hour you choose. The max drawdown and total profit target stop the EA until you clear them with "Clear a max DD or target halt". The starting balance, day and week figures and any stops are saved, so restarting MetaTrader does not reset them. A limit closes only this EA's trades, unless "Limit hit closes all account trades" is true, in which case it closes every position on the account.
9. Prop challenge simulator
The simulator tests OneSet X against prop firm challenge rules in the Strategy Tester. To use it, set "Enable prop challenge simulator" to true. Every other simulator setting already has sensible defaults: a 10,000 account, two phases with 10% and 5% targets, a 10% static maximum drawdown, a 5% daily drawdown and monthly payouts of 50% on the funded stage.
The simulator keeps its own balance, separate from the tester's. When a phase passes, trades are closed and the next phase starts the next day at the full account size. After a fail, it restarts Phase 1 the next day, or stops, depending on your choice. A panel shows progress, drawdown room and payouts during visual tests, and a summary is written to the Journal at the end. While the simulator is on, the live protection limits are not used.
10. Strategy Tester tips
- Use "Every tick based on real ticks" for final tests. "1 minute OHLC" is faster for optimisation.
- If you use the session windows or the Asian range sweep, set the two "Tester" inputs to your broker's GMT offset. The tester cannot read it.
- The news filter has no data in the tester and is skipped there.
- The adaptive take profit starts with no history at the start of every test, so one test never learns from another.
- When optimising, use a fixed lot so results can be compared fairly, then switch back to risk %.
11. Settings reference
Moving Averages
| Setting | Default | What it does |
|---|---|---|
| Fast MA period | 13 | Period of the fast moving average. It must be smaller than the slow period. |
| Fast MA type | EMA | Type of the fast average: SMA, EMA, SMMA or LWMA. |
| Fast MA price | Close | Price the fast average is calculated from. |
| Slow MA period | 50 | Period of the slow moving average. |
| Slow MA type | EMA | Type of the slow average. |
| Slow MA price | Close | Price the slow average is calculated from. |
Entries and Exits
| Setting | Default | What it does |
|---|---|---|
| Allow buy trades | true | Allow buy trades. |
| Allow sell trades | true | Allow sell trades. |
| Cancel if the cross fails to hold | false | When true, the signal is cancelled if the fast average is no longer on the right side of the slow one when the confirmation candle closes. |
| Close and reverse on opposite cross | true | When true, an opposite cross closes the open trade and opens the opposite one. When false, the open trade is left to its stop loss or take profit. |
| Trade opposite to the cross | false | Trades the opposite of the cross: a bullish cross opens a sell. All filters then work on the real trade direction. |
| Exit when price touches slow MA | false | Closes a buy when the bid touches the slow average, and a sell when the ask touches it. Checked on every tick. |
| Slow MA touch buffer (points) | 0 | Extra distance, in points, that price must go past the slow average before the touch exit closes the trade. |
Higher Timeframe Trend Filter
| Setting | Default | What it does |
|---|---|---|
| Use higher timeframe trend filter | true | Only allows buys when the last closed candle of the higher timeframe is above its average, and sells when it is below. |
| Higher timeframe | D1 | Timeframe of the trend filter. |
| HTF MA period | 50 | Period of the trend filter average. |
| HTF MA type | EMA | Type of the trend filter average. |
| HTF MA price | Close | Price the trend filter average is calculated from. |
Sessions (London and New York)
| Setting | Default | What it does |
|---|---|---|
| Use London session window | false | Allows new trades during the London window. If both sessions are off, the EA trades at any hour. |
| London start (London local hour) | 8 | Start of the London window in London local time. Summer time is handled automatically. |
| London end (London local hour) | 11 | End of the London window in London local time. |
| Use New York session window | false | Allows new trades during the New York window. |
| New York start (NY local hour) | 8 | Start of the New York window in New York local time. |
| New York end (NY local hour) | 11 | End of the New York window in New York local time. |
| Tester: broker GMT offset (winter) | 2.0 | Strategy Tester only. Your broker's winter offset from GMT in hours. The tester cannot read the real offset, so the EA uses this value for the session windows and the Asian range. |
| Tester: broker adds 1h in US summer | true | Strategy Tester only. Set true if your broker moves its clock forward one hour during US summer time (most GMT+2/GMT+3 brokers do). |
Asian Range Sweep Filter
| Setting | Default | What it does |
|---|---|---|
| Require Asian range sweep first | false | A buy needs price to have gone below the last Asian session low first, and a sell above its high. |
| Asian range start (GMT hour) | 0 | Start of the Asian session in GMT. |
| Asian range end (GMT hour) | 7 | End of the Asian session in GMT. |
| Sweep lookback (bars) | 60 | How many chart candles back the EA looks for the sweep. |
Other Entry Filters
| Setting | Default | What it does |
|---|---|---|
| Skip when day used most of ADR | false | Skips new trades once today's high-to-low range has used most of the average daily range. |
| ADR used limit (%) | 80.0 | The share of the average daily range that counts as used up. |
| Need a large confirmation candle | false | The confirmation candle's range must be at least ATR x the multiplier below. |
| Large candle: ATR period | 14 | ATR period for the large candle check. |
| Large candle: range >= ATR x this | 1.0 | ATR multiplier for the large candle check. |
| Require RSI to agree | false | Buys need RSI above the middle level, sells need it below. |
| RSI period | 13 | RSI period. |
| RSI price | Close | Price RSI is calculated from. |
| RSI middle level | 50.0 | Middle level for the RSI check. |
| Skip choppy markets (many crosses) | false | Skips new trades when the averages have crossed too many times in the recent window. |
| Choppy check: lookback (bars) | 100 | Number of candles in the choppy market window. |
| Choppy check: max crosses | 4 | Highest number of crosses allowed in the window. |
| Max spread (points, 0 = off) | 0 | No new trade while the spread is wider than this. 0 switches the check off. |
Stop Loss and Take Profit
| Setting | Default | What it does |
|---|---|---|
| Stop and target mode | Fixed points | Fixed points, or a stop based on the average daily range (ADR). |
| Stop loss (points) | 1000 | Stop distance in points. It sizes the lot in risk mode, and it is the broker stop when "Send stop loss to broker" is true. |
| Take profit (points, 0 = none) | 50000 | Take profit in points. 0 means no take profit. The default is very wide, so trades normally close on the opposite cross. |
| ADR period (days) | 21 | Number of days in the average daily range. |
| ADR mode: stop = % of ADR | 30.0 | In ADR mode, the stop distance as a % of the average daily range. |
| ADR mode: target = stop x this | 2.0 | In ADR mode, the take profit as a multiple of the stop distance. |
| Send stop loss to broker | false | When false, the stop is only used to size the lot and the trade has no stop at the broker. When true, it is placed as a real stop. |
| Use trailing stop | false | Moves the stop behind price once the trade is in profit. Works only when "Send stop loss to broker" is true. |
| Trailing start (points profit) | 300 | Profit in points at which trailing starts. |
| Trailing distance (points) | 150 | Distance in points the stop keeps behind price. |
Adaptive Take Profit (learning)
| Setting | Default | What it does |
|---|---|---|
| Learn take profit from past trades | false | Sets the take profit from the average best move of recent trades, measured until price returned to each trade's original stop. The first trade uses the normal take profit. |
| Adaptive TP: trades to average | 10 | Number of recent trades the adaptive take profit averages. |
| Adaptive TP: scan timeframe | M1 | Timeframe used to measure each trade's best move. |
| Adaptive TP: max bars per trade | 50000 | Most candles scanned per trade, to keep it fast. |
| Adaptive TP: minimum (points) | 0 | Lowest adaptive take profit in points. 0 means no minimum. |
| Adaptive TP: maximum (points) | 0 | Highest adaptive take profit in points. 0 means no maximum. |
Lot Size and Risk
| Setting | Default | What it does |
|---|---|---|
| Lot size mode | Risk % of balance | Fixed lot size, or a lot size worked out from risk % and the stop distance. |
| Fixed lot size | 0.01 | Lot size used in fixed mode. |
| Risk per trade (% of balance) | 0.20 | Share of the balance risked over the stop distance, per trade. |
| Maximum lot size (0 = no cap) | 0 | Largest lot size the EA will use. 0 means the broker maximum. |
| Skip if minimum lot is too risky | false | Skips a trade when even the smallest lot would risk more than the risk %. |
| Cut risk while in drawdown | false | Reduces the risk % in a straight line as equity falls below the starting balance. |
| Drawdown where risk hits floor (%) | 8.0 | Drawdown % at which the risk reaches the floor. |
| Risk floor (% of normal risk) | 25.0 | Lowest risk, as a % of the normal risk. 0 stops new trades at that drawdown. |
Account Protection (live)
| Setting | Default | What it does |
|---|---|---|
| Daily loss limit (%, 0 = off) | 0 | Closes trades and pauses until the next daily reset once the day's loss reaches this % of the day-start balance. 0 is off. |
| Daily reset hour (server time) | 0 | Server hour at which the trading day resets. Match it to your prop firm's reset. |
| Max drawdown limit (%, 0 = off) | 0 | Closes trades and stops the EA when the drawdown reaches this %. It stays stopped until you clear it. 0 is off. |
| Drawdown from equity peak | false | Measures drawdown from the highest equity instead of the starting balance. |
| Starting balance (0 = auto) | 0 | Starting balance for drawdown and the total target. 0 records the balance when the EA first starts. |
| Weekly loss limit (%, 0 = off) | 0 | Pauses until next week once the week's loss reaches this %. 0 is off. |
| Daily profit target (%, 0 = off) | 0 | Closes trades and pauses for the day at this daily profit %. 0 is off. |
| Total profit target (%, 0 = off) | 0 | Closes trades and stops the EA once the profit from the starting balance reaches this %. 0 is off. |
| Max new trades per day (0 = off) | 0 | Most new trades per day. 0 is off. |
| Minutes between new trades (0=off) | 0 | Minutes after a trade opens before another can open. 0 is off. |
| Pause after losses in a row (0=off) | 0 | After this many losing trades in a row, the next signals are skipped. 0 is off. |
| Losing streak: signals to skip | 1 | Number of signals skipped after a losing streak. |
| Limit hit closes all account trades | false | When true, a limit closes every position on the account, from any symbol or EA. When false, only this EA's trades. |
| Clear a max DD or target halt | false | Set to true once to clear a max drawdown or total target stop, then set it back to false. |
News Filter (live only)
| Setting | Default | What it does |
|---|---|---|
| Pause around calendar news | false | Pauses new trades around economic calendar news for the symbol's currencies. Live and demo charts only: the calendar has no data in the Strategy Tester. |
| Include high impact news | true | Include high impact news. |
| Include medium impact news | false | Include medium impact news. |
| Include low impact news | false | Include low impact news. |
| Minutes before news | 30 | Minutes before the news when the pause starts. |
| Minutes after news | 30 | Minutes after the news when the pause ends. |
| Close trades during news | false | Also closes this EA's open trade during the news pause. |
Prop Challenge Simulator (tester)
| Setting | Default | What it does |
|---|---|---|
| Enable prop challenge simulator | false | Runs the prop challenge simulator. It is a Strategy Tester tool; while it is on, the live protection limits above are not used. |
| Account size (0 = tester deposit) | 10000 | Simulated account size. 0 uses the tester deposit. |
| Two-phase challenge | true | Two phases before funding. When false, Phase 1 leads straight to the funded stage. |
| Phase 1 profit target (%) | 10.0 | Profit target for Phase 1. |
| Phase 2 profit target (%) | 5.0 | Profit target for Phase 2. |
| Minimum trading days per phase | 0 | Minimum days with a trade before a phase can pass. |
| When the challenge fails | Restart Phase 1 next day | After a fail, restart Phase 1 the next day or stop the EA. |
Simulator: Challenge Drawdown
| Setting | Default | What it does |
|---|---|---|
| Max drawdown type | Static | Static, trailing from the equity peak, trailing from the balance peak, or trailing that locks at the starting balance. |
| Max drawdown (%) | 10.0 | Maximum drawdown during the challenge. |
| Daily drawdown measured from | Start-of-day balance | What daily drawdown is measured from: start-of-day balance, start-of-day equity, the higher of the two, or the highest equity of the day. |
| Daily % of starting balance | true | When true, the daily % is a % of the starting balance. When false, a % of the daily reference. |
| Daily drawdown (%, 0 = off) | 5.0 | Daily drawdown limit. 0 is off. |
| Daily breach fails account | true | When true, breaking the daily limit fails the account. When false, it only stops trading for the day. |
Simulator: Funded Account
| Setting | Default | What it does |
|---|---|---|
| Funded max drawdown type | Static | Maximum drawdown type on the funded stage. |
| Funded max drawdown (%) | 10.0 | Maximum drawdown on the funded stage. |
| Funded daily drawdown (%) | 5.0 | Daily drawdown on the funded stage. |
Simulator: Daily Profit Cap
| Setting | Default | What it does |
|---|---|---|
| Daily profit cap (%, 0 = off) | 0 | Closes trades and waits for the next day at this daily profit. 0 is off. |
Simulator: Payouts
| Setting | Default | What it does |
|---|---|---|
| Simulate payouts (funded only) | true | Simulates payouts on the funded stage. |
| Payout frequency | Monthly | How often payouts are taken. |
| Payout (% of new profit) | 50.0 | Share of the new profit taken at each payout. |
| Minimum profit for payout (%) | 1.0 | Smallest profit, as a % of the account size, needed for a payout. |
| Raise DD floor after 1st payout | false | After the first payout, the drawdown limit cannot go below the starting balance. |
Simulator: Panel
| Setting | Default | What it does |
|---|---|---|
| Show simulator panel | true | Shows the simulator panel in visual tests. |
| Panel X position (pixels) | 360 | Panel position from the left, in pixels. |
| Panel Y position (pixels) | 30 | Panel position from the top, in pixels. |
EA Identity
| Setting | Default | What it does |
|---|---|---|
| Magic number (unique per chart) | 31310001 | Identifies this EA's trades. Use a different number on each chart. |
| Order comment | OneSetX | Comment added to each trade. |
| Max slippage (points) | 20 | Largest price difference accepted when a trade opens or closes. |
Alerts
| Setting | Default | What it does |
|---|---|---|
| Alert when a trade opens | true | Alert when a trade opens. |
| Alert when a trade closes | true | Alert when a trade closes, with the result. |
| Alert when a protection limit hits | true | Alert when a protection limit is reached. |
| Send push notifications | false | Also send alerts to the MetaTrader mobile app. |
| Send email alerts | false | Also send alerts by email (set up email in MetaTrader first). |
Chart Lines
| Setting | Default | What it does |
|---|---|---|
| Draw fast and slow MA lines | true | Draws the fast and slow averages on the chart. |
| Fast MA line colour | Red | Colour of the fast average line. |
| Slow MA line colour | Aqua | Colour of the slow average line. |
| Bars to draw MA lines over | 200 | Number of candles the lines are drawn over. |
| Draw the HTF filter MA line | true | Draws the trend filter average on the chart (when the filter is on). |
| HTF MA line colour | Dark orange | Colour of the trend filter line. |
| HTF MA line style | Dash | Line style of the trend filter line. |
Dashboard Colours
Twelve colour settings for the dashboard and the simulator panel: header, background, the two row colours, border, header text, label text, value text, highlight, profit, loss and warning.
Dashboard
| Setting | Default | What it does |
|---|---|---|
| Show dashboard | true | Shows the dashboard. |
| Dashboard X position (pixels) | 15 | Dashboard position from the left, in pixels. |
| Dashboard Y position (pixels) | 30 | Dashboard position from the top, in pixels. |
| Dashboard refresh interval (ms) | 500 | How often the dashboard redraws, in milliseconds. |
12. Questions and answers
Why did a cross not open a trade?
Look at the "Last event" row or the Experts tab. It names the reason, for example the trend filter, a protection limit or the cooldown.
Why does the trade have no stop loss?
Because "Send stop loss to broker" is false by default. See section 6.
Can I use it on other symbols?
Yes. The defaults were made for XAUUSD M15, so test and adjust the settings, especially the stop distance in points, before using it on anything else.
Can I run it on several charts?
Yes. Give each chart its own magic number.
Does it use martingale or grid?
No. It holds one trade at a time per chart.
Is anything locked in the free version?
No. There is only one version of OneSet X, and every feature is included.
13. Support
Please post questions in the OneSet X product comments or send me a private message on MQL5. When reporting a problem, include your broker, account type, symbol, timeframe and the lines from the Experts tab.
Updates to OneSet X are shaped by community feedback. If you have an idea for a feature or an improvement, post it in the product comments.
14. Other products by the author
If you like OneSet X, my other MetaTrader 5 Expert Advisors are on my seller page: https://www.mql5.com/en/users/aoyekan/seller
- OneSet Gold: a session range breakout EA for XAUUSD with risk-based lots and a prop challenge simulator. https://www.mql5.com/en/market/product/213412
- Peak Formation Matrix: a multi-symbol peak formation dashboard with four built-in strategies. https://www.mql5.com/en/market/product/213663
- Harmonic Overtone Scanner: a multi-symbol harmonic pattern scanner that can trade the reaction at the potential reversal zone. https://www.mql5.com/en/market/product/213697
Trading involves risk. Strategy Tester results do not guarantee future results.


