Supertrend MTF Dragan MT5
- Göstergeler
-
Dragan Joksimovic
MQL4 / MQL5 Expert Advisor and Indicator Developer
I develop and test Expert Advisors, indicators and trading utilities for MetaTrader 4 and MetaTrader 5 based on clearly defined trading rules.
My work includes:
• Expert Advisors for MT4 and MT5
• Custom indicators - Sürüm: 1.1
- Etkinleştirmeler: 5
Supertrend MTF Dragan is a clean multi-timeframe ATR Supertrend for MetaTrader 5. It shows the Supertrend of a higher timeframe directly on your working chart — for example the H1 Supertrend on an M5 chart — with a color-coded trend line, confirmed reversal arrows that never repaint, alerts and a hidden trend-state buffer that you can read from your own Expert Advisor.
Key features
- Multi-timeframe: select any timeframe equal to or higher than the chart (M1 … MN1). Follow the higher-timeframe trend while you trade the entries on a lower chart.
- Classic ATR Supertrend formula with adjustable ATR period and multiplier (defaults 10 and 3.0).
- Trend line changes color and side: green below the price in an uptrend, red above the price in a downtrend.
- Confirmed reversal arrows: a BUY or SELL arrow is placed on the last chart candle of a closed higher-timeframe candle. The forming candle never gets an arrow, so the arrows do not repaint and do not disappear.
- Alerts on every confirmed reversal: pop-up, push notification to the mobile terminal and e-mail. One alert per higher-timeframe candle, no repeated messages.
- EA-ready: a hidden buffer holds the trend state (+1 uptrend, -1 downtrend) and the trend line values are in separate buffers, so the indicator can be used as a trend filter or signal source through iCustom / CopyBuffer.
- Lightweight: the full history is calculated once, after that only the forming higher-timeframe candle is updated on each tick. The calculation depth is adjustable.
- Works on any symbol (forex, metals, indices, energies, crypto, stocks) and any chart timeframe.
How it can be used
- Trend filter: trade only in the direction of the higher-timeframe Supertrend (green = look for longs, red = look for shorts).
- Reversal signals: the BUY / SELL arrows mark the candle on which the higher-timeframe trend has just changed.
- Trailing stop: the Supertrend line is a natural place for a trailing stop loss in the direction of the trend.
- Two copies on one chart: for example an H1 copy as the filter and an M15 copy for entries and exits.
Inputs
- Supertrend timeframe — PERIOD_CURRENT uses the chart timeframe; a lower timeframe than the chart is not allowed and is replaced by the chart timeframe.
- ATR period — default 10.
- ATR multiplier — default 3.0.
- Calculation history — number of candles of the selected timeframe to calculate, default 5000.
- Uptrend line color, Downtrend line color, Trend line width.
- Show confirmed reversal arrows, BUY arrow color, SELL arrow color, Arrow distance from candle (pips).
- Pop-up alert, Push notification, E-mail alert.
Buffers (for Expert Advisor developers)
- 0 — Supertrend line during an uptrend
- 1 — Supertrend line during a downtrend
- 2 — confirmed BUY reversal arrow (price of the arrow, EMPTY_VALUE otherwise)
- 3 — confirmed SELL reversal arrow
- 4 — trend state: +1 uptrend, -1 downtrend
Example — reading the trend of the last closed candle from an EA:
int handle = iCustom(_Symbol, _Period, "Market\\Supertrend MTF Dragan", PERIOD_H1, 10, 3.0, 5000); double state[]; if(CopyBuffer(handle, 4, 1, 1, state) == 1) { if(state[0] > 0) { /* H1 uptrend */ } if(state[0] < 0) { /* H1 downtrend */ } }
Notes
- The Supertrend is calculated from the candles of the selected timeframe, so the line and the arrows on the lower chart are exactly the same as on the higher-timeframe chart itself.
- Push notifications require the MetaQuotes ID of your mobile terminal in the terminal settings; e-mail alerts require the mail settings of the terminal.
- The indicator does not open trades and does not use any DLL or external files.
