GoldBoss 1.0 — Four Independent Strategies for Automated Gold Trading on MetaTrader 5

GoldBoss 1.0 — Four Independent Strategies for Automated Gold Trading on MetaTrader 5

6 December 2026, 17:00
Andrey Kozak
0
14
GoldBoss 1.0 — Four Independent Strategies for Automated Gold Trading on MetaTrader 5

A Comprehensive Approach to XAUUSD Trading Based on Price Levels

Gold is one of the most dynamic financial instruments. Its price movements can produce extended impulses, breakouts of key levels, and sharp corrections. Systematic trading of these movements requires more than just entry signals. It also requires accurate level detection, pending order management, and effective position handling.

GoldBoss 1.0 is an Expert Advisor for MetaTrader 5, specifically developed for automated XAUUSD trading. Its algorithm is based on confirmed hourly support and resistance levels, with market entries executed through pending Buy Stop and Sell Stop orders.

The main feature of GoldBoss is its architecture, which combines four independent trading strategies — A, B, C, and D — within a single system. Each strategy has its own parameters, entry detection rules, and position management logic.

This approach makes it possible to use several algorithmic trading methods simultaneously and analyze the performance of each strategy separately.

1. How the Trading System Works

GoldBoss analyzes historical price data on the H1 timeframe and identifies local highs and lows — swing highs and swing lows.

Levels are formed exclusively from closed candles. To confirm a swing level, the algorithm examines the bars to the left and right of the potential high or low. Therefore, a level is not identified immediately: it becomes available only after the required number of candles has closed.

During operation, the Expert Advisor:

  • builds and updates a list of active price levels;

  • removes levels that have been broken by price;

  • excludes outdated levels;

  • identifies the nearest suitable target for a buy or sell;

  • calculates the entry price, Stop Loss, and Take Profit;

  • places pending orders;

  • monitors open positions and manages them using a trailing stop.

An important feature is that the Expert Advisor does not rely on arbitrary signals generated on every candle. Its algorithm focuses on predefined price levels and specific order placement rules relative to those levels.

Why Are Pending Orders Used?

GoldBoss places Buy Stop and Sell Stop orders slightly before the corresponding level, as price approaches the anticipated breakout.

This allows the system to prepare an order in advance rather than waiting until the price has already moved through the entire level.

The distance between the level and the pending order is controlled by separate buy and sell parameters for each strategy.

2. Four Independent Trading Strategies

GoldBoss includes four algorithms. They share the same general concept of level-based trading but differ in how frequently they search for entries and how they manage pending orders.

Strategy A — Multiple Trading Opportunities

Strategy A analyzes every newly closed H1 candle and can place multiple pending orders in the same direction.

Key features:

  • multiple buy and sell orders are allowed;

  • a new order is placed if its entry price is closer to the current market price than the entry prices of existing Strategy A orders in the same direction;

  • a maximum of five open positions is allowed for this strategy;

  • previously placed orders remain active when the target level changes.

Strategy A allows the system to work with multiple price levels rather than being limited to a single order in each direction.

Strategy B — Double Level Confirmation

Strategy B uses additional confirmation conditions before placing an order.

The target level must remain the same during two consecutive checks. If the target changes, no order is placed.

Key features:

  • entry detection on new H1 candles;

  • an additional check at 01:15 server time;

  • trading window from 01:15 to 22:15 server time;

  • a maximum of one pending order in each direction;

  • a two-hour waiting period after a position closes in the same direction;

  • storage of the last 200 levels on which an entry has already been executed.

Outside its trading window, Strategy B pending orders are removed and its open positions are closed at market.

Strategy C — More Frequent Entry Detection

Strategy C checks entry conditions on every new M15 and H1 candle.

Only one pending order per direction is allowed.

If the target level changes, the existing order is removed and a new one is placed, provided all broker-side checks allow the replacement.

An additional condition is that the spread must not exceed $0.80.

