SGT MACD Pro EA is a paid MT4 and MT5 expert advisor (version 1.01). It trades BUY and SELL signals from a closed-candle MACD / signal-line cross. The MACD math follows ChrisMoody's multi-timeframe MACD study (signal = SMA 9). A license or trial key is required on a demo or live chart ($100 lifetime or $20 per month; one license = one account). The Strategy Tester does not need a key; the same file is the free backtest download.
Install on MT4
- In MetaTrader 4, choose File -> Open Data Folder.
- Open
MQL4/Experts/ and copy SGT_MACD_Pro_EA.ex4 into it.
- Allow WebRequest: Tools -> Options -> Expert Advisors -> tick "Allow WebRequest for listed URL" -> add
https://investortipster.com.
- In the Navigator, right-click Expert Advisors and choose Refresh, or restart the terminal.
- Open a chart (for example XAUUSD H1) and attach SGT MACD Pro EA.
- On the Common tab allow live trading, and switch AutoTrading on in the toolbar.
- On the Inputs tab paste your key into Enter your License Key, review the trade settings, then click OK.
Install on MT5
- In MetaTrader 5, choose File -> Open Data Folder.
- Open
MQL5/Experts/ and copy SGT_MACD_Pro_EA.ex5 into it.
- Allow WebRequest: Tools -> Options -> Expert Advisors -> tick "Allow WebRequest for listed URL" -> add
https://investortipster.com.
- In the Navigator, right-click Expert Advisors and choose Refresh, or restart the terminal.
- Open a chart and attach SGT MACD Pro EA.
- On the Common tab allow Algo Trading, and turn Algo Trading on in the toolbar.
- On the Inputs tab paste your key into Enter your License Key, review the trade settings, then click OK.
Price and license
- Lifetime license: $100 (one payment).
- Monthly license: $20 per month.
- One license works on one MetaTrader account (the buyer's own account), on one terminal at a time.
- The SGT MACD Pro indicator is free and needs no license.
License
SGT MACD Pro EA is a paid product. It uses the Investor Tipster license API (product slug sgt-macd-pro-ea). The key is sent only in the X-License-Key header, never in a URL, and it is never printed in full in the log.
- Get your License Key from your Investor Tipster dashboard and bind your own MT4 or MT5 account number there (the API never binds an account by itself).
- Paste the key into the Enter your License Key input.
- Add
https://investortipster.com under Tools -> Options -> Expert Advisors -> Allow WebRequest for listed URL. Without it the check fails with error 4060 (MT4) or 4014 (MT5), the panel says so, and no new trades are opened.
- A check runs when the EA starts and then about every hour. One license is for one account and one terminal at a time. If the check does not return valid (wrong key, expired, other terminal in use, no connection) the EA opens no new trades (existing positions and their stop loss / take profit stay as they are), draws nothing on the chart except the small license panel, and retries after a few minutes.
- Removing the EA or closing the chart tells the server to release the terminal slot.
- The Strategy Tester needs no key: the license check is skipped in the tester. The same
SGT_MACD_Pro_EA file is the free backtest download; on a demo or live chart you enter your key.
The signal rule
BUY: on a closed candle, the MACD line crosses above the signal line. SELL: the MACD line crosses below the signal line. MACD is the fast EMA minus the slow EMA of the close (defaults 12 and 26). The signal line is an SMA of the MACD (default 9), not an EMA, matching ChrisMoody's multi-timeframe MACD study on TradingView.
Entry is the close of the signal candle. Stop Loss is ATR(14) x 1.5 away from the entry, or beyond the recent swing (your choice). Take Profit is the stop distance times the chosen R multiple. Default is 2R (the original default, faithful to the TradingView study). A tested 3R option is also available; the input label reads "3R - tested upgrade (H1 / D1 only; use 2R on H4)". A custom multiple can be typed when Take Profit is set to Custom. Older signals' Entry, Stop Loss and Take Profit lines end at the bar where the stop or target would have been reached. The latest signal's lines stay drawn to the current bar until a new signal appears.
When Use Current Chart Timeframe is off, MACD is calculated on Different Timeframe. Each chart bar is given the values of the last bar of that timeframe that had already closed when the chart bar closed. A signal still appears only on a closed chart candle, with no look-ahead.
How trades are handled
- Signals come from the last closed candle only.
- A signal that cannot be sent (failure, spread above your limit, outside the trading hours window) stays pending and is retried on later ticks. It expires after Signal Valid For (bars) bars, and a newer signal replaces it.
- With Use Signal SL / TP on, the order carries the signal's stop loss and take profit. If price has already moved beyond the stop or the target, the signal is skipped. Stops are widened to the broker's minimum stop distance if needed.
- The EA closes its own position before opening the other side (when Reverse on Opposite Signal is on), holds at most one position, and never buys and sells at the same time.
- It never modifies or closes trades that belong to another magic number or to a manual order. On MT5, if another magic number or a manual position is open on the symbol, it does not trade and keeps the signal until it expires.
- Max Trades Per Day counts orders opened by this EA for the current broker-server day, per symbol and magic number. The counter is kept in the terminal's global variables, so it survives a restart. Default is 0 (off).
- Use Trading Hours limits new entries and reversals to the window you set (broker server time).
- If the license is not valid, no new trades are opened and the chart shows only the small license panel. Existing positions keep their broker-side stop loss and take profit.
How to backtest
The Strategy Tester needs no License Key: the license check is skipped there. The same SGT_MACD_Pro_EA file runs on a live or demo chart once you enter your key.
- Open the Strategy Tester: MT4 View -> Strategy Tester (Ctrl+R); MT5 View -> Strategy Tester (Ctrl+R).
- Choose SGT MACD Pro EA, the symbol (for example XAUUSD) and the timeframe (for example H1).
- Pick the date range. In MT4 use model Every tick (best quality needs history data of the symbol); in MT5 use Every tick based on real ticks if your broker provides them, otherwise Every tick.
- Set the deposit and leverage you want to study. Keep Lot Size small (default 0.01).
- Open the EA's inputs. No license key is needed in the tester. Review the MACD, signal and trade settings. To test the 3R option, set Take Profit (R multiple) to "3R - tested upgrade (H1 / D1 only; use 2R on H4)". If your history is short, check Bars to Analyze.
- Click Start. For a look at the signals on the chart, tick Visual mode (MT4 "Visual mode"; MT5 "Visual"): the BUY / SELL boxes and Entry / SL / TP lines are drawn like on a live chart. Without visual mode the EA skips all drawing to run faster.
- Read the Results, Graph and Report tabs. Change one setting at a time (for example the Take Profit R multiple, the stop multiplier or the other-timeframe option) and compare runs on the same period.
- Spreads, commissions and slippage in the tester differ from real trading. A test shows how the rules behaved on past data; it does not predict future results. Always follow with a demo account.
A 1-year XAUUSD comparison on M15, M30, H1, H4 and D1 (default 2R, plus 3R on H1 / H4 / D1) is in Backtest results by timeframe later in this manual, and the tester reports are in the backtest/ folder of this pack. Best tested timeframe in that test: H1. M15 and M30 are not recommended.
Inputs (defaults)
MACD Settings
| Label |
Default |
Meaning |
| Fast Length |
12 |
Period of the fast EMA used in the MACD (default 12). |
| Slow Length |
26 |
Period of the slow EMA used in the MACD (default 26). |
| Signal Length (SMA) |
9 |
Period of the signal line. The signal is an SMA of the MACD, not an EMA (default 9). |
| Use Current Chart Timeframe |
true |
On (default): MACD is calculated on the chart timeframe. Off: use the timeframe below. |
| Different Timeframe (when above is off) |
H1 |
Timeframe used for the MACD when Use Current Chart Timeframe is off. |
Signals
| Label |
Default |
Meaning |
| Show Buy/Sell Signals (MACD / Signal cross) |
true |
Draw the BUY / SELL arrow with its filled label box on the main chart at each closed-candle MACD / signal cross. |
| Show Entry / SL / TP Lines |
true |
Draw Entry, Stop Loss and Take Profit lines for the latest signals. |
| Signals With Lines |
3 |
How many of the newest signals keep their Entry / SL / TP lines. |
| Stop Loss Based On |
ATR from entry |
ATR from entry: stop = entry minus / plus ATR x multiplier. Beyond recent swing: stop = the lowest low (BUY) or highest high (SELL) of the lookback, minus / plus ATR x multiplier. |
| Stop Loss (ATR multiplier) |
1.5 |
ATR (14) multiplier for the stop distance (default 1.5). |
| Swing Lookback (bars) |
10 |
Bars (including the signal candle) searched for the swing extreme when the stop is based on the swing. |
| Take Profit (R multiple) |
2R - original default |
2R: take profit = stop distance x 2 (the original default). 3R - tested upgrade (H1 / D1 only; use 2R on H4): take profit = stop distance x 3. Custom R multiple: use the value below. |
| Custom R multiple (Custom only) |
2.0 |
Used only when Take Profit is set to Custom. |
Trade Settings
| Label |
Default |
Meaning |
| Lot Size |
0.01 |
Volume of each new order, rounded to the symbol's lot step. |
| Use Signal SL / TP (off = fixed points) |
true |
On: the order uses the signal's ATR / swing stop and its target. Off: the fixed point values below are used. |
| Fixed Stop Loss (points) |
0 |
Stop loss in broker points when Use Signal SL / TP is off. 0 = none. |
| Fixed Take Profit (points) |
0 |
Take profit in broker points when Use Signal SL / TP is off. 0 = none. |
| Max Spread (points, 0 = off) |
0 |
Skip a new entry while the spread is above this value. The signal stays pending and is retried. |
| Magic Number |
20261204 |
Identifies this EA's orders. It never touches other magic numbers or manual trades. |
| Slippage |
30 |
Maximum slippage in points. |
| Reverse on Opposite Signal |
true |
On: close the current position and open the other side. Off: close only, do not open the opposite trade. |
| Signal Valid For (bars) |
3 |
A signal that could not be sent (spread, failure, hours) is dropped after this many bars. |
| Max Trades Per Day (0 = off) |
0 |
Stops opening new trades after this many for the current server day (per symbol and magic number). 0 = no daily cap. |
| Use Trading Hours |
false |
Only open or reverse trades inside the window below. |
| Start Hour (server time) |
8 |
First hour of the window (broker server time, 0-23). |
| End Hour (server time) |
20 |
Hour the window ends (not included). A start later than the end means a window across midnight. |
License
| Label |
Default |
Meaning |
| Enter your License Key |
(empty) |
Paste the key from your Investor Tipster dashboard. |
Chart Display
| Label |
Default |
Meaning |
| Bars to Analyze |
1000 |
How many recent bars are analysed and drawn (minimum 150). |
Panel
| Label |
Default |
Meaning |
| Show Panel |
true |
Draw the on-chart information panel. |
| Panel Corner |
Bottom Left |
Chart corner for the panel. Default Bottom Left. |
| Panel Offset X |
15 |
Horizontal margin from the chosen corner, in pixels at 120 DPI (scaled to your screen). |
| Panel Offset Y |
30 |
Vertical margin from the chosen corner, in pixels at 120 DPI (scaled to your screen). |
The panel
The boxed panel (default Bottom Left, 15 / 30 pixels from the corner, scaled to your screen DPI) shows whether MACD is above or below the signal (and the timeframe if another one is in use), the histogram direction, the last signal with date, time and price, Entry / Stop Loss / Take Profit and status, account number, spread, position, P&L, trades today, license status and expiry, and the server message. Footer: Investor Tipster · investortipster.com · SGT · smartgoldtrade.com
Click the header to collapse it. Panel and chart objects are removed when the EA is detached, the timeframe or symbol changes, or the chart is closed.
FAQ
Why did it not open a trade at the signal?
Check AutoTrading / Algo Trading, the license status in the panel, the max spread filter, the trading hours window, the daily trade limit, and (MT5) whether another position is open on the symbol. The reason is printed in the Experts log.
Does the chart drawing affect trading?
No. The drawings are for review. In the non-visual Strategy Tester the EA skips all drawing.
Does the EA draw the histogram?
No. The MACD histogram is part of the free SGT MACD Pro indicator. The EA draws the signal marks, the Entry / SL / TP lines and the panel.
Is the signal line an EMA?
No. In this study the signal line is an SMA of the MACD (default 9), matching ChrisMoody's multi-timeframe MACD on TradingView.
Does one key work on two computers at once?
No. One license is for one account and one terminal at a time. Remove the EA on the first terminal so it can release the session.
Can I run it with other expert advisors?
Yes. On MT4 it ignores other experts' orders. On MT5 it waits while any other magic number or manual position is open on the same symbol.
Backtest results by timeframe (1 year, XAUUSD, lot 0.01)
XAUUSD, 2025.11.30 to 2026.11.30, MT5 Strategy Tester on MetaQuotes-Demo data, model Every tick based on real ticks (history quality 99% real ticks on every timeframe), deposit 10 000 USD, leverage 1:100, default inputs (Take Profit 2R), lot 0.01. Spread came from the real tick data (no fixed spread, spread filter off).
| TF |
Net profit (USD) |
Profit factor |
Trades |
Win % |
Max equity DD $ (%) |
Sharpe |
Recovery factor |
Largest loss (USD) |
Max consecutive losses (USD) |
| M15 |
-1 395.67 |
0.91 |
1857 |
34.30% |
1 757.41 (17.08%) |
-1.82 |
-0.79 |
-122.82 |
14 (-126.06) |
| M30 |
-963.66 |
0.92 |
931 |
32.76% |
2 037.67 (18.99%) |
-1.34 |
-0.47 |
-136.17 |
14 (-270.51) |
| H1 |
1 084.78 |
1.15 |
468 |
35.68% |
508.38 (4.49%) |
1.46 |
2.13 |
-98.64 |
11 (-246.09) |
| H4 |
738.08 |
1.19 |
122 |
35.25% |
894.68 (7.84%) |
1.08 |
0.82 |
-114.81 |
7 (-348.00) |
| D1 |
791.85 |
1.55 |
21 (thin sample) |
38.10% |
494.41 (4.68%) |
0.88 |
1.60 |
-310.22 |
4 (-303.62) |
Best tested timeframe: H1. H1 had the best risk-adjusted result among the timeframes with enough trades: net profit 1 084.78 USD, profit factor 1.15 over 468 trades, the lowest maximum equity drawdown of those four (508.38 USD, 4.49%), and the highest Sharpe ratio (1.46) and recovery factor (2.13). H4 had a slightly higher profit factor (1.19) but a lower net profit (738.08 USD), fewer trades (122), and a larger maximum equity drawdown (894.68 USD, 7.84%). D1 showed the highest profit factor of the five (1.55) and a net profit of 791.85 USD, but on only 21 trades, so the sample is too thin to treat as the best timeframe. M15 and M30 finished with losses and the largest drawdowns in this test (17.08% and 18.99%). They are not recommended.
Ranking (default 2R, timeframes with at least about 20 trades, by risk-adjusted result):
- H1: PF 1.15, 468 trades, max equity DD 4.49%, net 1 084.78 USD
- H4: PF 1.19, 122 trades, max equity DD 7.84%, net 738.08 USD
- M30: PF 0.92, 931 trades, max equity DD 18.99% (loss in this test; not recommended)
- M15: PF 0.91, 1857 trades, max equity DD 17.08% (loss in this test; not recommended)
Thin sample (21 trades), not ranked as best: D1 PF 1.55, 21 trades, DD 4.68%, net 791.85 USD
3R take-profit option (H1 / D1 intended; H4 for comparison)
The same test was also run with Take Profit set to 3R on H1, H4 and D1. Default remains 2R. The input label reads "3R - tested upgrade (H1 / D1 only; use 2R on H4)".
| TF |
Net profit (USD) |
Profit factor |
Trades |
Win % |
Max equity DD $ (%) |
Sharpe |
Recovery factor |
Largest loss (USD) |
Max consecutive losses (USD) |
| H1 3R |
1 810.72 |
1.24 |
466 |
34.55% |
599.33 (5.28%) |
2.09 |
3.02 |
-98.64 |
11 (-246.09) |
| H4 3R |
1 739.81 |
1.45 |
122 |
35.25% |
734.30 (6.04%) |
2.16 |
2.37 |
-114.81 |
7 (-348.00) |
| D1 3R |
1 225.51 |
1.86 |
21 (thin sample) |
38.10% |
525.09 (4.56%) |
1.17 |
2.33 |
-310.22 |
4 (-303.62) |
On H1 and D1, which is where the 3R option is meant to be used, 3R finished with a higher net profit and profit factor than 2R in this test. On H1 the maximum equity drawdown rose from 508.38 USD (4.49%) to 599.33 USD (5.28%). On D1 the maximum equity drawdown was 525.09 USD (4.56%) versus 494.41 USD (4.68%) on 2R. Over this full year in the tester, H4 3R also finished ahead of H4 2R, but that run was not split into halves. An earlier TradingView simulation had a worse H4 3R result in one half of the year, so the input label still says to use 3R on H1 / D1 and keep 2R on H4.
The tester reports for these runs are in the backtest/ folder of this pack (M15.htm … D1.htm for the default 2R set, and H1_3R.htm, H4_3R.htm, D1_3R.htm for the 3R set), with a short overview in backtest/SUMMARY.md.
These are results of one test on one broker's historical data. Past results, in the tester or live, do not guarantee future results. Spread, commission, swap and execution differ between brokers and accounts. Test on a demo account before trading live.
Risk disclaimer
Trading forex, gold and other leveraged markets involves a risk of loss. This is a technical analysis tool; it does not promise profits or any particular result. Use a demo account first and never risk money you cannot afford to lose.