VI

Robot Forex MACD

EA that opens trades by MACD: MACD crossing the Signal line, MACD crossing zero, price and MACD divergence, each setup switched on or off separately, with a MACD panel right on the chart.

Robot Forex MT4MT5 GD-8804v1.0 Lifetime 7-day trial 23/11/2026
MACD 12, 26, 9 · H1–MACD (candle 1)3.412Signal2.875Histogram (MACD - Signal)+0.537MACD vs SignalAbove SignalMACD vs zeroAbove 0Signal crossOnZero crossOffDivergenceOffOpen positionBUY 1 · SELL 0Waiting for a MACD signal on H114:00 Opened BUY on H1: MACD crossed above Signal
The EA panel on the MetaTrader chart (sample data, default inputs). MACD values come from the candle that just closed. The panel can be dragged; click the top-right button to collapse it.
GD-8804 1.00 (XAUUSD,H1)
CommonInputs
VariableValue
ab========================================GENERAL SETTINGS
01Magic number (per product code)
01Max spread to open orders (points, 0 = no limit)
abTrading hours (server time), separate ranges with commas
Timeframe
ab========================================ORDER SETTINGS
½Volume (lot)
01Stop Loss (points, 0 = none)
01Take Profit (points, 0 = none)
01Min distance between 2 same-direction orders (points, 0 = no limit)
Close opposite orders on a new signal
ab========================================ORDER LIMITS
01Max total BUY + SELL orders (0 = no limit)
01Max BUY orders (0 = no limit)
01Max SELL orders (0 = no limit)
At most 1 order per candle (of the timeframe)
ab========================================MACD SETTINGS
01EMA nhanh
01Slow EMA
01Signal line period
Applied price
ab========================================ENTRY SCENARIOS
MACD crosses Signal: BUY on cross up, SELL on cross down
Signal cross: BUY only when MACD > 0, SELL when < 0
MACD crosses zero: BUY on cross up, SELL on cross down
Price and MACD divergence
01Divergence: look for the previous low / high within (candles)
Trade direction
ab========================================BREAKEVEN AND TRAILING STOP
Move Stop Loss to breakeven
01When the order is in profit by (points)
01Stop Loss beyond entry price (points, to cover costs)
Trailing Stop: Stop Loss follows price
01Start when the order is in profit by (points)
01Keep Stop Loss away from price (points)
01Minimum step (points)
ab========================================OTHER SETTINGS
Phone notification when orders open / close
LoadSave

How the EA works

The EA reads MACD on closed candles of the entry timeframe (default H1, MACD 12, 26, 9). Three setups are switched on or off separately; whichever setup gives a signal, the EA opens a trade for it, at most one trade per candle.

0BUY: MACD crosses above SignalSELL: crosses downcrosses above zeroMACD (solid line)Signal (dashed line)Histogram = MACD - Signal
MACD rises from below, crosses above Signal (BUY), then crosses above zero. Later MACD turns and crosses below Signal (SELL). The histogram bars flip from negative to positive exactly when MACD passes Signal.
  1. 1MACD crosses Signal

    The default setup. Turn on the "Zero-line filter" to trade only with the trend.

    • BUYMACD crosses above Signal
    • SELLMACD crosses below Signal
  2. 2MACD crosses zero

    Slower signals but less noise, suited to clearly trending markets.

    • BUYMACD goes from negative to positive
    • SELLMACD goes from positive to negative
  3. 3Divergence

    Price and MACD move in opposite directions, a sign that momentum is fading and price may reverse.

    • BUYPrice makes a lower low, MACD makes a higher low (below 0)
    • SELLPrice makes a higher high, MACD makes a lower high (above 0)
  • A low (high) is a candle lower (higher) than 2 candles on each side. The EA confirms a new low or high once 2 candles have closed after it, so divergence trades enter 2 candles after the low or high.
  • If on the same candle one setup says BUY and another says SELL, the EA skips that candle.
  • Stop loss, take profit, break-even, Trailing Stop and order limits are shared by all setups.
MACD crosses Signal

The best-known setup: MACD crossing above Signal means BUY, crossing below means SELL. Turn on the zero-line filter to trade only with the trend.

MACD crosses zero

MACD turning from negative to positive means BUY, from positive to negative means SELL. Slower signals, less noise.

Divergence

Price making a lower low while MACD makes a higher low means BUY; price making a higher high while MACD makes a lower high means SELL. Lows and highs are found automatically within the number of candles you choose.

Closed-candle signals

Every setup is checked on the candle that just closed on the entry timeframe, at most one trade per candle, no signals flickering mid-candle.

Full order management

Stop loss and take profit in points, distance between 2 orders, closing opposite orders, break-even, Trailing Stop, BUY and SELL order limits.

MACD panel on the chart

A draggable panel showing MACD, Signal, histogram, position relative to Signal and zero, active setups and open orders.

