MultiAsset SuperTrend Trader
- Experts
-
Norbert Hubert Pajak
My professional career and interests are connected to the financial markets. For over a decade, I have attended almost every trading session.
I create automated trading algorithms (robots, bots), known as Expert Advisors, in MQL4 and MQL5. I can also assist with conversions from Pinescript. - 버전: 2.2
- 업데이트됨: 13 11월 2026
- 활성화: 10
MultiAsset SuperTrend Trader is an Expert Advisor that trades a portfolio of up to 10 instruments from one chart.
It follows the trend with the SuperTrend indicator, confirms each signal with up to three SuperTrend filters on higher timeframes and keeps the risk of the whole portfolio within one common limit.
The EA is available for MetaTrader 4 and MetaTrader 5, works in any account currency and has an interface in English, German, Spanish and Polish.
User guide with a description of every input: https://www.mql5.com/en/blogs/post/779479
The MetaTrader 4 Strategy Tester can test only one instrument at a time (the symbol selected in the tester). On a live or demo account the EA trades the whole portfolio from one chart. A backtest of the whole portfolio is possible in MetaTrader 5.
How the EA works
The EA opens a position when the signal SuperTrend changes direction on the signal timeframe (default H1) and all active SuperTrend filters on higher timeframes point in the same direction. The default inputs are one example configuration: SuperTrend H1 (period 10, multiplier 3.5) for entry and exit, long positions only, filter SuperTrend D1, Stop Loss at the SuperTrend line of D1, 0.5 % risk per trade and 4 % maximum risk for the portfolio.
Instrument slots
You enter 1 to 10 symbols, for example EURUSD, GOLD, US500 or BTCUSD. An empty symbol means that the slot is not used. A symbol that the broker does not offer is skipped and reported in the journal. Each slot has its own fixed lot (0 means the minimum lot of the symbol), minimum profit, Take Profit and hedge method.
Tick size and tick value are read from the broker. If the broker does not provide them, the EA calculates them and converts them into the account currency, also when the broker adds a suffix to the currency pair name, for example USDPLN.pro. Each slot has inputs to set these values manually; 0 means automatic. Each EA instance has its own Magic Number, so several baskets can run on one account.
SuperTrend filters
You can activate up to three SuperTrend filters, each with its own timeframe, period and multiplier. A trade is allowed only when all active filters agree. For example, with filters on D1, H4 and H1 a long position is opened only when all three SuperTrend lines point up. The filters can be read from the closed bar or from the current bar.
An additional filter can check the distance between the price and a SuperTrend line, in percent or in points. Entries are then allowed only between the minimum and maximum distance.
You can trade long, short or both directions, set the maximum number of positions per instrument and the minimum number of candles between entries.
Exit rules
A position can be closed when the signal SuperTrend changes direction, or the close signal can be set to None, so that only Stop Loss, Take Profit and Trailing Stop close the position. With the option "Close on signal only in profit?" an exit signal is ignored until the position reaches the minimum profit of its slot, in percent of the open price or in points. Commission and swap are included in this calculation. Each slot can also have a Take Profit in percent or in points.
You can choose the trading days and the entry hours, and close positions on Friday at a chosen hour (all positions or only those in profit).
Stop Loss and Trailing Stop
The initial Stop Loss can be placed at the SuperTrend line of any timeframe, at a distance in percent from the open price, or not used at all. A buffer in percent can be added to the calculated level. Before each entry the EA checks the Stop Loss and Take Profit against the minimum distance of the broker.
The Trailing Stop follows the SuperTrend line or keeps a distance in percent, in points or based on the Average True Range. It has a minimum step and can start only when the position is in profit.
Hedge per instrument
Each slot can use a hedge based on SuperTrend or on the Exponential Moving Average. In MetaTrader 5 this requires a hedging account; in MetaTrader 4 every account works this way. When the hedge timeframe turns against the position, the EA opens an opposite position of the same volume. When the trend returns, the hedge is closed. Optionally the hedge can be opened or removed during the candle, when the price crosses the activation level by a buffer in percent (default 1 %).
Hedge positions have their own Magic Number and follow the volume of the main positions. A hedge is intended for strategies without Stop Loss. It reduces the drawdown, but it also reduces the return, and swap is charged on both positions.
Risk management
You decide which part of the account the EA may use (1 to 100 %) and whether it is based on balance or equity. The position size is a fixed lot per slot or is calculated from the risk per trade and the Stop Loss distance. The total risk of all open positions, including the new one, may not exceed the portfolio limit (default 4 %); a signal above this limit is skipped. Before every order the EA checks the trading permissions, volume limits, free margin and whether the market of the symbol is open. A spread filter is optional.
Panels and journal
Two panels can be moved and collapsed, adjust their width to the content and keep their position. The SETTINGS panel shows a summary of the active strategy and the instrument data in use. The POSITIONS panel shows the balance, equity, realized and floating profit, closed trades with win rate and profit factor, the total portfolio risk, an equity curve of the EA compared with an equally weighted buy and hold portfolio of the slot symbols, the state of the filters for each instrument and the open positions. Each instrument has an ON/OFF button to stop trading a symbol without changing the inputs.
The SuperTrend lines of the signal and filters are drawn on the chart. Every buy or sell signal is written to the journal with its result: the opened position or the reason why it was rejected. Every entry starts with the server time.
Example configurations
Each example lists the inputs to change from the default values. Test every configuration in the Strategy Tester on your instruments and with your broker before using it on a live account.
Example 1: default inputs. SuperTrend H1 for entry and exit, long only, filter 1 SuperTrend D1, Stop Loss at the SuperTrend line of D1, 0.5 % risk per trade, 4 % portfolio limit.
Example 2: three timeframes. Signal timeframe M30. Filter 1: SuperTrend D1, filter 2: SuperTrend H4, filter 3: SuperTrend H1. Stop Loss at the SuperTrend line of H4, Trailing Stop at the SuperTrend line of H1, only in profit. Long and short. Example instruments: major currency pairs and gold.
Example 3: swing trading on H4. Signal timeframe H4, filter 1: SuperTrend D1. Close signal None, exit by Trailing Stop based on the Average True Range of H4, Stop Loss 3 % from the open price. Example instruments: indices and commodities.
Example 4: no Stop Loss, with hedge. For index contracts without expiry, long term, long only. No Stop Loss, fixed lot per slot, "Close on signal only in profit?" on with a minimum profit per slot (for example 0.5 %), hedge on SuperTrend D1.
Quick start
- Attach the EA to one chart of any symbol and enter your symbols in "Symbol - slot 1" to "Symbol - slot 10".
- Keep the default inputs or set one of the examples, then set the risk per trade and the portfolio limit.
- Test in the Strategy Tester. In MetaTrader 5 the whole basket is tested at once; in MetaTrader 4 test each instrument on its own.
- On the live account check the SETTINGS and POSITIONS panels.
A Pro version of this EA with more signal, filter and Stop Loss methods is available in my seller profile.
The EA executes a systematic strategy. It does not guarantee profit and cannot prevent losses. Trading without Stop Loss and with leverage can lead to large drawdowns and requires a sufficient margin reserve. Results of tests on historical data do not guarantee future results.

