Ducat v1.30 User Manual
Ducat EA
User Manual
A complete reference guide for configuring and operating the Ducat Expert Advisor on MetaTrader 5. Start with the Quick Start Guide to get live in minutes, then use the Input Parameters and Safety Systems sections as your ongoing reference.
Keep your drawdown limit across restarts โ A new setting lets you lock in your Hard Stop Loss reference balance so it does not reset if the EA is restarted. Previously, restarting Ducat would set a fresh starting point from the current balance, potentially allowing further losses beyond your intended daily or weekly limit. See the Hard Stop Loss section for details.
XAUUSD off by default โ Gold (Slot 1) now ships disabled, the same as USD/CHF. To trade it, turn Slot 1 on in the settings. If you are upgrading from v1.2 with an open Gold position, turn Slot 1 on before attaching the new version so Ducat can pick up where it left off.
Strategy updates for Gold and USD/JPY โ The built-in strategies for these two symbols have been refined based on ongoing research. No action is required โ the updates apply automatically.
More reliable start-up โ Ducat now pauses briefly after starting before placing any new trades, ensuring it has a complete picture of your open positions first. Existing position management is never interrupted.
Quick Start Guide
Follow these steps to have Ducat live and trading in under ten minutes. The strategy is pre-configured โ for most users, the only things you need to set are your lot sizes and broker symbol names if they differ from the defaults.
Step 1 โ Add the Default Symbols to Market Watch
Ducat needs each configured instrument to be available in MetaTrader 5's Market Watch before it can trade them. The five default symbols are:
Open Market Watch (Ctrl+M), right-click anywhere in the list, and choose Show All โ or right-click and search for each symbol individually to add it.
SP500, US500.cash, or SPX500m. The DAX may be listed as DE40 or GER40.cash. Note the exact names your broker uses before proceeding to Step 3.
Step 2 โ Open a Chart and Attach the EA
-
Open any chart in MetaTrader 5 Ducat operates independently of the chart it is attached to โ the chart symbol and timeframe do not affect trading behaviour. An H1 or H4 XAUUSD chart is a practical choice, as it keeps the on-chart grid lines visible for your primary instrument.
-
Drag Ducat onto the chart Find Ducat in the Navigator panel under Expert Advisors and drag it onto the chart, or double-click it. The EA Properties dialog will open at the Inputs tab.
Step 3 โ Configure the Inputs
-
Update symbol names if your broker uses different names In the Inputs tab, update S1_Symbol through S5_Symbol to match your broker's exact Market Watch names. If any slot is not needed, clear its symbol field or set its Enable toggle to false.
-
Set your Initial Lot Sizes Set S1_Lot through S5_Lot to your desired base lot size for each instrument. This is your most important risk decision. Start conservatively โ the defaults are intentionally small and are intended for an account size of up to $10,000. See the Position Sizing section for full guidance.
-
Set a unique Base Magic Number Choose any integer not used by other EAs on your account (e.g. 6000). Ducat assigns magic numbers sequentially from this base, one per symbol slot. If running multiple EAs, space them at least 10 apart.
-
Enable Algorithmic Trading and click OK In the Common tab, ensure "Allow Algorithmic Trading" is checked. Click OK. The smiley face icon should appear in the top-right corner of the chart โ this confirms the EA is running.
-
Verify the control panel The Ducat control panel will appear in the top-left of the chart. All enabled symbols should show a valid status. If any symbol is missing or shows an error, recheck its name against Market Watch.
The Control Panel
When Show Info Panel is enabled, Ducat displays a live overlay in the top-left corner of your chart โ a real-time snapshot of every active symbol without needing to open any other window. Below is an example of what it looks like during live operation.
| Symbol | Status | Steps | Live P&L | Next Grid | Price | TP |
|---|---|---|---|---|---|---|
| XAUUSD | DISABLED | โ | โ | โ | โ | โ |
| US500 | BUY | 1 / 6 | +$136.00 | 5,744.10 | 5,782.30 | 5,846.80 |
| GER40 | BUY | 3 / 5 | โ$41.20 | VSL ARMED | 21,304.5 | 21,588.0 |
| USDJPY | WAIT 18Hr42Min | 1 / 7 | +$82.40 | 152.240 | 154.811 | 155.637 |
| USDCHF | DISABLED | โ | โ | โ | โ | โ |
| Element | Description |
|---|---|
| Title bar | EA name and version, plus a live count of active symbol slots out of the configured maximum. |
| Total Live P&L | Combined unrealised profit or loss across all open positions managed by Ducat, including accrued swap. Updated on every tick. Green when positive, red when negative. |
| Closed P&L | Cumulative realised profit or loss from all trades closed by Ducat since its first initialisation on this account, including swap and commission. Refreshed every 30 seconds. |
| Scale / Hard SL row | Shows the current balance scaling ratio and Hard Stop Loss status. The colour shifts from blue โ orange โ red as the drawdown approaches the limit. |
| Drain button | Top-right toggleable button. When activated, no new grids start โ existing grids run to completion. See the Hard Stop Loss section for Drain Mode details. |
Symbol Row Columns
| Column | Description |
|---|---|
| Symbol | The instrument name. If balance scaling is active and the effective lot differs from the configured lot, the current effective lot appears in brackets. |
| Status | Current operating state of this symbol slot. See the Status Indicators table below. |
| Steps | Number of open positions vs the maximum for this symbol (e.g. 2/5). Badge colour shifts from green โ orange โ red as the grid fills. |
| Live P&L | Unrealised profit or loss for this symbol's open positions only, in account currency. |
| Next Grid | The price at which the next grid position will open. Shows VSL ARMED when the grid is at maximum depth. |
| Price | Current mid-price. Green when price is on the profitable side of the basket's weighted average entry; red when on the losing side. |
| TP | The price at which the virtual take profit fires and all positions in the basket close simultaneously. |
Status Indicators
| Status | Meaning |
|---|---|
| BUY | An active long grid is running on this symbol. Positions are open. |
| SELL | An active short grid is running on this symbol. Positions are open. |
| WAIT Xh Xmin | A grid is active and a position was recently opened. The EA is in cooldown before the next grid level can be added. Time shown is the remaining market-hours wait. |
| ask<=MA(X) / bid>=MA(X) | No grid is open. The EA is monitoring and waiting for entry conditions to be met before starting a new grid. |
| DRAINED | Drain Mode is active. No new grids will start. Any open grid continues normally to completion. |
| VOL PAUSE ~Xh | A volatility protection event occurred. Trading is paused for the duration shown. See the Volatility Protection section. |
| DISABLED | This slot has been disabled in the input settings. |
| DEACTIVATED | The Hard Stop Loss triggered. All trading has ceased. Remove and re-attach the EA to resume. |
Input Parameters
This section documents every user-configurable input in Ducat v1.3. Click any parameter to expand its full description.
An integer that MetaTrader 5 attaches to every order placed by Ducat, allowing it to identify and manage its own trades separately from manual orders or other EAs. Each symbol slot is assigned a sequential magic number from this base: Slot 1 uses the base number exactly, Slot 2 uses base+1, up to Slot 5 at base+4.
When true, the real-time information panel is rendered on the chart. When false, the panel is hidden and no panel objects are created or updated. Disabling the panel has no effect on the EA's trading logic whatsoever.
When turned on, Ducat automatically adjusts your lot sizes up or down in proportion to how your account balance has grown or shrunk since you first set it up. The starting balance is recorded the first time Ducat runs on your account and remembered even if it is restarted.
Example: if you started with $10,000 and set a lot size of 0.01 for Gold, then once the account grows to $12,000 the scaled lot would be 0.012. If it falls to $8,000 the scaled lot would be 0.008. The current live lot for each symbol is shown in brackets next to the symbol name in the panel whenever it differs from the figure you entered.
Note that brokers require lot sizes to be in fixed increments โ for Gold this is typically 0.01, so valid sizes are 0.01, 0.02, 0.03, and so on. A scaled value of 0.012 is not valid, so Ducat rounds down to 0.01. This means on Gold, scaling only produces a real change once the account has grown enough to justify a full step up. On instruments with smaller increments (most forex pairs) the effect is more gradual and responsive.
Resetting the scaling reference balance
To update the reference balance โ for example after significant growth, or to recalibrate after a drawdown โ go to Tools โ Global Variables (F3 in MetaTrader 5), find the entry for your account, and update the value to your desired new starting point. The change takes effect straight away without needing to restart Ducat.
You may want to do this if your balance has grown significantly and you want lot sizes calculated from the new level rather than the original one, or if a drawdown has reduced your balance and you want the scaling to reflect where things stand now rather than chasing an old higher reference.
Sets the maximum loss Ducat is allowed to sustain before shutting down completely. The loss is measured as a percentage of your account balance at the time Ducat was last started. If your account equity falls by this amount or more, Ducat closes every open position across all symbols and stops trading for the rest of the session.
Example: a value of 15.0 means all trading halts if losses reach 15% of the starting balance. On a $10,000 account, the EA shuts down if equity drops below $8,500.
The panel's status bar shows how much of the limit has been used, and the colour shifts from blue to orange to red as you approach it. Setting this to 0 turns the feature off entirely.
To resume after a shutdown, remove Ducat from the chart and attach it again. The reference balance resets to your current balance unless the Keep drawdown limit across restarts setting is on โ see below.
New in v1.3. When turned on, Ducat remembers your original starting balance even if it is restarted mid-session. Without this, restarting the EA โ whether from a platform update, chart reload, or anything else โ sets a new starting point from the current balance, which can allow losses beyond your intended limit to accumulate undetected.
Example: you start the day with $10,000 and a 15% Hard Stop Loss. Your account drops to $9,200 and Ducat restarts. With this setting off, the new reference becomes $9,200 and Ducat trades as if the earlier loss never happened. With this setting on, the original $10,000 reference is remembered and the remaining loss budget carries over correctly.
To start fresh โ for example at the beginning of a new week โ go to Tools โ Global Variables (F3 in MetaTrader 5), find the entry for your account, and delete it. Ducat will record the current balance as the new reference the next time it starts.
Ducat supports up to five symbol slots (S1 through S5). Each slot has three settings you can adjust: whether it is on, the symbol name, and the starting lot size. Everything else โ how the strategy behaves โ is pre-configured and managed by the EA.
| Slot | Default Symbol | Default Lot | Enabled | Instrument |
|---|---|---|---|---|
| S1 | XAUUSD | 0.01 | No | Gold vs US Dollar โ disabled by default in v1.3, enable manually if desired |
| S2 | US500 | 1.00 | Yes | S&P 500 index โ verify name with your broker |
| S3 | GER40 | 0.10 | Yes | German DAX index โ verify name with your broker |
| S4 | USDJPY | 0.06 | Yes | US Dollar vs Japanese Yen |
| S5 | USDCHF | 0.03 | No | US Dollar vs Swiss Franc โ disabled by default, enable manually if desired |
When turned off, this slot is completely ignored โ Ducat will not monitor or trade it, and it shows as DISABLED in the panel. Turning off slots you are not using is recommended.
You can also disable a slot by clearing the symbol name field entirely. Both approaches have the same result.
Note that Gold (Slot 1) and USD/CHF (Slot 5) are both off by default in v1.3. To trade either, turn the corresponding slot on. If you are upgrading from v1.2 with an open position on one of these slots, turn it back on before attaching v1.3 so Ducat can resume managing it.
Enter the exact symbol name as it appears in your broker's Market Watch, including any suffix your broker appends โ for example US500.cash, GER40m, or XAUUSDz.
If the symbol is not found in Market Watch at startup, Ducat will attempt to add it automatically. If it still cannot be found, the slot will be skipped and logged as a failed initialisation โ all other slots continue to operate normally.
The lot size used for the opening position of each grid cycle on this symbol. This is the most important risk parameter you will configure โ it directly determines base exposure on this instrument, and all subsequent grid additions are sized relative to it.
Before setting this, understand that a fully loaded grid represents a meaningfully larger total exposure than this initial lot alone. Refer to the FAQ for guidance on calculating your maximum theoretical exposure per symbol.
If balance scaling is enabled, this value serves as the reference from which scaled lots are calculated. The effective lot in use is always visible in the panel.
Introduced in v1.2. Each symbol slot has an independent maximum spread threshold. When the live spread exceeds the configured limit, both new grid entries and grid additions on that slot are skipped until conditions normalise. Position management โ take profit, stop loss, and emergency closes โ is never blocked by the spread filter.
Sets the maximum spread, measured in points (the instrument's minimum price movement), at which Ducat will open new positions on this symbol. If the live spread exceeds this value at the moment of an intended entry or grid addition, that specific trade is silently skipped โ no order is placed, and no log noise is produced. The EA checks again on the next candle or tick as normal.
The default thresholds are calibrated to typical ECN conditions for each instrument. You may need to widen these slightly if your broker consistently shows higher spreads, particularly during the Asian session or around rollover. Setting a slot's value to 0 disables the filter entirely for that slot.
| Slot | Symbol | Default | Notes |
|---|---|---|---|
| S1 | XAUUSD | 100 pts | Equivalent to $1.00 per oz on a 2-decimal broker |
| S2 | US500 | 100 pts | Typical ECN spread is 30โ60 pts; widens near close |
| S3 | GER40 | 400 pts | DAX spread is structurally wider; 400 is a safe ceiling |
| S4 | USDJPY | 50 pts | Tight on ECN brokers; 50 gives headroom at rollover |
| S5 | USDCHF | 50 pts | Similar profile to USDJPY |
Hard Stop Loss & Drain Mode
The Hard Stop Loss is a safety mechanism that shuts down all trading if your account losses reach a level you have set. It operates independently of individual grid exits and is the final line of defence for your account.
When turned on, Ducat records your account balance the moment it starts as the reference point. It continuously monitors how far your equity has fallen from that point. If the loss reaches the configured percentage, Ducat immediately closes every open position across all symbols and stops trading โ the panel shows a full DEACTIVATED state and no further trades are placed for the rest of the session.
To resume trading, remove Ducat from the chart and attach it again. The reference balance resets to your current balance at that moment โ unless the Keep Drawdown Limit Across Restarts setting is on, in which case the original reference is carried over instead.
Panel Drawdown Colour Coding
| Colour | Drawdown Level | Meaning |
|---|---|---|
| Blue | Below 50% of threshold | Normal operation. No action needed. |
| Orange | 50โ80% of threshold | Elevated. Consider reviewing open grids. |
| Red | Above 80% of threshold | Hard Stop Loss is imminent if the drawdown continues. |
Drain Mode
The Drain button in the top-right corner of the control panel provides a softer alternative to an abrupt shutdown. When activated:
- No new grids will start on any symbol.
- Any grids already open continue to run normally, closing at their virtual take profit or virtual stop loss as usual.
- Once all open grids have closed, the EA becomes fully idle without being deactivated.
- Drain Mode can be toggled off at any time to allow new grids to start again.
Use Drain Mode when you want to wind down gracefully โ before a major scheduled news event, during account maintenance, or when preparing to remove the EA โ without forcing any open positions closed at an arbitrary moment.
Grid State Recovery
If MetaTrader 5 restarts or Ducat is removed and re-attached while positions are open, the EA automatically picks up where it left off. It scans your open positions, reconstructs the grid state, and resumes managing them as normal. No manual action is required.
Volatility Protection
Ducat includes a built-in protection system that monitors each symbol for extreme short-term price moves. This system is always active and cannot be disabled.
| Parameter | Value |
|---|---|
| Detection window | The last 60 minutes of price action |
| Trigger threshold | A move of 5% or more high-to-low within that window |
| Pause duration | 48 market hours (weekends do not count) |
What happens
-
Detection Ducat continuously measures the price range over the last hour for each active symbol. If the range exceeds 5% of the current price, protection is triggered.
-
Emergency close If any positions are open on that symbol, they are closed immediately at market. This takes priority over everything else.
-
Trading paused The symbol is put on hold for 48 market hours. No new positions are opened. A warning label appears on the chart and the panel shows the approximate time remaining.
-
Automatic resumption When 48 market hours have passed, trading resumes automatically. No action is required from you.
The pause is remembered even if Ducat restarts, the chart reloads, or the platform closes โ so protection is never accidentally bypassed by an interruption.
Margin Safety
Ducat includes two independent margin protection levels that operate automatically at all times. Both thresholds are fixed and cannot be configured.
| Level | Threshold | Action |
|---|---|---|
| Warning | 200% | New grid additions are suspended on all symbols until margin recovers above 200%. Existing open positions continue to be managed and will close normally at their take profit or stop loss. |
| Emergency | 75% | All open positions are closed immediately across all symbols. This is a last-resort action that fires regardless of grid state, volatility pause, or any other condition. |
The warning level acts as a soft circuit breaker โ it prevents Ducat from deepening exposure when the account is already under margin stress, buying time for a market recovery or for manual intervention. The emergency level should never be reached during normal operation.
In addition to these account-level checks, Ducat validates free margin individually before placing each trade. If the margin required for a new position would exceed available free margin, that specific trade is skipped.
Chart Lines Reference
When a grid is active on the symbol displayed on the current chart, Ducat draws three price reference lines directly on the chart. These update in real time and are removed when the grid closes.
| Line | Colour | Description |
|---|---|---|
| Next Grid Entry | Orange ยท Solid | The exact price at which the next grid position will be added. Hover over the line to see the grid level number and total levels possible. Disappears once the grid is at maximum depth. |
| Virtual Take Profit | Blue ยท Solid | The price at which all basket positions close for profit simultaneously. Hover to see the target price, current weighted average entry, and the take profit percentage. |
| Virtual Stop Loss | Red ยท Solid | Appears only when the grid is at maximum depth. If price reaches this level, all positions close immediately as a safety exit. Hover to see the exact price and the maximum position count. |
If you want grid lines visible across all five symbols simultaneously, the only way to achieve this is to run five separate instances of Ducat โ one attached to each symbol's chart โ with only a single symbol slot enabled per instance (the one matching the chart it is on). Each instance would need its own unique Base Magic Number range to avoid conflicts. This is purely a display preference; a single instance of Ducat managing all five slots trades and monitors all symbols identically โ the lines for non-active charts simply are not drawn.
Glossary
| Term | Definition |
|---|---|
| Grid | A series of positions opened at staggered price levels in the same direction, managed and exited as a single basket. |
| Grid Depth / Steps | The current number of open positions in an active grid. A depth of 3 means three positions are open out of the maximum allowed for that symbol. |
| Weighted Average Entry (WAP) | The average entry price of all positions in the grid basket, weighted by their individual lot sizes. Represents the blended cost basis of the basket. |
| Virtual Take Profit (VTP) | A profit target monitored in EA logic rather than placed as a broker order. When the total floating profit of the basket reaches the target level, all positions close simultaneously. |
| Virtual Stop Loss (VSL) | A safety exit that activates when the grid has reached its maximum depth and no further positions can be added. If price then moves a further grid-step distance against the basket from the last entry, all positions close immediately to limit the loss. |
| Hard Stop Loss (HSL) | An account-level drawdown limit, entirely separate from the Virtual Stop Loss. When the session equity drawdown percentage reaches the configured threshold, the EA closes all positions across all symbols and deactivates itself for the session. |
| Session Start Balance | The account balance recorded at EA initialisation and used as the reference for Hard Stop Loss drawdown calculations. If PersistHardSLBalance is enabled, this value is saved to a Global Variable and restored on restart rather than being re-recorded from the current balance. |
| Drain Mode | A panel-toggled state that blocks new grids from starting while allowing any currently open grids to run to completion. Used for graceful wind-down without forcing positions closed. |
| Magic Number | A unique integer attached to every order placed by the EA. Allows MetaTrader 5 to distinguish between orders from different EAs or manual trades on the same account. |
| Market Hours | Trading hours excluding weekends. Ducat measures cooldown and volatility pause durations in market hours so timing is consistent regardless of where weekends fall. |
| Cooldown | A minimum waiting period in market hours that must elapse after each grid addition before the next level can fire. Prevents the grid from stacking rapidly during fast one-directional moves. |
| Margin Level | Account equity as a percentage of the margin currently used to support open positions. A margin level of 200% means equity is double the required margin. |
| Balance Scaling | An optional feature that adjusts all lot sizes proportionally as the account balance grows or shrinks from the session start balance. |
Support
All purchases include access to ongoing updates, priority support, and an invite to the Starpoint Trading private community.
Please include your broker name, account type (ECN / STP / market maker), and a brief description of the issue. Screenshots of the EA's Experts log tab in MetaTrader 5 are always helpful for diagnosing initialisation problems.
Starpoint Trading โ Algorithmic systems built for the serious retail trader.