Login Sign Up
XAUUSD3,627.30▼ -0.73% XAGUSD43.015▼ -1.67% EURUSD1.09373 BTCUSD58,795.02▼ -2.30% GBPUSD1.33941▲ 0.94%· Tue 09:00 USDJPY158.673▼ -0.55%· Tue 09:00 US3046,214.3▲ 1.33%· Mon 19:30 US5006,581.8▲ 1.13%· Mon 19:30 GER4025,325.7▼ -0.35%· Thu 09:41 AUDUSD0.69697▲ 0.38%· Tue 09:00 USDCAD1.37411▼ -0.04%· Tue 09:00
Expert Advisor MT4MT5 v1.01

SGT Super Trend EA

MT4 and MT5 Super Trend expert advisor that acts on closed-bar ATR trend flips, with lot, stop loss, take profit, max spread, magic number and a one-account license. $100 lifetime or $20/month.

SGT Super Trend EA on an MT5 gold XAUUSD H4 chart, with the trend line, BUY and SELL boxes, and the Investor Tipster panel showing trend, account, spread, position, P&L and license status

About

SGT Super Trend EA is an Investor Tipster expert advisor based on the open-source TradingView script SuperTrend STRATEGY by KivancOzbilgic (MPL-2.0). It uses the same ATR trailing-line rules as the free SGT Super Trend indicator (default ATR Period 10, ATR Multiplier 3.0, Source HL2, Wilder ATR). A BUY or SELL is acted on only when a closed candle confirms a trend flip.

How it trades:

  • It holds at most one position with its own magic number and never has a buy and a sell open together.
  • It never touches trades from another expert advisor or manual orders. On MT5 it does not trade while another magic number or a manual position is open on the same symbol.
  • If an order fails or the spread is above your limit, the signal stays pending and is retried on later ticks. On MT4, prices are refreshed and normalized before every order.
  • Inputs cover Lot Size (default 0.01), Stop Loss and Take Profit in points, Max Spread (points), Magic Number, Slippage and Reverse on Opposite Signal.

On the chart, the EA draws the trend line, BUY/SELL arrows with filled boxes (kept a clear gap from the arrow and inside the visible price range), and optional entry lines and trend fill.

The Investor Tipster panel shows the product name and version, the trend badge, the last signal with date, time and price, the account number, spread, position, P&L, and the license status, expiry and server message, plus the footer Investor Tipster · investortipster.com · SGT · smartgoldtrade.com. It opens in the bottom-left corner. Use the Panel Corner input (Top Left, Top Right, Bottom Left, Bottom Right) to move it, or click its header to collapse it.

License check: paste your License Key and add https://investortipster.com to Tools > Options > Expert Advisors > Allow WebRequest. The EA checks the license when it starts and about every hour. If the check fails, it opens no new trades. Until a key is entered, the panel shows License: Locked and "Enter your License Key". The Strategy Tester needs no key.

Works on symbols and timeframes your broker offers, including gold (XAUUSD) and forex. This is a technical trading tool and does not guarantee results. Test it on a demo account first.

Inputs (defaults)

  • ATR Period = 10
  • ATR Multiplier = 3.0
  • Source = HL2 (default)
  • Use Wilder ATR (off = SMA of TR) = true
  • Lot Size = 0.01
  • Stop Loss (points) = 0
  • Take Profit (points) = 0
  • Max Spread (points) = 0
  • Magic Number = 20261129
  • Slippage = 30
  • Reverse on Opposite Signal = true
  • License Key = (empty)
  • Show Super Trend Line = true
  • Line Width = 2
  • Show Buy/Sell Signals = true
  • Show Entry Line = true
  • Show Trend Fill = false
  • Bars to Draw (line, signals, fill) = 400
  • Show Panel = true
  • Panel Corner = Bottom Left
  • Panel Offset X = 15
  • Panel Offset Y = 30

Credits

Based on SuperTrend STRATEGY by KivancOzbilgic, MPL-2.0. MetaTrader port © Investor Tipster.
Trading involves risk. An EA follows fixed rules and can lose money. Results are not guaranteed. Test on a demo account or with 0.01 lot first.

Strategy Tester report

TimeframePeriodNet resultProfit factor TradesWonMax equity DDMax balance DD SharpeRecovery factor
M15 2025.11.30 to 2026.11.30 $578.51 1.06 569 32.34% $947.05 (8.57%) $870.09 (7.92%) 0.44 0.61
M30 2025.11.30 to 2026.11.30 $1,662.70 1.29 259 39.38% $1,052.38 (9.16%) $913.98 (8.05%) 1.23 1.58
H1 2025.11.30 to 2026.11.30 $709.02 1.16 132 34.09% $1,038.60 (9.39%) $806.37 (7.36%) 0.53 0.68
H4 Best tested timeframe 2025.11.30 to 2026.11.30 $2,635.58 4.36 28 57.14% $736.29 (6.01%) $302.15 (2.42%) 2.09 3.58
D1 Low sample 2025.11.30 to 2026.11.30 $1,478.45 26.23 4 75.00% $1,465.12 (12.96%) $58.60 (0.54%) 0.05 1.01

XAUUSD H4, 0.01 lot

