SGT Super Trend EA is a paid MT4 and MT5 expert advisor. It trades BUY and SELL flips from an ATR trailing line, only after a candle has closed. A license or trial key is required on a live or demo terminal. The Strategy Tester does not need a key.
Based on SuperTrend STRATEGY by KivancOzbilgic (TradingView), MPL-2.0. Original: https://www.tradingview.com/script/P5Gu6F8k/
Install on MT4
- In MetaTrader 4, choose File → Open Data Folder.
- Open
MQL4/Experts/.
- Copy
SGT_Super_Trend_EA.ex4 into that folder.
- Allow WebRequest (required for the license check on a live or demo account):
- Tools → Options → Expert Advisors
- Tick “Allow WebRequest for listed URL”
- Add
https://investortipster.com and click OK
- In the Navigator, right-click Expert Advisors and choose Refresh, or restart the terminal.
- Open a chart and attach SGT Super Trend EA.
- On the Common tab, allow live trading (and AutoTrading on the toolbar).
- On the Inputs tab, paste your License Key, review the trade settings, then click OK.
Install on MT5
- In MetaTrader 5, choose File → Open Data Folder.
- Open
MQL5/Experts/.
- Copy
SGT_Super_Trend_EA.ex5 into that folder.
- Allow WebRequest (required for the license check on a live or demo account):
- Tools → Options → Expert Advisors
- Tick “Allow WebRequest for listed URL”
- Add
https://investortipster.com and click OK
- In the Navigator, right-click Expert Advisors and choose Refresh, or restart the terminal.
- Open a chart and attach SGT Super Trend EA.
- On the Common tab, allow Algo Trading, and turn Algo Trading on in the toolbar.
- On the Inputs tab, paste 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 Super Trend indicator is free and needs no license.
License and trial
SGT Super Trend EA uses the Investor Tipster license API. The product slug sent to the server is sgt-supertrend-ea. The key is sent only in the X-License-Key header, never in the URL. The expert advisor never prints the full key in the log.
- Buy a lifetime or monthly license (or start a trial, when one is offered) on your Investor Tipster dashboard for this expert advisor.
- Bind your own MT4 or MT5 account number on the dashboard (the API will not bind it automatically).
- Copy the License Key and paste it into the License Key input.
- Add
https://investortipster.com to Tools → Options → Expert Advisors → Allow WebRequest for listed URL. If this URL is missing, the check fails with error 4060 (MT4) or 4014 (MT5), the panel tells you to add the URL, and no new trades are opened.
- A check runs when the expert advisor starts, then about every hour (
check_interval_sec, default 3600). One license is for one account and one terminal at a time. A terminal_id is stored in the terminal data folder as MQL4/Files/it_terminal_id.txt or MQL5/Files/it_terminal_id.txt.
- If the check is not valid, the expert advisor stays attached, opens no new trades (fail closed), shows the server message, and retries after 300 seconds, or after 60 seconds on HTTP 429. Existing positions and their broker stop loss / take profit are left in place.
- When you remove the expert advisor or close the chart or terminal, it asks the server to release the terminal session so you can move to another computer without waiting for the two-hour session window.
- Strategy Tester, including visual mode and optimization, skips the license check so you can backtest with or without a key.
Until a key is entered, the panel shows License: Locked and the message "Enter your License Key". After a check, the panel shows license status (Valid or Locked), type (Trial, Monthly, Lifetime, or Tester), expiry, and the short message from the server.
Inputs (defaults)
Super Trend Settings
| Label |
Default |
Meaning |
| ATR Period |
10 |
Bars used for Average True Range |
| ATR Multiplier |
3.0 |
Distance of the trailing line from the source price |
| Source |
HL2 (default) |
Price used for the mid line: Close, Open, High, Low, HL2, HLC3 or OHLC4 |
| Use Wilder ATR (off = SMA of TR) |
true |
On: Wilder / RMA ATR (same as TradingView atr()). Off: simple average of true range |
Trade Settings
| Label |
Default |
Meaning |
| Lot Size |
0.01 |
Volume of each new order, normalized to the symbol’s lot step |
| Stop Loss (points) |
0 |
Stop loss in broker points; 0 means off |
| Take Profit (points) |
0 |
Take profit in broker points; 0 means off |
| Max Spread (points) |
0 |
Skip a new entry while spread is above this value; 0 means off. The signal stays pending and is retried |
| Magic Number |
20261129 |
Identifies this expert advisor’s orders. It never manages a different magic number |
| Slippage |
30 |
Maximum slippage in points |
| Reverse on Opposite Signal |
true |
On: close the current position and open the other side. Off: close only, and do not open the opposite trade |
Points are the broker’s _Point. On many 2-decimal gold symbols, 100 points equal 1.00 in price.
License
| Label |
Default |
Meaning |
| License Key |
(empty) |
Paste the key from your Investor Tipster dashboard |
Chart Display
| Label |
Default |
Meaning |
| Show Super Trend Line |
true |
Draw the trend line on the chart (the EA trades the same either way) |
| Line Width |
2 |
Thickness of the trend line. The line is broken at each trend flip, so the green and red parts never join |
| Show Buy/Sell Signals |
true |
Draw a BUY or SELL arrow plus a filled label box on the closed candle where the trend flips |
| Show Entry Line |
true |
Draw a thin dotted line at the signal close price, running 12 bars to the right of each signal candle |
| Show Trend Fill |
false |
Shade the area between the close and the line in a soft green or red, drawn behind the candles |
| Bars to Draw (line, signals, fill) |
400 |
How many recent bars get signal marks, entry lines and fill. Lower it on very long charts |
Panel
| Label |
Default |
Meaning |
| Show Panel |
true |
Draw the on-chart information panel |
| Panel Corner |
Bottom Left |
Where the panel sits: Top Left, Top Right, Bottom Left or Bottom Right. The panel is always kept fully inside the chart |
| Panel Offset X |
15 |
Horizontal margin from the chosen corner, in pixels |
| Panel Offset Y |
30 |
Vertical margin from the chosen corner, in pixels |
The panel
The panel is a boxed card in the corner you choose (default: bottom left, 15 px from the left edge and 30 px from the bottom, always kept fully inside the chart). It uses the Investor Tipster dark palette and Segoe UI, and its spacing scales with your screen DPI so the text never overlaps. Click the header to collapse or expand it.
- Header strip: SGT Super Trend EA in gold (Segoe UI Semibold 10) with a smaller muted v1.01 beside it.
- Trend badge: a green UP or red DOWN badge for the confirmed trend.
- Last signal: BUY (green) or SELL (red) on one line, with the date, time and price on a separate line below.
- Account and spread: your account number and the current spread in points.
- Position and P&L: the position of this magic number (BUY, SELL or Flat) and its floating profit or loss.
- License rows: status (Valid or Locked, with the plan type), expiry, and the latest message from the license server.
- Footer: Investor Tipster · investortipster.com · SGT · smartgoldtrade.com
Panel and chart objects are removed when the expert advisor is detached.
On the chart
- Trend line: drawn from objects at the chosen width (2 by default), green in an up-trend and red in a down-trend, and broken at every flip.
- BUY mark: a green arrow with a filled green box below the candle low, white BUY text.
- SELL mark: a red arrow with a filled red box above the candle high, white SELL text.
- Entry line: optional thin dotted line at the signal price, running 12 bars to the right of the signal candle.
- Trend fill: optional, off by default, drawn behind the candles.
- The chart marks are drawn from closed candles only and redrawn for the recent history when the EA starts. They are drawing aids; the order logic below does not depend on them. In the non-visual Strategy Tester the EA skips all drawing.
How orders are handled
-
Signals come from the last closed candle only.
-
A pending signal is kept until the order is sent successfully. A failed send or a blocked spread does not drop the signal; it is retried on later ticks. A later opposite flip replaces the pending signal.
-
The expert advisor closes its own positions before opening a new one, 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 already open on the symbol, the expert advisor does not trade and keeps the pending signal.
-
If the license is not valid, no new trades are opened; a pending signal is still kept so it can be sent after the license is fixed.
-
BUY and SELL boxes sit a clear gap away from their arrow, and they are kept inside the visible price range, below the symbol caption at the top and above the bottom edge, so they are not clipped.
FAQ
Why did it not open a trade at the close?
Check AutoTrading / Algo Trading, the license status on the panel, the max spread filter, and on MT5 whether another position is already open on the symbol. If the send failed, the signal stays pending and will be retried.
Can I run this with another expert advisor on the same chart or symbol?
On MT4 it will ignore the other expert’s tickets. On MT5 it will not trade at all while any other magic or a manual position is open on that symbol.
I see “Add https://investortipster.com …”
Add that exact URL under Tools → Options → Expert Advisors → Allow WebRequest for listed URL, then wait for the next check or reattach the expert advisor.
The Strategy Tester works without a key, but the demo chart does not.
That is expected. The tester skips the license check. A demo or live chart needs a valid trial or paid key and the WebRequest URL.
Does one key work on two computers at once?
No. One license is for one account and one terminal at a time. Close the expert advisor on the first terminal so it can release the session, then start it on the second.
The panel overlaps price.
Change Panel Corner and the offsets, click the header to collapse it, or turn Show Panel off.
The chart looks busy.
Turn off Show Entry Line, Show Trend Fill or Show Super Trend Line, or lower Bars to Draw.
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, 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 |
578.51 |
1.06 |
569 |
32.34% |
947.05 (8.57%) |
0.44 |
0.61 |
-154.25 |
11 (-332.26) |
| M30 |
1 662.70 |
1.29 |
259 |
39.38% |
1 052.38 (9.16%) |
1.23 |
1.58 |
-244.67 |
8 (-338.61) |
| H1 |
709.02 |
1.16 |
132 |
34.09% |
1 038.60 (9.39%) |
0.53 |
0.68 |
-168.80 |
8 (-399.45) |
| H4 |
2 635.58 |
4.36 |
28 |
57.14% |
736.29 (6.01%) |
2.09 |
3.58 |
-111.83 |
4 (-228.03) |
| D1 |
1 478.45 |
26.23 |
4 (low sample) |
75.00% |
1 465.12 (12.96%) |
0.05 |
1.01 |
-58.60 |
1 (-58.60) |
Best tested timeframe: H4. H4 had the highest profit factor among the timeframes with enough trades (4.36 over 28 trades), a maximum equity drawdown of 736.29 USD (6.01%), and the highest Sharpe ratio (2.09) and recovery factor (3.58). D1 showed a profit factor of 26.23, but on only 4 trades, and it had the largest maximum equity drawdown of the five (12.96%), so it is too small a sample to rely on. M15, M30 and H1 had profit factors of 1.06 to 1.29 with maximum equity drawdowns of 8.57% to 9.39%.
Ranking (by profit factor and drawdown, timeframes with at least about 20 trades):
- H4: PF 4.36, 28 trades, max equity DD 6.01%
- M30: PF 1.29, 259 trades, max equity DD 9.16%
- H1: PF 1.16, 132 trades, max equity DD 9.39%
- M15: PF 1.06, 569 trades, max equity DD 8.57%
Low sample (fewer than 20 trades), not ranked: D1 PF 26.23, 4 trades, DD 12.96%
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.
How to backtest in MT4/MT5 Strategy Tester
The Strategy Tester needs no License Key: the license check is skipped there. The same SGT_Super_Trend_EA file runs on a live or demo chart once you enter your key.
MT5
- Press Ctrl+R (View → Strategy Tester).
- In Settings, choose Expert: SGT_Super_Trend_EA (under Experts).
- Set Symbol to XAUUSD (or your broker's gold symbol) and the timeframe, for example H4.
- Set Date to Custom period and pick the start and end dates.
- Set Modelling to Every tick based on real ticks if your broker offers it, otherwise Every tick.
- Set Deposit (for example 10000 USD) and Leverage (for example 1:100). Change the EA inputs on the Inputs tab if needed (default Lot Size 0.01).
- Click Start. When it finishes, open the Backtest (results) tab for the statistics and the Graph tab for the balance and equity curve.
MT4
- Press Ctrl+R (View → Strategy Tester).
- Choose Expert Advisor: SGT_Super_Trend_EA.
- Set Symbol to XAUUSD and Period to H4.
- Tick Use date and set From and To.
- Set Model to Every tick (MT4 has no real-tick mode).
- Click Expert properties to set the initial deposit and the inputs. Leverage comes from the account you are logged in with.
- Click Start, then open the Results, Graph and Report tabs.
Results depend on the broker's data, spread, commission and the modelling mode. Past results, in the tester or live, do not guarantee future results.
Changelog
- 1.01: New panel footer: Investor Tipster · investortipster.com · SGT · smartgoldtrade.com. Signals, inputs and trading logic are unchanged.
- 1.00: First release.
Risk disclaimer
SGT Super Trend EA is a technical trading tool. It does not promise profits or any particular result. Trading forex, gold and other leveraged markets involves a risk of loss, including loss greater than your deposit on some account types. Use a demo account first and never risk money you cannot afford to lose.