PROTECTED SOURCE SCRIPT
Updated Nifty 50 Indicator

Indicator Name:
9 & 20 EMA + ADX(7) Full System (Confirmed Breakout - Stable)
Purpose:
To identify buy/sell signals based on EMA crossovers and ADX confirmation.
To track confirmed breakout levels and calculate a trailing stop-loss (SL).
To display relevant trading information in a table and visually on the chart.
Logic and Components:
1️⃣ Indicators Used
EMA(9) and EMA(20):
Used to detect trend direction and crossovers.
ADX(7):
Measures trend strength to classify signals as strong or weak.
2️⃣ Signal Generation
Strong Buy: EMA9 crosses above EMA20 and ADX > 20
Weak Buy: EMA9 crosses above EMA20 and ADX ≤ 20
Strong Sell: EMA9 crosses below EMA20 and ADX > 20
Weak Sell: EMA9 crosses below EMA20 and ADX ≤ 20
3️⃣ Confirmed Breakout Logic
Tracks the highest high after a buy signal (confirmedHigh).
Tracks the lowest low after a sell signal (confirmedLow).
Only updates confirmed levels if price continues in the signal direction.
4️⃣ Trailing Stop-Loss (SL)
Calculated from confirmed price, not entry price.
Buy: trailingSL = confirmedHigh * (1 - 0.009)
Sell: trailingSL = confirmedLow * (1 + 0.009)
Plotted on the chart as a red line, thicker and extending to the right.
5️⃣ Visual Elements on Chart
EMAs:
EMA9 (green), EMA20 (red).
Triangles for signals:
Medium size, hollow, colored outline.
Up triangles for buy, down triangles for sell.
Trailing SL line:
Red, width=3, extends 50 bars to the right.
6️⃣ Table Display
Shows key variables for each active signal:
Signal Type (Strong/Weak Buy/Sell)
Entry Price
Confirmed Price
Confirmed Move (Price difference from entry to confirmed)
ADX Value
Trailing SL
Summary of Workflow
Detect EMA crossovers.
Filter signals by ADX to determine strength.
Record entry price and initial confirmed high/low.
Update confirmed high/low if price continues in trend.
Calculate trailing SL from confirmed price.
Plot EMAs, signals (triangles), and trailing SL line.
Display all key information in a table on the chart.
✅ Key Features:
Dynamic trailing stoploss based on confirmed breakout.
Distinguishes strong vs weak signals.
Visual cues: hollow triangles for signals, SL line, and table summary.
Works entirely on the chart, ready for trading analysis.
9 & 20 EMA + ADX(7) Full System (Confirmed Breakout - Stable)
Purpose:
To identify buy/sell signals based on EMA crossovers and ADX confirmation.
To track confirmed breakout levels and calculate a trailing stop-loss (SL).
To display relevant trading information in a table and visually on the chart.
Logic and Components:
1️⃣ Indicators Used
EMA(9) and EMA(20):
Used to detect trend direction and crossovers.
ADX(7):
Measures trend strength to classify signals as strong or weak.
2️⃣ Signal Generation
Strong Buy: EMA9 crosses above EMA20 and ADX > 20
Weak Buy: EMA9 crosses above EMA20 and ADX ≤ 20
Strong Sell: EMA9 crosses below EMA20 and ADX > 20
Weak Sell: EMA9 crosses below EMA20 and ADX ≤ 20
3️⃣ Confirmed Breakout Logic
Tracks the highest high after a buy signal (confirmedHigh).
Tracks the lowest low after a sell signal (confirmedLow).
Only updates confirmed levels if price continues in the signal direction.
4️⃣ Trailing Stop-Loss (SL)
Calculated from confirmed price, not entry price.
Buy: trailingSL = confirmedHigh * (1 - 0.009)
Sell: trailingSL = confirmedLow * (1 + 0.009)
Plotted on the chart as a red line, thicker and extending to the right.
5️⃣ Visual Elements on Chart
EMAs:
EMA9 (green), EMA20 (red).
Triangles for signals:
Medium size, hollow, colored outline.
Up triangles for buy, down triangles for sell.
Trailing SL line:
Red, width=3, extends 50 bars to the right.
6️⃣ Table Display
Shows key variables for each active signal:
Signal Type (Strong/Weak Buy/Sell)
Entry Price
Confirmed Price
Confirmed Move (Price difference from entry to confirmed)
ADX Value
Trailing SL
Summary of Workflow
Detect EMA crossovers.
Filter signals by ADX to determine strength.
Record entry price and initial confirmed high/low.
Update confirmed high/low if price continues in trend.
Calculate trailing SL from confirmed price.
Plot EMAs, signals (triangles), and trailing SL line.
Display all key information in a table on the chart.
✅ Key Features:
Dynamic trailing stoploss based on confirmed breakout.
Distinguishes strong vs weak signals.
Visual cues: hollow triangles for signals, SL line, and table summary.
Works entirely on the chart, ready for trading analysis.
Release Notes
Table has been added Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.