Overview

MACD Forex Robot (code GD-8804) is an EA for MetaTrader 4 and MetaTrader 5 that opens trades by the MACD indicator. MACD is the difference between a fast and a slow EMA, paired with a Signal line. It is the most widely used momentum and trend indicator after RSI.

The EA has 3 entry setups, each switched on or off: MACD crossing Signal (default), MACD crossing zero, and divergence between price and MACD. The Signal cross setup also has a zero-line filter: BUY only when MACD is above 0, SELL only when MACD is below 0, to trade with the trend. Signals always come from closed candles, so they never flicker mid-candle.

Default settings are made for gold XAUUSD. On brokers quoting gold with 3 decimals (e.g. 2650.125), 1 gold price unit = 1000 points: a 5000-point stop loss and take profit is 5 units. On brokers quoting gold with 2 decimals, 1 unit = 100 points, so divide the point inputs by 10.

Example with default inputs on H1: the 13:00 candle closes with MACD 3.412 and Signal 2.875, while on the previous candle MACD was still below Signal. MACD has just crossed above Signal, so at 14:00 the EA opens a 0.01 lot BUY with stop loss and take profit 5000 points from the entry price.

The panel on the chart shows MACD, Signal and histogram of the candle that just closed, MACD's position relative to Signal and zero, active setups and open orders. One single file runs a 7-day trial on a demo account and runs live with a license. Every order carries the comment "www.HoangTrong.com" and the product's own magic number.

Changelog

Version 1.023/11/2026

First release of MACD Forex Robot.

  • MACD crosses Signal
  • MACD crosses zero
  • Divergence
  • Closed-candle signals
  • Full order management
  • MACD panel on the chart

FAQ

Is the trial version different from the full version?

No. Each product has a single file. Without a license it runs for 7 days on a demo account. Buy a license for your account ID and it runs on your live account, no new download needed.

What is WebRequest and why does the EA need it?

WebRequest is the permission that lets an EA connect to an address on the internet. HoangTrong.com EAs use it to activate the license, then check themselves offline. See how to enable WebRequest.

How do I activate the license?

Buy a license for the correct MetaTrader account ID, then click Activation in the EA. You don't need to enter or store any key. After reinstalling, just activate again.

What if I want to use the EA on another account ID?

A license is permanently tied to the account ID it was bought for. To use the EA on another ID, buy an extra ID right on the product page: if you already own the license, each extra ID costs only 100,000 VND.

Multi-account licenses

Extra IDs only 100,000 VND/ID

Each license includes 1 account ID. Each extra ID is only 100,000 VND, for both retail and COMBO prices, valid forever.

  1. What is an account ID?It's your MT4/MT5 login number, shown in MetaTrader and in the email the broker sends when you open the account.
  2. Buy several IDs at onceEnter IDs separated by commas, for example 12345678, 87654321. Up to 20 IDs per order.
  3. Add IDs laterOnce you have a license, come back to this page, enter the new ID and click Buy a license. You're only charged 100,000 VND per ID, not the license price again.
Buying extra IDs: sign in firstSign in with the website account you bought the license with to get the 100,000 VND per ID price. With a different website account, the system cannot see your license and charges the full license price.
Example1 ID3 ID
Retail price500,000 VND700,000 VND
COMBO price5,000,000 VND5,200,000 VND
Add IDs later100,000 VND per ID (signed in)

Besides MACD Forex Robot

Other products from HoangTrong.com

View all products
GD-8801Indicator-basedMT4MT5

RSI Overbought Oversold Forex Robot

The EA opens BUY and SELL orders on RSI signals in the overbought and oversold zones, with built-in stop loss, take profit, break-even and Trailing Stop.

  • 3 RSI entry scenarios, each can be switched on or off
  • Stop loss, take profit, break-even and Trailing Stop
  • Limits on order count, trading hours, spread, 1 order per candle
Retail price500,000 VND
Details
GD-8805Indicator-basedMT4MT5

Multi-Timeframe RSI Forex Robot

EA opens orders on RSI overbought and oversold signals, filters signals with the RSI of 5 timeframes switched on or off separately, multi-timeframe RSI table right on the chart.

  • 3 RSI entry scenarios, same as GD-8801
  • 5 RSI filter timeframes, each with its own inputs and on/off
  • Multi-timeframe RSI table on the chart, unused filters clearly marked
Retail price500,000 VND
Details
GD-8802Indicator-basedMT4MT5

MA Crossover Forex Robot

The EA opens BUY and SELL orders when the fast MA crosses the slow MA, with built-in stop loss, take profit, break-even and Trailing Stop.

  • BUY when the fast MA crosses up, SELL when it crosses down
  • Separate period and MA type for each line
  • Stop loss, take profit, break-even and Trailing Stop
Retail price500,000 VND
Details

Need a different feature?

Order a custom EA built on your strategy, priced per feature.