OPEN-SOURCE SCRIPT
Supertrend - EMA Cloud - Divergence - ADX [StrixEDGE]

Overview
Apex Trend Engine is a 5-layer confluence system that combines trend-following, momentum, and reversal detection into a single overlay indicator. Each layer operates independently and feeds into a unified scoring engine that generates high-conviction BUY and SELL signals only when multiple confirmations align.
Layer 1 — Supertrend (Trend Direction)
An ATR-based adaptive trend filter that hugs price during trends and flips cleanly on reversals. The Supertrend line is plotted directly on the chart with a subtle fill between price and the stop level, making the current trend direction visible at a glance.
Bull & Bear SuperTrend :
Layer 2 — EMA Cloud (Momentum & Entries)
A fast/slow EMA pair (default 9/21) with a filled cloud between them. The cloud color shows momentum direction: green when fast EMA is above slow, red when below. Crossovers serve as entry triggers when confirmed by other layers.
Bull & Bear EMA :
Layer 3 — RSI Divergence Scanner (Reversals)
Automatic detection of regular bullish and bearish divergences between price and RSI using pivot-confirmed swing points. When price makes a lower low but RSI makes a higher low, a bullish divergence line is drawn on the chart. The reverse for bearish.
Bull Div.
Bear Div.
Layer 4 — ADX Trend Strength (Filter)
The Average Directional Index measures whether the market is trending or ranging. ADX above the threshold (default 25) confirms a trending market. The directional indicators (DI+ vs DI-) determine if the trend is bullish or bearish.
Bull & Bear ADX :
Layer 5 — Combined Signal Engine
Each layer contributes one point to a bull score and one to a bear score (5 points maximum each):
Point 1 — Supertrend direction
Point 2 — EMA fast/slow alignment
Point 3 — Price position relative to 200 EMA
Point 4 — Recent RSI divergence (within 20 bars)
Point 5 — ADX trending with directional confirmation
Signal generation requires both a score threshold AND a trigger event:
STRONG BUY — 4 or more bullish points with an EMA crossover or Supertrend flip

BUY — 3 or more bullish points with a trigger

STRONG SELL — 4 or more bearish points with a trigger
SELL — 3 or more bearish points with a trigger

This dual requirement (score plus trigger) prevents signals from firing on every bar during a trend and limits them to actionable moments.
Chart visuals
Supertrend: colored line with transparent fill to price showing the trend zone
EMA Cloud: fast and slow EMA lines with filled cloud between them
EMA 200: gold line for macro trend reference
Divergence lines: green lines connecting bullish divergence pivots, red for bearish
Signal arrows: double arrows for strong signals, single triangles for regular
Background highlight: subtle bar coloring on strong signal bars
Dashboard table
The on-chart dashboard shows each layer's current reading:
Supertrend — stop level and direction
EMA Cross — values and cross status
EMA 200 — value and price position
RSI — value with overbought/oversold warnings
Divergence — type and how many bars ago
ADX — value with trending/ranging status
Score — X/5 BULL and X/5 BEAR
Signal — combined verdict
Settings
Every component is independently configurable with sensible defaults:
Supertrend: ATR length 10, multiplier 3.0
EMA Cloud: fast 9, slow 21, trend 200
RSI Divergence: length 14, pivot lookback 5
ADX: length 14, smoothing 14, trending threshold 25
Signals: buy/sell arrows and background highlights toggleable
Dashboard: position and text size adjustable
Alerts : 10 alert conditions covering every signal type:
Strong Buy, Buy, Strong Sell, Sell
Supertrend flip bullish/bearish
EMA cross up/down
Bullish/Bearish divergence detected
Disclaimer
This indicator is a technical analysis tool for educational and informational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management and never risk capital you cannot afford to lose.
Apex Trend Engine is a 5-layer confluence system that combines trend-following, momentum, and reversal detection into a single overlay indicator. Each layer operates independently and feeds into a unified scoring engine that generates high-conviction BUY and SELL signals only when multiple confirmations align.
Layer 1 — Supertrend (Trend Direction)
An ATR-based adaptive trend filter that hugs price during trends and flips cleanly on reversals. The Supertrend line is plotted directly on the chart with a subtle fill between price and the stop level, making the current trend direction visible at a glance.
Bull & Bear SuperTrend :
Layer 2 — EMA Cloud (Momentum & Entries)
A fast/slow EMA pair (default 9/21) with a filled cloud between them. The cloud color shows momentum direction: green when fast EMA is above slow, red when below. Crossovers serve as entry triggers when confirmed by other layers.
Bull & Bear EMA :
Layer 3 — RSI Divergence Scanner (Reversals)
Automatic detection of regular bullish and bearish divergences between price and RSI using pivot-confirmed swing points. When price makes a lower low but RSI makes a higher low, a bullish divergence line is drawn on the chart. The reverse for bearish.
Bull Div.
Bear Div.
Layer 4 — ADX Trend Strength (Filter)
The Average Directional Index measures whether the market is trending or ranging. ADX above the threshold (default 25) confirms a trending market. The directional indicators (DI+ vs DI-) determine if the trend is bullish or bearish.
Bull & Bear ADX :
Layer 5 — Combined Signal Engine
Each layer contributes one point to a bull score and one to a bear score (5 points maximum each):
Point 1 — Supertrend direction
Point 2 — EMA fast/slow alignment
Point 3 — Price position relative to 200 EMA
Point 4 — Recent RSI divergence (within 20 bars)
Point 5 — ADX trending with directional confirmation
Signal generation requires both a score threshold AND a trigger event:
STRONG BUY — 4 or more bullish points with an EMA crossover or Supertrend flip
BUY — 3 or more bullish points with a trigger
STRONG SELL — 4 or more bearish points with a trigger
SELL — 3 or more bearish points with a trigger
This dual requirement (score plus trigger) prevents signals from firing on every bar during a trend and limits them to actionable moments.
Chart visuals
Supertrend: colored line with transparent fill to price showing the trend zone
EMA Cloud: fast and slow EMA lines with filled cloud between them
EMA 200: gold line for macro trend reference
Divergence lines: green lines connecting bullish divergence pivots, red for bearish
Signal arrows: double arrows for strong signals, single triangles for regular
Background highlight: subtle bar coloring on strong signal bars
Dashboard table
The on-chart dashboard shows each layer's current reading:
Supertrend — stop level and direction
EMA Cross — values and cross status
EMA 200 — value and price position
RSI — value with overbought/oversold warnings
Divergence — type and how many bars ago
ADX — value with trending/ranging status
Score — X/5 BULL and X/5 BEAR
Signal — combined verdict
Settings
Every component is independently configurable with sensible defaults:
Supertrend: ATR length 10, multiplier 3.0
EMA Cloud: fast 9, slow 21, trend 200
RSI Divergence: length 14, pivot lookback 5
ADX: length 14, smoothing 14, trending threshold 25
Signals: buy/sell arrows and background highlights toggleable
Dashboard: position and text size adjustable
Alerts : 10 alert conditions covering every signal type:
Strong Buy, Buy, Strong Sell, Sell
Supertrend flip bullish/bearish
EMA cross up/down
Bullish/Bearish divergence detected
Disclaimer
This indicator is a technical analysis tool for educational and informational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management and never risk capital you cannot afford to lose.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
✅MY Free Signals Telegram
t.me/StrixEdge
✅Website
strix-edge.com
t.me/StrixEdge
✅Website
strix-edge.com
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
✅MY Free Signals Telegram
t.me/StrixEdge
✅Website
strix-edge.com
t.me/StrixEdge
✅Website
strix-edge.com
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.