Alpha Trend with signal
- Indicateurs
-
Minh Truong Pham
Hello, my name is Pham and I am a programmer and trader! At here, I create amazing forex indicators and expert advisors for Metatrader.
I will try:
+ Provide best tools base on my 5 years experience as a trader and 10 years as a programmer. - Version: 1.0
- Activations: 20
# AlphaTrend
**A trend, momentum, volatility and volume indicator in one line — with a color-filled cloud and clean BUY/SELL signals.**
AlphaTrend is a faithful conversion of Kivanc Ozbilgic's well-known "AlphaTrend" indicator, rebuilt for MetaTrader. It plots an adaptive trailing line that hugs price during trends and goes flat during ranges, plus a second line offset by 2 bars. The crossover of these two lines produces the BUY/SELL signals, and the area between them is filled green (bullish) or red (bearish) so you can read the market state at a glance.
---
## What AlphaTrend is built to do
Derived from Trend Magic, AlphaTrend was designed to fix the classic weaknesses of a single trailing-stop indicator:
1. **Minimize stop-outs and survive sideways markets** — in a range the line goes almost flat, "dead" like its ancestor, and stops throwing false signals.
2. **More accurate BUY/SELL signals in trends** — the 2-bar offset line turns a noisy trailing stop into a clean crossover system.
3. **Meaningful support & resistance** — the line trails 1×ATR from the bar lows in an uptrend (support) and 1×ATR from the bar highs in a downtrend (resistance). The straighter the line, the stronger that level.
4. **One compatible combination across indicator families:**
- **Momentum:** MFI (or RSI when there is no volume data)
- **Trend:** Magic Trend logic
- **Volatility:** ATR
- **Trailing stop:** ATR trailing stop
- **Volume:** MFI
---
## How the lines and cloud work
- **AlphaTrend line** — the main adaptive trailing line.
- In an **uptrend** it trails `low − Coeff×ATR` and acts as **dynamic support / trailing stop**.
- In a **downtrend** it trails `high + Coeff×ATR` and acts as **dynamic resistance / trailing stop**.
- **AlphaTrend[2] line** — the same line shifted 2 bars to the right.
- **Cloud (fill)** between the two lines:
- **Green** when AlphaTrend is above its offset line → bullish state.
- **Red** when AlphaTrend is below its offset line → bearish state.
- **Signals:**
- **BUY** when the AlphaTrend line crosses **above** its 2-bar offset line (the fill flips green).
- **SELL** when it crosses **below** the offset line (the fill flips red).
The momentum gate: AlphaTrend uses **MFI** to decide direction. If the symbol has no real volume, MFI returns 0 — tick "**Change calculation (no volume data)**" and the indicator switches to **RSI** instead, so it keeps working on any chart.
---
## ⚠️ About repainting — read this before trading
**The signal on the current (still-forming) bar can repaint.** This is not a bug — it is how the math works:
- The AlphaTrend value of the live bar depends on the **current bar's high/low and MFI/RSI**, which keep changing until the bar closes.
- Therefore a BUY or SELL arrow can **appear and then disappear** within the same candle before it closes.
- **Once a bar has closed, its signal is final and never repaints afterwards.**
**How this indicator handles it for you:**
- Use the input **`Alert only after bar close (confirmed)` = true** to get alerts **only after the signal bar has closed** ("BUY/SELL SIGNAL APPROVED!"). These are the non-repainting signals.
- With it set to `false` you get early ("Potential") alerts on the live bar — faster, but they may repaint.
- On the chart, the arrow of the forming bar is automatically removed if the signal is invalidated before the candle closes.
**Rule of thumb: for mechanical / systematic trading, act on closed-bar (confirmed) signals only.**
---
## How to trade / read the signals
### Reading the screen
| What you see | Meaning | Bias |
|---|---|---|
| Fill turns **green**, BUY arrow below bar | AlphaTrend crossed above its offset line | Long |
| Fill turns **red**, SELL arrow above bar | AlphaTrend crossed below its offset line | Short |
| Line **flat / choppy**, cloud thin, colors alternating | Range / no trend | Stay out |
| Line **rising in a straight slope**, price holding above it | Strong uptrend, line = support | Hold / buy dips |
| Line **falling in a straight slope**, price capped below it | Strong downtrend, line = resistance | Hold / sell rallies |
### Long (BUY) playbook
1. Wait for a **confirmed BUY** (green cloud on a closed bar).
2. Enter long on the close, or on the first pullback to the AlphaTrend line.
3. Place the **stop-loss just below the AlphaTrend line** — it is the built-in trailing stop.
4. Trail the stop up with the line as long as it keeps rising. Exit on the opposite (confirmed SELL) signal or when price closes back below the line.
### Short (SELL) playbook
1. Wait for a **confirmed SELL** (red cloud on a closed bar).
2. Enter short on the close, or on the first pullback to the AlphaTrend line.
3. Place the **stop-loss just above the AlphaTrend line**.
4. Trail the stop down with the line. Exit on the opposite (confirmed BUY) signal or a close back above the line.
### Signals to skip
- Signals while the line is **flat / horizontal** — that is a range; expect whipsaws.
- Signals that **flip back and forth every 1–2 bars** (cloud rapidly changing color) — no trend to ride.
- **Live-bar** arrows that have not been confirmed by a bar close, if you trade mechanically.
- Counter-trend signals against a much larger higher-timeframe trend — treat them as exits, not fresh entries.
**Best practice:** combine AlphaTrend with market structure or a higher-timeframe read. Take BUYs when the higher timeframe is up and SELLs when it is down; use the opposite-side signals only to close positions.
---
## Inputs
| Input | Default | Description |
|---|---|---|
| Multiplier | 1.0 | ATR coefficient — trailing distance. Higher = looser line, fewer signals. |
| Common Period | 14 | Length of ATR, MFI and RSI. |
| Source | Close | Price used in RSI mode. |
| Show Signals? | true | Draw BUY/SELL arrows. |
| Fill area between the two lines? | true | Show the green/red cloud. |
| Change calculation (no volume data)? | false | Use RSI instead of MFI when the chart has no volume. |
| Alert only after bar close (confirmed) | false | Fire alerts only on closed signals (non-repainting). Recommended. |
| Alert: price crosses AlphaTrend | false | Extra alert when Close crosses the line. |
| Alert: candle crosses AlphaTrend | false | Extra alert when a candle's low/high crosses the line. |
| Notification settings | — | None / Alert / Email / Telegram (bot token + channel). |
**Default values:** Coefficient = 1 (trailing ATR factor), Common Period = 14 (length of ATR, MFI and RSI).
## Notifications
On-screen alert, email, and Telegram push are supported for BUY/SELL signals and for the optional price/candle cross alerts. Set them once and get notified the moment a signal is confirmed.
---
*AlphaTrend works on any symbol and timeframe. It is a decision-support tool, not a guarantee of profit — always use proper risk management.*