Period2025.11.30 to 2026.11.30
SymbolXAUUSD
Deposit$10,000
Leverage1:100
Lot size0.01
ModelEvery tick based on real ticks
Modelling quality99%
Net result$2,635.58
Profit factor4.36
Trades28
Won57.14%
Max equity drawdown$736.29 (6.01%)
Max balance drawdown$302.15 (2.42%)
Sharpe ratio2.09
Recovery factor3.58
Largest loss-$111.83
Max consecutive losses4
Balance
Balance graph for XAUUSD H4 backtest of SGT Super Trend EA
Download HTML report

Past results do not guarantee future results. This is a historical Strategy Tester run, not a promise of profit. Trading involves risk.

How to backtest in MT4/MT5 Strategy Tester

  1. Copy the file into the Experts folder
    Download the compiled .ex4 (MT4) or .ex5 (MT5) with the Free Backtest Download buttons above. In MetaTrader choose File → Open Data Folder, then paste the file into MQL4/Experts or MQL5/Experts. In the Navigator, right-click Expert Advisors and choose Refresh.
  2. Open the Strategy Tester
    Press Ctrl+R, or choose View → Strategy Tester.
  3. Pick the EA, symbol, timeframe and dates
    Select SGT Super Trend EA, then your symbol (for example XAUUSD), timeframe and the dates you want to test. Start the test. You can change the inputs and run it as often as you like.

The Strategy Tester does not need a license key. On a live or demo chart SGT Super Trend EA stays License Locked and will not trade until you buy a license and enter your key.

User manual

Install, inputs, panel, FAQ

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

  1. In MetaTrader 4, choose File → Open Data Folder.
  2. Open MQL4/Experts/.
  3. Copy SGT_Super_Trend_EA.ex4 into that folder.
  4. 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
  5. In the Navigator, right-click Expert Advisors and choose Refresh, or restart the terminal.
  6. Open a chart and attach SGT Super Trend EA.
  7. On the Common tab, allow live trading (and AutoTrading on the toolbar).
  8. On the Inputs tab, paste your License Key, review the trade settings, then click OK.

Install on MT5

  1. In MetaTrader 5, choose File → Open Data Folder.
  2. Open MQL5/Experts/.
  3. Copy SGT_Super_Trend_EA.ex5 into that folder.
  4. 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
  5. In the Navigator, right-click Expert Advisors and choose Refresh, or restart the terminal.
  6. Open a chart and attach SGT Super Trend EA.
  7. On the Common tab, allow Algo Trading, and turn Algo Trading on in the toolbar.
  8. 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.

  1. Buy a lifetime or monthly license (or start a trial, when one is offered) on your Investor Tipster dashboard for this expert advisor.
  2. Bind your own MT4 or MT5 account number on the dashboard (the API will not bind it automatically).
  3. Copy the License Key and paste it into the License Key input.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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):

  1. H4: PF 4.36, 28 trades, max equity DD 6.01%
  2. M30: PF 1.29, 259 trades, max equity DD 9.16%
  3. H1: PF 1.16, 132 trades, max equity DD 9.39%
  4. 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

  1. Press Ctrl+R (View → Strategy Tester).
  2. In Settings, choose Expert: SGT_Super_Trend_EA (under Experts).
  3. Set Symbol to XAUUSD (or your broker's gold symbol) and the timeframe, for example H4.
  4. Set Date to Custom period and pick the start and end dates.
  5. Set Modelling to Every tick based on real ticks if your broker offers it, otherwise Every tick.
  6. 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).
  7. Click Start. When it finishes, open the Backtest (results) tab for the statistics and the Graph tab for the balance and equity curve.

MT4

  1. Press Ctrl+R (View → Strategy Tester).
  2. Choose Expert Advisor: SGT_Super_Trend_EA.
  3. Set Symbol to XAUUSD and Period to H4.
  4. Tick Use date and set From and To.
  5. Set Model to Every tick (MT4 has no real-tick mode).
  6. Click Expert properties to set the initial deposit and the inputs. Leverage comes from the account you are logged in with.
  7. 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.

How to install and use

  1. Download the file for your platform
    Download SGT_Super_Trend_EA.ex4 / SGT_Super_Trend_EA.ex5 from this dashboard: .ex4 for MT4, .ex5 for MT5.
  2. Open the MetaTrader data folder
    In MetaTrader choose File → Open Data Folder.
  3. Copy it into MQL4/Experts or MQL5/Experts
    MT4: paste the .ex4 into MQL4/Experts. MT5: paste the .ex5 into MQL5/Experts.
  4. Refresh the Navigator
    In the Navigator window right-click Experts and choose Refresh. SGT Super Trend EA appears in the list.
  5. Allow WebRequest for the license check
    Tools → Options → Expert Advisors: tick 'Allow WebRequest for listed URL' and add https://investortipster.com
  6. Add your account and attach the EA
    Add your trading account number (demo or live) on this dashboard first. One license works on one account and one terminal at a time. Then drag the EA onto a chart, paste your license key into LICENSE_KEY, enable Algo Trading / AutoTrading and click OK.
  7. Moving to another terminal
    Remove the EA from the chart (or close MetaTrader) before starting it on another computer. If it says 'in use elsewhere', wait up to 2 hours or ask support to clear the session.
  8. Backtest and start small
    The Strategy Tester does not need a license key. Test on a demo account or with 0.01 lot first. Check the Experts tab for the license status message.