Strategy D — Independent Level-Based Trading Logic

Strategy D also analyzes new M15 and H1 candles and uses its own parameters for level detection and trade management.

Like Strategy C, it limits the number of pending orders to one per direction, updates an order when the target level changes, and applies a spread filter of up to $0.80.

However, Strategy D uses different internal settings, allowing it to operate with a distinct configuration of price levels and entry distances.

3. Trade Management and Trailing Stop

Each strategy has its own Stop Loss, Take Profit, Trail Start, and Trail Distance parameters.

When an open position reaches its predefined profit threshold, the trailing stop is activated.

The algorithm calculates the new Stop Loss level relative to the current market price:

  • Bid is used for Buy positions;

  • Ask is used for Sell positions.

Stop Loss is moved only in the direction of reducing risk and securing the trading result. It is never moved in the opposite direction.

The minimum improvement required to modify Stop Loss is $0.10.

Take Profit remains unchanged while the trailing stop is active.

The system therefore combines predefined SL and TP levels with dynamic position management.

It is also important to note that each strategy has its own trailing stop distances. This allows every algorithm to use a different position management configuration.

4. Automatic Trading Condition Checks

GoldBoss performs additional checks before sending trading requests to the broker.

The Expert Advisor monitors:

  • whether automated trading is enabled;

  • whether the trading instrument is available;

  • the broker's trading session schedule;

  • permitted trading directions;

  • minimum and maximum lot volume;

  • volume step requirements;

  • pending order count and total volume restrictions;

  • minimum distances for Stop Loss and Take Profit;

  • Stops Level and Freeze Level restrictions;

  • available free margin.

Free Margin Control

GoldBoss checks margin requirements before placing pending orders.

The combined margin requirement of new and existing pending orders placed by the Expert Advisor must remain within 80% of the available free margin.

If free margin decreases, the Expert Advisor may automatically remove some pending orders. The newest orders are removed first, while older orders are retained as long as the margin requirements allow.

This is an additional order placement control mechanism, not a guarantee against drawdown or losses.

Friday Trading Protection

Thirty minutes before the end of the final Friday trading session, the Expert Advisor removes all its pending orders.

Already open positions are not automatically closed solely because Friday is approaching. They remain under trailing stop management.

5. Trading Hours Filter

GoldBoss includes a dedicated time filter.

The day is divided into eight three-hour blocks. Each block can be individually enabled or disabled in the settings.

During disabled hours, the Expert Advisor does not place new pending orders or modify existing ones. However, pending orders that have already been placed remain active and may still be executed.

Open positions continue to be managed, and protective mechanisms remain operational regardless of the time filter.

This filter uses the local time of the computer. During testing in MetaTrader 5 Strategy Tester, the tester's server time is used.

6. Information Panel and Performance Statistics

GoldBoss features a built-in information panel that allows users to monitor the Expert Advisor directly on the chart.

The panel displays:

  • net profit from closed Expert Advisor trades;

  • today's trading result;

  • results for the last seven days;

  • floating profit or loss from open positions;

  • balance and equity;

  • number of open positions and pending orders;

  • total number of trades;

  • percentage of profitable trades;

  • current trading status;

  • local and server time.

A separate STRATEGY REPORT section displays the performance of each of the four strategies:

  • number of trades;

  • percentage of profitable trades;

  • Profit Factor;

  • net profit.

The panel also includes charts showing profit by strategy, daily profit, and the number of trades over the last 14 days.

Control Individual Strategies Directly from the Chart

Each strategy can be independently enabled or disabled using the ON/OFF buttons.

When a strategy is disabled, it stops searching for new entries and its pending orders are removed. Already open positions continue to be managed by the trailing stop until they are closed.

This makes it convenient to analyze individual algorithms and control the overall trading system without restarting the Expert Advisor.

7. Installation and Usage Recommendations

For proper operation of GoldBoss, several conditions should be taken into account.

1. Use a Hedging account.

