Trading botv1.4.017 options

HH/LL Structure Bot

Expert Advisor for MetaTrader 5 that reads market structure (higher highs and higher lows, lower highs and lower lows) and trades pullbacks inside it.

Net return
+253.6%
Profit factor
1.63
Max drawdown
25.2%
Trades
231

Backtest on XAUUSD M15 over 82 months, from $500 at 0.5% risk per trade and a 30% drawdown limit. Past results do not promise future returns.

Recommended MT5 setup

Best: XAUUSD · M15

Trades higher-high / lower-low market structure breaks with 2.5R reward and break-even at 1.2R.

Primary chart
XAUUSD M15
Secondary pair
USDJPY M30
Suggested risk
0.5%–1.0%
7-year winning months
52W / 28L

Optimized v1.4.0 defaults built into this EA

BiasTimeframeD1
MaxConsecutiveLosses2 (48h)
StopMultiplier3.0
RiskReward2.5
BreakEvenRR1.2

XAUUSD M15 · $500@0.5% (+253.6%) · $10k@1% (DD 7.3%, PF 1.51). Secondary pair verified on USDJPY M30 (+29.4%, PF 1.46, DD 8.5% at $10k @ 1% (core FX slot)).

Multi-symbol portfolio slot:USDJPY M30 (Magic 71040041)
See full v1.4.0 portfolios

What it does

7 capabilities
  • Trading hours filter in GMT with automatic DST offset refresh, rollover pause, Friday cutoff and MT5 Economic Calendar news blackout
  • Market structure from swing points (HH/HL and LH/LL) with minimum 1.5-ATR impulse leg and 40-bar freshness checks
  • Pullback zone of the last impulse leg, drawn on the chart; stops trading when structure breaks
  • Pin bar, engulfing candle and inside bar confirmation
  • Cost-adjusted break-even, partial take-profit, and rolling spread-spike guard
  • Account-currency OrderCalcProfit risk sizing, margin cap, monthly loss budget, profit lock and drawdown throttle
  • Pre-flight OrderCheck, freeze-level protection and execution circuit breaker

How it works

The bot follows the market structure of the chart: an up trend makes higher highs and higher lows, a down trend lower highs and lower lows. When the structure agrees with the higher-timeframe bias, it marks the pullback zone of the last leg, from the last higher low up to half of the leg, and waits for price to reach it without breaking the higher low. Then it seeks a confirmation in the trend direction: a pin bar, an engulfing candle or an inside bar breakout. The stop goes beyond the last higher low (lower high), the target at a fixed reward to risk, and the position is sized by the risk you choose. The structure zone and the step the bot is at are shown on the chart. The strategy runs in the bot's DLL and works only with an approved FXOpsPro license key.

Parameters & options

Configured directly in MetaTrader 5 Expert Advisor inputs.

17 of 17
ParameterTypeDefaultDescription
MinLotRiskPercent
number4.0When the account is too small for RiskPercent, trade the smallest lot if it loses at most this % of the balance at the stop (4.0 for this bot)
MaxMarginPercent
number18.0Account protection: one trade uses at most this % of the free margin; the lot size is reduced to fit (18 for this bot)
MaxConsecutiveLosses
int2Account protection: pause new entries for LossCooldownHours after this many consecutive losing positions in a row (2 for this bot; 0: off)
LossCooldownHours
int48Account protection: hours to pause new entries after hitting MaxConsecutiveLosses (48 for this bot)
MaxMonthlyLossPercent
number10.0The bot loses at most this % of the month's starting balance in a calendar month: new trades are sized to the loss that is left, then none until the next month (10.0 for this bot; 0: off)
MonthProfitLockPercent
number0.5Month profit lock: after the month's closed result reaches this % of the month's starting balance, new trades are sized to keep MonthProfitKeepPercent of its best closed result (0.5 for this bot; 0: off)
MonthProfitKeepPercent
number50.0Share of the month's best closed result that the month profit lock keeps, in % (50 for this bot; 0: break-even)
DrawdownThrottlePercent
number5.0Multiply RiskPercent by DrawdownThrottleFactor while account equity is this % or more below its peak (5.0 for this bot; 0: off)
UseSessionFilter
booltrueTrading hours: open trades only from SessionStartGmt to SessionEndGmt (on for this bot)
SessionStartGmt
int6Trading hours: window start, hour in GMT (6 for this bot: London pre-open)
SessionEndGmt
int17Trading hours: window end, hour in GMT (17 for this bot: stops before late NY fade)
BiasTimeframe
textD1Timeframe of the bias (D1 for this bot; current: automatic, one step above the chart)
StopMultiplier
number3.0The stop loss is this many times as far from the entry as the level stop; the lot size is smaller, so the money at risk stays RiskPercent (3.0 for this bot)
RiskReward
number2.5Take profit at this many times the stop distance (2.5 for this bot; M15 or M30 chart recommended)
UseZoneTarget
boolfalseThe target is the near edge of the next key zone in the trade direction (false for this bot: fixed RiskReward target)
BreakEvenRR
number1.2Before the target: move the stop to cost-adjusted break-even once the best price since the entry is this many times the open risk in profit (1.2 for this bot; 0: off)
UseCandleExit
boolfalseClose on a reversal candle at a key zone while in profit (false for this bot: lets structure winners run to target or runner trail)

More trading bots

View all trading bots