Supertrend G5 EA – Detailed User Guide for MetaTrader 5

22 June 2026, 04:16
Van Minh Nguyen
0
871

1. Introduction

Supertrend G5 is a fully automated Expert Advisor (EA) for the MetaTrader 5 platform, developed by Van Minh Nguyen.

The EA is designed to automatically identify trend reversals using the Supertrend indicator while combining multiple professional trading filters, including EMA trend confirmation, higher timeframe trend analysis, spread filtering, trading session control, and dynamic risk management.

Although the EA is optimized primarily for XAUUSD on the M5 timeframe, it can also be adapted for Forex pairs (EURUSD, GBPUSD, USDJPY, etc.) and cryptocurrencies (BTCUSD) through proper optimization.

Core Trading Logic

The EA opens positions whenever the Supertrend indicator changes direction.

BUY

  • Supertrend changes from Downtrend to Uptrend.

SELL

  • Supertrend changes from Uptrend to Downtrend.

Additional filters are then applied before executing any trade, ensuring that trades are only opened when market conditions satisfy all selected criteria.

2. Recommended Set Files

The following set files have been optimized and are recommended for most traders.

Supertrend_G5_XAUUSD_M5_Default.set
📥 Download the attached set files below this blog post.

Recommended Configuration

  • Symbol: XAUUSD
  • Timeframe: M5
  • Risk Profile: Conservative
  • Recommended Deposit: $1,000+
  • Trading Frequency: Medium

This is the official recommended configuration for most users.

The parameters are optimized to provide a balanced approach between trade frequency, drawdown, and long-term stability. It is suitable for traders who prefer consistent growth while maintaining controlled risk.

Unless you have experience optimizing Expert Advisors, it is recommended to begin with this set file before making any parameter adjustments.

Tip: Always load the recommended set file before starting live trading.


3. Installation Guide

Installation

  1. Download the EA (.ex5).
  2. Open MetaTrader 5.
  3. Go to File → Open Data Folder.
  4. Navigate to MQL5 → Experts.
  5. Copy the EA into the Experts folder.
  6. Restart MT5 or refresh the Navigator.
  7. Drag the EA onto the chart.
  8. Enable AutoTrading.
  9. Click OK.

Recommended Environment

  • Symbol: XAUUSD
  • Timeframe: M5
  • Minimum Deposit: $1,000
  • Leverage: Up to 1:500
  • Account Type: ECN / Raw Spread
  • VPS: Recommended

4. Input Parameters

4.1 Single Chart Mode

Enable the EA to operate only on one specific chart.

Parameters

  • EnableSingleChartOperation
  • OperatingSymbol
  • OperatingTimeframe

This helps prevent duplicate positions when multiple charts are open.


4.2 Supertrend Settings

Main parameters controlling signal generation.

  • ATR Period
  • ATR Multiplier
  • Lot Size
  • Slippage
  • Stop Loss
  • Take Profit
  • Close Opposite Position

Lower ATR values produce more signals.

Higher ATR multipliers generate fewer but generally stronger signals.


4.3 Trade Direction

Choose which trade directions are allowed.

  • Enable Buy
  • Enable Sell

4.4 Order Management

Maximum trading exposure.

  • Maximum Open Orders
  • Maximum Total Lots

For Netting accounts, the EA automatically limits open positions to one per symbol.


4.5 EMA Trend Filter

The EA can confirm Supertrend signals using EMA trend direction.

Logic

BUY

EMA Short > EMA Long

SELL

EMA Short < EMA Long


4.6 Higher Timeframe Filter

The EA can also verify the larger trend before entering.

Example

BUY only when

Price > EMA200 on Daily timeframe.

SELL only when

Price < EMA200 on Daily timeframe.

This filter helps avoid trading against the primary trend.


4.7 Spread Filter

Optionally prevent entries during periods of high spreads.

If the current spread exceeds the configured maximum, the EA will not open new trades.


4.8 Trading Hours

Limit trading to specific sessions.

Overnight sessions are fully supported.

Example

22:00 → 02:00


4.9 Risk Management

