OPEN-SOURCE SCRIPT

HEMA Trend by Rostek (Filters + ATR + RR)

199
https://www.tradingview.com/x/MGwcCvxn/For testing by anyone. Enjoy! :)

HEMA Trend Levels with Gradient, ATR-based SL & TP, HTF Filter, and R/R Statistics
This advanced indicator is designed to help you detect high-quality trend crossovers using HEMA (Hull Exponential Moving Average) smoothing logic. It integrates dynamic visualization, strong multi-layer filters, and risk management levels — all in one package.

✅ Core Concept
The indicator plots two HEMAs (fast and slow), with a gradient fill between them that dynamically changes color based on the trend direction. Crossovers between these HEMAs generate potential trade signals (long or short).

🎨 Key Visual Features
Smooth gradient fill area between fast and slow HEMA.

Dynamic arrows marking crossover points (precisely above/below HEMA cross).

Optional ATR-based Stop Loss (SL) and Take Profit (TP) levels shown as dashed lines with labels.

Automatic display of calculated Risk/Reward (R/R) ratio next to TP level.

⚙️ Powerful Filters
You can enable/disable each of these filters individually:

✅ EMA Filter — Confirm signals only when the price is above/below a selected EMA (default: 100).
✅ ADX Filter — Confirms signals only if ADX value exceeds a set threshold (default: 20).
✅ RSI Filter — Filter signals based on RSI value (e.g., >50 for longs, <50 for shorts).
✅ Higher Time Frame (HTF) EMA Filter — Only take signals aligned with a higher timeframe EMA trend (e.g., daily EMA 100).

📏 Risk Management Features
ATR-based Stop Loss (SL): Dynamic stop level calculated using ATR, configurable multiplier (e.g., 1.5 × ATR).

ATR-based Take Profit (TP): Dynamic take profit level based on ATR, configurable multiplier (e.g., 3 × ATR).

Risk/Reward Statistics: Calculates and displays R/R ratio on the chart to help visually evaluate trade setups.

🔔 Alerts
A single unified alert condition for both long and short filtered signals, making it easy to set up TradingView alerts.

⚡ Usage Tips
Adjust HEMA lengths (default: 20 & 40) to tune responsiveness.

Enable/disable filters depending on your strategy and market conditions.

Fine-tune ATR multipliers for SL/TP based on your risk tolerance.

Use HTF filter to trade only in the direction of the main higher timeframe trend.

✅ Ideal for
Trend-following traders who want smoothed entries.

Traders looking for integrated visual risk management levels.

Users who want precise, customizable signals with strong filtering logic.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.