AI Supertrend Gold Trader
- 专家
- 版本: 1.0
A disciplined trend follower that turns Supertrend flips into clean, rule based gold trades.
How it works
The EA calculates Supertrend internally from ATR on the signal timeframe (H1 by default), so no external indicator files are needed.
A trade is considered only when Supertrend changes direction on a closed bar.
A two stage filter then checks the trend: a bullish flip must close above the EMA 200 and a bearish flip below it. An optional ADX filter can require a minimum trend strength.
The stop loss is placed beyond the Supertrend line with a small ATR buffer, or at a fixed ATR multiple if you prefer. The take profit is a multiple of the stop distance.
Open trades are protected with an ATR based break-even step and an ATR trailing stop.
Key features
- Internal Supertrend calculation, no custom indicators
- EMA 200 trend filter and optional ADX strength filter
- Stop loss beyond the Supertrend line or by ATR multiple
- Take profit by reward ratio, break-even and ATR trailing stop
- Risk based lot size with a maximum lot cap and free margin check
- One position at a time, no grid, no martingale, no averaging
- Every trade is opened with SL and TP
- Small on-chart status panel
Recommended
XAUUSD on any chart timeframe with the H1 signal timeframe. It also works on major Forex pairs and indices.
Inputs
Risk percent, maximum lot cap and magic number. Supertrend ATR period and multiplier, EMA and ADX filters, stop loss mode, maximum stop distance, reward ratio, break-even and trailing settings.
How to Read a Trade
- Buy: Supertrend flips from bearish to bullish on a closed H1 bar, that bar closes above the EMA 200, and (if enabled) ADX is above your minimum. The stop goes below the Supertrend line plus a small ATR buffer.
- Sell: the mirror case - a bearish flip on a closed bar that closes below the EMA 200, with the stop above the Supertrend line.
- Why it is not trading: no new flip yet, the flip happened on the wrong side of the EMA 200, ADX is below the minimum, the required stop is wider than your maximum stop distance, or a position is already open. Check the on-chart status panel - this is normal behaviour, not an error.
- After entry: the stop moves to break-even after the ATR step, then the ATR trailing stop follows price until the take profit or the trail closes the trade.
Tuning tips
- Run the Strategy Tester on at least 12 months of XAUUSD data with "Every tick based on real ticks" before changing anything.
- A higher Supertrend multiplier means fewer, slower flips; a lower one reacts faster but gives more false flips in ranges.
- If you get too many losing trades in sideways markets, enable the ADX filter or raise its minimum.
- Gold spreads and volatility differ between brokers - re-check the maximum stop distance on your own broker, then run it on a demo account before going live.
Risk note
Trading involves substantial risk. Test the EA on a demo account first and use a risk level you are comfortable with.
Need a custom version?
I can adapt this EA to your own rules - a session/time filter, different money management, prop-firm daily loss and drawdown limits, extra entry filters, or an MT4 version. Send me a private message here on MQL5 (or offer me a personal order via MQL5 Freelance) with your requirements, and I will reply within 24 hours with whether it is doable and the estimated scope. If you find this free version useful, please leave a review - it helps a lot.