Dynamic lot sizing is available.

Lot size can be calculated automatically based on

  • Account Balance
  • Maximum Risk %
  • Stop Loss Distance

This helps maintain consistent risk across different account sizes.


4.10 Dashboard

Optional real-time monitoring panel showing

  • EA Status
  • Balance
  • Equity
  • Free Margin
  • Current Spread
  • Today's Profit
  • Open Positions
  • Last Trading Signal

4.11 Magic Number

Each EA uses a unique Magic Number to distinguish its trades from manual positions or other Expert Advisors.


5. Dashboard Overview

When enabled, the dashboard displays real-time trading information.

Including

  • EA Status
  • Current Spread
  • Current Lot Size
  • Balance
  • Equity
  • Free Margin
  • Margin Level
  • Today's Profit
  • Buy Orders
  • Sell Orders
  • Latest Signal

Possible EA Status

  • RUNNING
  • HIGH SPREAD
  • OUT OF HOURS
  • MAX LOSS REACHED

6. Account Protection

Maximum Drawdown Protection

Supertrend G5 includes built-in account protection.

Default Maximum Loss

50%

When the account equity falls below the configured threshold

  • All positions are closed.
  • Trading stops automatically.
  • Dashboard displays

MAX LOSS REACHED

This feature helps prevent catastrophic account losses.


7. Best Practices

For the best trading performance, we recommend:

  • Use the official recommended set file.
  • Trade with an ECN or Raw Spread broker.
  • Run the EA on a VPS for 24/7 operation.
  • Avoid changing optimized parameters unnecessarily.
  • Backtest any modifications before live trading.
  • Start with conservative risk settings.

8. Optimization Tips

If you plan to trade instruments other than XAUUSD, optimization is strongly recommended.

The most important parameters to optimize are:

  • ATR Period
  • ATR Multiplier
  • EMA Filter
  • Higher Timeframe Filter
  • Trading Hours
  • Spread Filter

Dashboard settings and Magic Number generally do not affect trading performance.


9. Frequently Asked Questions

Why doesn't the EA open trades?

Possible reasons include:

  • No valid Supertrend signal.
  • Spread is too high.
  • Trading session filter is active.
  • Higher timeframe trend filter blocks the trade.
  • Buy or Sell trading has been disabled.

Can I trade Forex pairs?

Yes.

The EA supports Forex pairs, but parameter optimization is recommended before live trading.


Can I trade BTC?

Yes.

However, BTC has significantly higher volatility than Gold, so dedicated optimization is recommended.


Can I use multiple charts?

Yes.

If you only want the EA to trade one chart, enable Single Chart Operation.


Should I modify the recommended set file?

The default set file has been optimized for general trading conditions.

Unless you have experience optimizing Expert Advisors, it is recommended to start with the official settings before making any adjustments.


10. Troubleshooting

EA does not open trades

  • Verify AutoTrading is enabled.
  • Check Buy/Sell permissions.
  • Confirm trading hours.
  • Check spread filter.
  • Verify the symbol and timeframe.

Dashboard does not appear

Enable Dashboard in the EA inputs.

Not enough money

Reduce lot size or increase account balance.

Maximum Loss Reached

The account protection module has stopped trading after reaching the configured drawdown limit.


11. Conclusion

Supertrend G5 combines the proven Supertrend strategy with multiple professional trading filters and comprehensive risk management tools.

Its flexible configuration, built-in account protection, real-time dashboard, and optimized default settings make it suitable for both beginner and experienced traders.

Final Recommendations

  • Load the official recommended set file before trading.
  • Start on a demo account.
  • Use a VPS for uninterrupted operation.
  • Monitor dashboard information regularly.
  • Optimize settings before trading instruments other than XAUUSD.

Download & Support:

🔗 Product:
https://www.mql5.com/en/market/product/144058

👤 Support:
https://www.mql5.com/en/users/minhnguyen1504

🛒 All Products:
https://www.mql5.com/en/users/minhnguyen1504/seller  

For any questions, installation support, or recommended settings, please feel free to contact me through MQL5 messages.