Dual Strike Gold EA
- エキスパート
- William Paul Msomea
- バージョン: 1.2
- アクティベーション: 10
Dual Strike Gold EA is an automated Expert Advisor for MetaTrader 5 designed to trade the XAUUSD symbol on the H1 timeframe.
The advisor operates on a time-based straddle approach. At a user-defined time each trading day, it places a Buy Stop order above the current market price and a Sell Stop order below it. When one of the pending orders is filled, the other is cancelled automatically. This is commonly referred to as One Cancels the Other (OCO) logic. The advisor then manages the open trade until a second user-defined time, at which point any remaining pending orders are cancelled and open positions can optionally be closed.
The advisor includes the following trade management features: a Break Even Stop that moves the stop loss to the entry price once price reaches a defined distance in profit, and a Trailing Stop that follows price at a set distance once a trigger threshold is reached. Both features are optional and operate independently of each other.
Distance calculations for entry, stop loss, and take profit can be set either as a percentage of the current price or as a multiple of the Average True Range indicator. A single input controls which method is used for all calculations.
Risk per trade can be defined as a percentage of account balance or as a fixed monetary amount.
The advisor also includes an optional randomization feature. When enabled, this introduces small variations in the order placement time, entry distance, and lot size. This feature is intended for use on accounts where pattern consistency may be a concern.
The advisor uses a unique magic number to identify its own orders and positions. It can run alongside other advisors on the same account without interference. In the event of a platform restart, the advisor will detect existing orders and positions placed by it and resume management without placing duplicate orders.
During backtesting, the advisor records daily performance relative to a configurable threshold. At the end of a backtest, a summary is printed to the journal showing the total number of days tested, how many days reached the profit threshold, how many reached the loss threshold, and the percentage of each relative to the total.
The source code is written entirely in MQL5 using current language standards. No deprecated functions are used. The code is structured in a modular format and is fully commented.
================================================================================ Input Parameters
General
- Magic Number: unique identifier for orders placed by this advisor
- Deviation Points: maximum allowed slippage in points when closing positions
Schedule
- Place Hour / Place Minute: time at which pending orders are placed each day
- Close Hour / Close Minute: time at which pending orders are cancelled
- Close Positions at Close Time: if enabled, open positions are also closed at the defined close time
Calculation Mode
- Calculation Mode: selects between percent of price and ATR multiple
- ATR Timeframe: timeframe used for the ATR indicator
- ATR Period: period used for the ATR indicator
Distances
- Entry Distance: distance from current price to pending order entry level
- Stop Loss Distance: distance from entry to stop loss
- Take Profit Distance: distance from entry to take profit
Risk
- Risk Mode: percent of balance or fixed monetary amount
- Risk Percent of Balance: percentage of balance to risk per trade
- Risk Fixed Amount: fixed dollar amount to risk per trade
OCO
- Use OCO: when enabled, the opposite pending order is cancelled on fill
Break Even
- Use Break Even: enables the break even stop feature
- Break Even Trigger Distance: profit distance required to activate break even
Trailing Stop
- Use Trailing Stop: enables the trailing stop feature
- Trail Trigger Distance: profit distance required to activate the trailing stop
- Trail Distance: distance the stop loss trails behind price
- Trail Step: minimum movement required before the stop loss is updated
Randomization
- Enable Randomization: enables the randomization feature
- Max Placement Delay in Seconds: maximum random delay added to placement time
- Entry Distance Jitter Percent: maximum random variation applied to entry distance
- Lot Size Jitter Percent: maximum random variation applied to calculated lot size
================================================================================ Notes
No set file is included with this product. Input parameters related to risk must be configured according to the user's account size and trading preferences before the advisor is used on a live account. It is recommended to test the advisor on a demo account before live use.
The advisor is designed for use on XAUUSD on the H1 timeframe. A minimum starting balance of 1000 USD is recommended. Any MetaTrader 5 broker that supports XAUUSD trading can be used.
