Mingdao Hedge M15 Time-Zone [Stable Edition] MT5 Source Code

Mingdao Hedge M15 Time-Zone [Stable Edition] MT5 Source Code

Pinned Monthly Featured MT5v1.01

First-order pending entry + two-tier averaging + dual/single-side TP + lock protection + hard stop loss + one-click close-all. Built for two-way pending-order harvesting in ranging pullback markets.

Views 873 Downloads 150 File 31.8 KB Updated 2026-10-14

Details & Usage Instructions

Mingdao Hedge M15 is an MT5 hedge pending-order EA: it places BUY_STOP above Ask and SELL_STOP below Bid, then averages counter-trend on a two-tier spacing scheme after the first order fills.
Built-in dual-side TP, single-side TP, lock protection, hard stop loss and a manual close-all button provide multi-layer control - suited to two-way pending-order harvesting in ranging and pullback markets.

Core Features

1. First-order Pending Entry

Long: BUY_STOP at Ask + FirstStep

Short: SELL_STOP at Bid - FirstStep

No market first order, avoiding slippage at the open

2. Two-tier Averaging Spacing

Orders<= threshold (default 2): use tier-1 spacing (default 200 points) Orders >threshold: auto-switch to tier-2 spacing (default 120 points)

Long and short sides calculated independently, no interference

3. Lot Progression

Grows exponentially by the lot increment ratio (default 1.09)

Lot decimal places adjustable

First lot and open multiplier both independently configurable

4. Dual-side TP + Single-side TP

Dual-side TP: total long+short profit >= threshold (default 4) -> close all

Single-side TP: one side's profit >= threshold (default 50) -> close that side

Precondition: both sides' profit > base value (default 3)

5. Lock Protection

Total floating loss<= lock amount (default -100) ->stop opening

After lock, total profit back above 0 -> auto close all and resume

After lock, floating loss widens to the stop amount (default -300) -> force close all

6. Single-side Hard Stop Loss

Long loss >= StopLoss -> close longs

Short loss >= StopLoss -> close shorts

Default 9999 = disabled; enable as needed

7. Moving Pending Orders

Pending price moves with the market, keeping its distance from current price

Minimum re-price spacing protection (default 10 points)

Keeps pending orders from drifting too far and becoming invalid

8. Manual Close-All Button

Symbol + Close-All button at the top-right of the chart

Click to close all positions + delete all pending orders

Popup notice on success

9. Basic Filters

Allow-long / allow-short independent switches

Time filter (hour level, start/end hour adjustable)

Danger-hour filter (comma separated, e.g. "0,1,2")

Custom order comment

Parameter Overview

Category Parameter Default
Basic Magic Number 123
Basic Initial Lot 0.01
Basic Open Multiplier 1
Basic Pending Spacing 80
Basic Order Comment v:80399766
Averaging Averaging Spacing Switch Orders 2
Averaging Lot Increment Ratio 1.09
Averaging Tier-1 Spacing 200
Averaging Tier-2 Spacing 120
TP Dual-side TP Amount 4
TP Single-side TP Amount 50
TP Base TP Amount 3
SL Hard Stop Loss 9999 (disabled)
Risk Floating-loss Lock Amount -100
Risk Stop Amount -300
Filter Time Filter Off
Filter Start/End Hour 1 / 23
Filter Danger Hours "0"
Display Font Size 9
Suitable Market
Good for ranging, pullback and two-way oscillation markets.
Not for extreme one-way, no-pullback, frequent-gap markets.

Risk Notice
This EA is a pending-order averaging strategy: it keeps averaging while price runs one-way, so drawdown risk is significant.
Set lot size, increment ratio, spacing, lock amount and stop amount sensibly.
Test on demo first. No profit guaranteed; trade at your own risk.

2.jpg

Risk Warning:Resources on this site are for learning, research and technical exchange only, and do not constitute any investment advice. Before running any EA on any account, please do thorough forward-testing on a demo account first; no strategy can guarantee profits.