Version 2.21
Contents
- What Radix Regent does
- Install and attach
- Account requirements
- Choosing a risk level
- The basket loss limit, worked through
- Broker-side stop loss
- Protection mode
- Trading hours and server time
- Weekend close
- Spread filter, news filters and day selection
- Account stops
- The chart panel, row by row
- All inputs
- Set files
- Testing it in the Strategy Tester
- Troubleshooting and support
1. What Radix Regent does
Radix Regent trades gold with two independent strategies on one chart: one buys, one sells. Each works in baskets.
- A basket starts with one position when that strategy's trend filters allow it.
- If price moves against the basket, the EA can add another position of the same lot size, provided the filters still allow adding. It never multiplies lot sizes.
- The whole basket closes together when price reaches its target, measured from the basket's average entry price.
- The whole basket also closes together if its loss reaches the basket loss limit, which is fixed before the first position opens and scales with your risk level.
- A basket has a fixed maximum number of positions.
| Buying side | Selling side | |
|---|---|---|
| Loss limit, per 0.01 lot | about $18 | about $24 |
| Opens new baskets | 01:00–23:00 server time | 01:00–23:00 server time |
The two sides are independent. They have separate baskets, separate targets, separate loss limits and separate filters. One can be open while the other is flat, or both can be open at once.
2. Install and attach
- Copy or install Radix Regent from the Market. It appears in the Navigator under Expert Advisors → Market.
- Open one gold chart. The symbol name depends on your broker: XAUUSD, GOLD, XAUUSD.m, XAUUSD+ and so on are all fine.
- Set the chart to M15.
- Drag Radix Regent onto the chart. On the Common tab, tick Allow Algo Trading.
- On the Inputs tab, choose a risk level (section 4) or load a set file (section 14).
- Make sure the Algo Trading button in the MT5 toolbar is on (green).
One chart per account. Do not attach it to a second chart on the same account. If you have a reason to run a second copy, give it a different Base magic number.
When it starts, the EA prints its settings to the Experts tab of the Toolbox: risk level, the loss limit, the stop-loss mode, the trading hours, and the weekend close if it is on. Read these lines once after attaching. They are also what support will ask for (section 16).
Keep MT5 running. Targets and loss limits are managed by the running EA. A VPS close to your broker is recommended. If the terminal goes offline, see section 6.
3. Account requirements
- Hedging account. Netting accounts are not supported. Each basket holds several positions that are managed one by one, and a netting account merges them into one.
- Leverage: 1:500 recommended. A full basket on a small account needs the margin. With less leverage a basket may not be able to add its later positions.
- Gold symbol with the broker's usual specification. The EA reads lot step, minimum lot and contract size from the symbol, so it adapts to your broker.
4. Choosing a risk level
Each risk level trades 0.01 lots for every step of balance. The lot size is recalculated from your balance when each basket opens, so it grows as the account grows.
| Risk level | Balance per 0.01 lot | Loss limit, buying side | Loss limit, selling side |
|---|---|---|---|
| Very low | $4,800 | about 0.38% of balance | about 0.50% of balance |
| Low | $2,400 | about 0.75% | about 1.00% |
| Medium (default) | $1,200 | about 1.50% | about 2.00% |
| High | $600 | about 3.00% | about 4.00% |
| Very high | $500 | about 3.60% | about 4.80% |
| Custom | your figure | 18 ÷ your figure × 100 | 24 ÷ your figure × 100 |
The percentages apply when the balance is at or above the step. They are approximate (section 5 explains why).
Small accounts. The lot size is rounded to the nearest 0.01:
- From half the step upwards, the EA trades 0.01 lot.
- From 1.5 × the step, it trades 0.02 lot, and so on.
- Below half the step the size rounds to zero. Turn on Trade broker minimum when size rounds to zero, or the EA will not trade.
On a balance below the step every position is 0.01 lot, so one basket's loss limit is still about $18 (buying) or $24 (selling), and that is a larger share of the account than the table says. For example, at $250 one selling basket that reaches its limit loses about $24, close to 10% of the balance, whatever risk level is selected. Below half the step, every risk level trades the same 0.01 lot, so on a very small account the choice of level changes nothing until the balance grows.
To choose: decide how much one losing basket may cost you as a share of the account, and read the table. A larger level means larger baskets, and larger gains and losses together.
5. The basket loss limit, worked through
The limit is defined per 0.01 lot: about $18 on the buying side, about $24 on the selling side. It scales with the lot size.
Example: Medium on a $12,000 balance.
- Lot size: $12,000 ÷ $1,200 = 10 steps → 0.10 lot per position.
- Buying-side limit: $18 × 10 = about $180, which is 1.5% of $12,000.
- Selling-side limit: $24 × 10 = about $240, which is 2.0% of $12,000.
The EA measures the basket's loss from its floating profit, including swap and commission, and closes every position in the basket at market when the limit is reached.
Why the figures are approximate:
- The basket is closed at market when the limit is reached, so the close can be slightly better or worse than the limit.
- A fast move or a price gap can pass through the limit before the close is filled. The loss is then larger.
- The limit applies to one basket. It does not stop a series of losing baskets. Protection mode (section 7) and the account stops (section 11) address series.
- It is managed by the EA, not by the broker. If the terminal is offline it cannot act. That is what the broker-side stop loss (section 6) is for.
6. Broker-side stop loss
Input: Protective stop loss at the broker.
| Setting | What it does |
|---|---|
| Off (default) | No stop loss at the broker. The EA closes baskets at their loss limit. |
| Per position | Each position gets its own stop, placed beyond the basket loss limit, at a fixed distance from its entry (independent of lot size). |
| Shared level | All positions of a basket share one stop level, just beyond the price where the whole basket reaches its loss limit. The level is set from the first position and moves toward the entry as positions are added. It never moves away. |
In normal operation the EA closes the basket at its loss limit before the broker stop is reached. The broker stop is there for the case where your terminal, VPS or connection goes down while a basket is open.
- Per position never closes a position earlier than the loss limit would, but if the terminal is offline the loss before the stops trigger is larger.
- Shared level keeps that offline loss much closer to the loss limit. On a fast move it can close a basket that the EA would otherwise have held.
If any position of a basket is closed by the broker stop (or by you, manually), the EA ends that basket and closes its remaining positions.
The panel's Stop loss row shows the setting. With Off it reads NONE.
7. Protection mode
When market conditions turn against one side, that side steps back from live trading. It stops opening positions at the broker and keeps following the market on paper, with exactly the same rules, until conditions allow it to trade again. It then returns to real trading by itself; there is nothing to switch back on.
- Each side decides for itself. While one side is in protection mode, the other keeps trading normally.
- Nothing is opened at the broker on that side while it waits.
- The panel shows paused for that side.
- On a real account the state is kept when MT5 or the EA restarts, so a restart does not reset protection mode. In the Strategy Tester every run starts fresh.
A period with no new trades on one side, while the other trades, is usually protection mode.
8. Trading hours and server time
Both sides open new baskets from 01:00 to 23:00 server time, the time shown in Market Watch and in the panel's Server time row. A basket already open is managed at any hour.
The settings were developed on a server at GMT+2 in winter and GMT+3 in summer. On a broker with a different offset the same hours cover a slightly different part of the day. To see your broker's offset, compare the panel's server time with GMT.
9. Weekend close
Input: Close everything this many minutes before the weekend (0 = off, the default).
With a value above 0, the EA closes all of its positions on both sides, in profit or in loss, that many minutes before the symbol's last trading session on Friday ends, and opens nothing until the new week. The Friday close time is read from your broker's symbol specification, so the same number works on any server.
A closed basket counts like any other: a losing one counts toward protection mode.
When it does not close: the EA knows the normal Friday schedule from the symbol specification. On a Friday when the broker closes early or does not open at all, typically a public holiday (Good Friday, around Christmas and New Year, the day after US Thanksgiving), the broker usually does not change the specification. On those days the EA still waits for the normal close time, which never comes, and positions are held over the weekend. If you want nothing held on those weekends, close the positions by hand before the early close, or switch Algo Trading off for that day.
When the input is above 0, the Experts tab prints the Friday close time at startup, for example Weekend close: ON - every Friday from 21:00 .
10. Spread filter, news filters and day selection
These only stop new baskets from opening. An open basket always keeps adding and closing normally, so a filter never leaves a basket without its exit.
- Skip NEW baskets above this spread (default 60 points, 0 = off). The panel's Spread row turns red while the spread is above it.
- News filters, all off by default:
- NFP Fridays (the first Friday of the month)
- FOMC decision days
- 15 December to 15 January The panel's Session row shows when one of them is blocking.
- Days of the week. Monday to Friday on, Saturday and Sunday off by default.
- Baskets per day (0 = unlimited, the default). Limits how many baskets each side may open per day.
- Trade the long side / Trade the short side. Switch a side off to trade only the other. A basket that side already holds is still managed to its target or limit.
11. Account stops
Both close all open positions on both sides when they trigger, not only stop opening, because leaving a basket open with no one managing it would remove its exit.
| Input | Default | What it does |
|---|---|---|
| Stop trading for the day past this equity loss (%) | 0 = off | When equity falls this far below the day's starting balance, closes everything and opens nothing until the next day. |
| Stop permanently past this equity drawdown (%) | 90 | When equity falls this far below the highest balance reached, closes everything and stops trading for good. |
Each side's basket loss limit is the main control. The daily stop is off by default because it closes both sides together, including a basket that is doing fine. Turn it on if you want a daily ceiling for the account whatever it costs. The permanent stop is a last-resort floor.
On a real or demo account the permanent stop survives a restart of MT5 or the EA: it is stored as a terminal global variable named after the account, symbol and magic number, and the Experts tab prints that name when it is set and when it is restored. To clear it on purpose, open Tools → Global Variables (F3), delete that variable, and restart the EA. Setting the permanent-stop input to 0 (off) also clears it.
12. The chart panel, row by row
ACCOUNT
| Row | Shows |
|---|---|
| Balance, Equity | As in the terminal |
| Floating | Equity minus balance (green above zero, red below) |
| Drawdown | Equity below the highest balance, against the permanent-stop setting. Turns yellow at half of it, red at three quarters |
| Today | Only with the daily stop on: today's loss against its setting |
BASKET LONG and BASKET SHORT, one section each:
| State | Rows |
|---|---|
| flat | Opens: the hours new baskets may open |
| open n / max legs | Volume (total lots), Avg entry, Target (price and distance from current price), Next add (price and distance, or at leg cap when the basket is full), Basket P/L, Age |
| paused | Protection mode (section 7); Resumes: after a paper basket wins |
GATES LONG and GATES SHORT: the two trend filters for that side, Gate one and Gate two, each pass (green) or block . A new basket can open only when both pass; further filters, not shown on the panel, also decide each open and each add. With a daily basket limit on, Baskets today.
SESSION
| Row | Shows |
|---|---|
| Server time | The clock the trading hours refer to |
| Spread | Current spread, against the spread filter |
| Session | open , the name of a news filter that is blocking, or trading disabled when Algo Trading is off |
| Halt | none , today (daily stop) or PERMANENT |
RISK
| Row | Shows |
|---|---|
| Level | Risk level and its balance per 0.01 lot |
| Stop loss | per position , shared level , or NONE |
Chart lines (when an open basket exists): the target (green), the average entry (grey) and the price levels where the next positions would be added (gold). With both sides open the lines show the buying basket.
Input On-chart display chooses panel and lines, panel only, lines only, or nothing. Panel font size scales the whole panel.
13. All inputs
| Group | Input | Default |
|---|---|---|
| Risk | Risk level | Medium |
| Custom risk: account balance per 0.01 lot | 600 (used only with Custom) | |
| Hard ceiling on one position, lots | 0 = off | |
| Trade broker minimum when size rounds to zero | false | |
| Safety | Stop trading for the day past this equity loss (%) | 0 = off |
| Stop permanently past this equity drawdown (%) | 90 | |
| Protective stop loss at the broker | Off | |
| Trading | Trade the long side / the short side | true / true |
| Long Fast Exit / Short Fast Exit | false / false | |
| Baskets per day | 0 = unlimited | |
| Skip NEW baskets above this spread (points) | 60 | |
| Open new baskets on Monday … Sunday | Mon–Fri on, Sat–Sun off | |
| Close everything this many minutes before the weekend | 0 = off | |
| News filters | NFP Fridays / FOMC days / Dec 15 – Jan 15 | all false |
| General | Base magic number | 770000 |
| Write entry/exit CSV files | false | |
| Detailed journal output | false | |
| Display | On-chart display, panel font size, three line colours | Panel and lines, 9 |
Fast Exit (separate for long and short, off by default). Off: a basket closes when price is its target distance past the basket's average entry, so the profit it takes grows with every position it adds. On: it closes as soon as the positions' combined profit reaches what the first position alone was aiming for, however many positions are open. Each position was opened at a different price, so each carries a different share of that total, but the total is the first position's target. Swap and commission are not counted, exactly as for the normal target. The chart's target line moves to the Fast Exit level when it is on.
Hard ceiling on one position is not a risk control (the risk level is): once it limits the lot size, positions stop growing with the balance. Leave it at 0 unless your broker will not fill larger orders. Your broker's own maximum lot applies anyway.
14. Set files
Five set files are supplied, one per risk level:
- RadixRegent_VeryLow.set
- RadixRegent_Low.set
- RadixRegent_Medium.set
- RadixRegent_High.set
- RadixRegent_VeryHigh.set
Each differs from the defaults only in Risk level. To load one: open the EA's settings, Inputs tab, Load, choose the file. Then set the broker stop loss, the weekend close and anything else you want, and press OK.
15. Testing it in the Strategy Tester
- Symbol: your broker's gold symbol. Period: M15.
- Modelling: Every tick based on real ticks where your broker provides them. Exits are managed on every tick, so "Open prices only" does not test them.
- Deposit and leverage: the ones you plan to trade with. On a hedging account.
- It does not trade before 2018 in the Strategy Tester. A test that starts earlier stays flat until 1 January 2018.
- Protection mode starts fresh in every test run.
- A test with random execution delay gives slightly different fills each run.
A backtest is not a real trading result.
16. Troubleshooting and support
| Symptom | What to check |
|---|---|
| No trades at all | Algo Trading button on; Allow Algo Trading ticked; panel Session row; on a small balance, Trade broker minimum when size rounds to zero |
| One side never trades | Panel: paused means protection mode (section 7); Gate one / Gate two showing block means its trend filters are not allowing it; the side may be switched off |
| "Not enough money" in the journal | Leverage or deposit too low for a full basket (section 3) |
| Positions merged into one | Netting account. A hedging account is required |
| Baskets opened at unexpected hours | Your broker's server time (section 8) |
| Positions held over a holiday weekend with the weekend close on | Section 9, "When it does not close" |
| Panel shows PERMANENT | The permanent drawdown stop triggered; it stays after a restart until cleared (section 11) |
Support. Send me a message on MQL5 with:
- Broker and server name
- Account type (hedging), leverage, deposit
- The startup lines from the Experts tab (right-click → Copy)
- A screenshot of the chart with the panel
- For a question about a specific trade: its time and ticket number
I will check your installation and settings and add you to the buyer group chat.
Trading gold with leverage involves a high level of risk. Backtest results are not real trading results, and past performance, backtested or live, does not guarantee future results. The basket loss limit caps a single basket under normal execution; it does not prevent a series of losses, and gaps or slippage can exceed it.


![[iVISTscalp5]: XAUUSD. Forecast First. Market Reaction Afterwards// November 16-20, 2026 [iVISTscalp5]: XAUUSD. Forecast First. Market Reaction Afterwards// November 16-20, 2026](https://c.mql5.com/6/1055/splash-preview-781548-1795273856.jpg)