The Expert Advisor is designed for MetaTrader 5 Hedging accounts. On Netting accounts, positions from different strategies on the same instrument may be merged into a single position. As a result, separate strategy management and statistics will not correspond to the intended system architecture.

2. Start with the default settings.

During the initial testing stage, it is recommended not to change all parameters at once. First, observe how the four strategies operate using the standard configuration.

3. Pay attention to the FixedLot parameter.

The default trading volume is 0.05 lots. This is a fixed volume for each trade, not a dynamic calculation based on account balance or a percentage of risk.

Before running the Expert Advisor, select an appropriate volume based on your account size, broker's margin requirements, and acceptable account exposure.

4. Check the spread.

Strategies C and D have a spread limit of $0.80. If the spread exceeds this value, new entries from these strategies are not executed.

Broker conditions with competitive spreads and stable order execution are preferable.

5. Check your broker's server time.

Strategy B has its own trading window from 01:15 to 22:15 server time. Therefore, its actual operating schedule depends on the broker's time zone.

6. Test the Expert Advisor before using it on a live account.

It is recommended to begin with MetaTrader 5 Strategy Tester, preferably using visual mode. This allows you to observe pending order placement, trailing stop behavior, target level changes, and the operation of each strategy.

After backtesting, you can use a demo account to check the Expert Advisor under live market conditions and with your specific broker's trading environment.

7. Do not evaluate the system based on just a few trades.

The four strategies may demonstrate different levels of trading activity and performance. For a meaningful evaluation, it is advisable to accumulate a sufficient trading history, examine the statistics of strategies A, B, C, and D separately, and consider the impact of spreads, commissions, and swaps.

8. Main Default Parameters

The external settings allow users to control trading volume, enable or disable strategies, configure time blocks, adjust entry offsets, and set trailing stop distances.

Default entry offsets and trailing stop distances:

Parameter A B C D
EntryOffsetBuy 2.70 4.50 3.90 2.70
EntryOffsetSell 2.40 2.30 2.50 1.50
TrailDistance 1.40 1.50 1.15 1.00

All distances are specified in US dollars of gold price movement. For instruments other than XAU/GOLD, automatic distance recalculation is provided, using 2800 as the reference price.

For the initial evaluation of the system, it is recommended to use the standard parameter set and make adjustments gradually, assessing their impact on trading statistics.

9. Who Is GoldBoss Designed For?

GoldBoss may be of interest to traders who:

  • use MetaTrader 5 and want to automate gold trading;

  • prefer trading algorithms based on price levels;

  • want to compare several independent strategies within one Expert Advisor;

  • value the ability to enable and disable individual trading algorithms;

  • want to monitor the performance of each strategy directly on the chart;

  • prefer to test settings and analyze results before making changes to their trading configuration.

GoldBoss does not require a specific chart timeframe. Its internal algorithm automatically uses H1 and M15 data. The Expert Advisor can be attached to an XAUUSD chart with any timeframe.

Conclusion

GoldBoss 1.0 is more than a single trading algorithm. It is a system of four independent strategies built around a shared approach to level-based trading.

Confirmed H1 levels, pending stop orders, individual strategy settings, dynamic trailing stops, margin control, trading hours filters, and detailed performance statistics form an integrated automated trading system.

Each strategy has its own logic, allowing users to monitor their operation, compare performance, and make decisions about further system configuration based on accumulated trading statistics.

Try GoldBoss 1.0 on MetaTrader 5

If you are interested in automated XAUUSD trading based on price levels, you can explore the Expert Advisor on the official MQL5 Market page.

GoldBoss 1.0 product page:

https://www.mql5.com/en/market/product/214461

Visit the product page, review the description and available materials, download the Expert Advisor, and test it in MetaTrader 5 Strategy Tester or on a demo account.

I welcome your feedback, testing results, and constructive suggestions for the further development of GoldBoss.

GoldBoss 1.0 — Four Independent Strategies. One Coordinated Trading System.