Advanced MTF Supply & Demand ZonesHow it works
MTF Setup: By default, it looks at the 240 minute (4 Hour) timeframe to find significant structures while you trade on a lower timeframe chart.
Pivot Identification: It looks for pivot highs and lows on the higher timeframe. You can adjust the Left Length and Right Length in the settings to dictate how major a pivot needs to be to form a zone.
Zone Drawing:
Supply zones are drawn from the high of a major high to the body (highest of the open/close) of that candle.
Demand zones are drawn from the lowest low to the body of that candle.
Breakouts: When the chart's closing price breaks out of the top of a supply zone or the bottom of a demand zone, it becomes invalidated. You can toggle "Show Broken Zones" in the settings to either remove them immediately or keep them on the chart with higher transparency.
What's New:
Order Flow & Imbalance Constraints:
You can now toggle "Require Volume Confirmation" in the settings. This ensures a zone only forms if the pivot candle had higher than average volume (acting as an order block).
You can toggle "Require FVG / Imbalance" to ensure that immediately after the pivot, there was a Fair Value Gap created, confirming strong institutional order flow displacement.
Major & Minor Zones:
In the settings, you can now change "Zone Significance" to display only Major zones, only Minor zones, or Both. Major zones use longer pivot lengths, meaning they represent stronger, more significant structural points, whereas minor zones form on shorter, more frequent pivot points.
Tested vs Untested States:
The indicator keeps track of price returning to test the zones. When a zone is tested (price enters the zone but doesn't close on the other side to break it), its background color shifts to a secondary color.
You have 4 color options now: Fresh Demand, Tested Demand, Fresh Supply, and Tested Supply.
Here's what changed:
Label Positioning: Supply labels are positioned at the top center of the supply zones with their pointers pointing down (label.style_label_down). Demand labels are positioned at the bottom center with their pointers pointing up (label.style_label_up).
Dynamic Centering: As the zone boxes extend over time onto new candles, the script updates the X-coordinate of the label so it continues to stay perfectly centered within the box.
Dynamic Formatting: The labels say whether the zone is Major or Minor (e.g. Major Demand, Minor Supply). When the zone is tested, the label text color will match the updated 'tested' color of the zone box. If a zone breaks and Show Broken Zones is active, the label also becomes highly transparent to match the dashed/faded aesthetic.
Indicator

Denies Kresna Zigzag 4This indicator is a simplified version inspired by the ZigZag Plus algorithm, designed to focus only on the features that matter most: ZigZag swing detection and Support & Resistance levels.
All non-essential components such as volume analysis, alerts, labels, bar coloring, and candle markers have been removed to provide a clean and lightweight charting experience.
Features
Automatic ZigZag swing detection
Dynamic Support and Resistance levels
Lightweight implementation for better performance
Clean chart with no unnecessary visual clutter
How it Works
The indicator identifies swing highs and swing lows using the original trend-switching logic. Every confirmed swing creates a new support or resistance level:
Swing High → Resistance
Swing Low → Support
Support and resistance levels remain active until they are invalidated by price.
Best Used For
Market structure analysis
Identifying swing highs and lows
Support & Resistance trading
Trend reversal confirmation
Price action trading
Notes
This script is intentionally minimalistic. It does not include volume analysis, breakout alerts, candle coloring, or other visual enhancements found in the original implementation.
The goal is to provide a fast, clean, and easy-to-read ZigZag indicator focused purely on market structure. Indicator

RSI Candle ColorerWHAT IT DOES
Paints the candle itself when a classic reversal pattern fires with confirmation. Seven patterns are watched — bullish and bearish engulfing, hammer, shooting star, piercing line, dark cloud cover, harami, and harami cross — and a raw pattern alone is never enough. It must also agree with momentum (RSI position), participation (volume against its own average), and location (price versus a short trend EMA). All three must line up, or the candle stays unpainted. Most candles stay unpainted. That is the point.
HOW IT WORKS
- Bullish patterns only qualify when RSI is at or below your bullish threshold (default 40), volume is at least the 20-bar average, and the prior bar closed below the trend EMA — you are buying a dip, not chasing a top.
- Bearish patterns mirror it: RSI at or above 60, real volume, prior bar above the EMA.
- A confirmed pattern paints the bar green or red, prints a small label naming the pattern, and can fire an alert.
- Signals confirm on bar close by default — no repaint. A minimum-spacing setting stops clusters from stacking labels on top of each other.
HOW TO USE IT
Works on any symbol and any timeframe. Treat it as a bias and timing lens: when a painted candle appears at a level you already care about, you have pattern, momentum, and volume agreeing at the same moment. It pairs naturally with support and resistance or higher-timeframe structure.
WHAT IT CAN'T DO
It reads candles and momentum, not context. It does not know news is coming, and it will occasionally paint a perfect-looking candle right before the market disagrees. It is a filter for your eyes, not an autopilot.
SETTINGS
Pattern toggles for all seven, EMA length (9), RSI length (14) with bull/bear thresholds (40/60), volume lookback (20) and multiplier (1.0), minimum bars between signals (5), confirm-on-close (on).
Open source. Free. If it helps you read the tape faster, that's the job. Indicator

Strategy

Gabriel Hedge Fund Ultimate Confluence Suite IndicatorScores 10 proven institutional factors (EMA 20/50/200 stack, higher-TF trend, SuperTrend, MACD, RSI regime, ADX, VWAP, Donchian 20 breakout, volume surge + OBV, squeeze release) into a 0–10 confluence score. Fires BUY/SELL when the score crosses your threshold (default 7), draws ATR stop + 1R/2R/3R target zones, live dashboard table showing each factor's ▲/▼ state, per-signal alerts. Every factor toggleable.
Combine This With Gabriel Hedge Fund Ultimate Confluence Strategy Indicator

Move Strength IndexOverview
An accurate relative-volume indicator with a genuinely clear signal:
column height shows the relative-volume multiple, color intensity
separately highlights which of those bars are actually unusual for that
specific symbol, and a distinct compression color flags the specific
case where heavy volume produces almost no range — a classic
effort-without-result signature that often precedes a sharp move.
How it's calculated
Relative volume is current volume divided by a smoothed (RMA) average of
the *prior* bars — the still-forming bar is excluded from its own
baseline (a common flaw in naive relative-volume scripts, which quietly
dampens real spikes), and the smoothed baseline decays gradually rather
than using a fixed rolling window, avoiding the "step" artifact that
occurs when an old outlier bar abruptly exits a fixed-length SMA window.
Color intensity is driven by the bar's percentile rank against its own
trailing history (default 100 bars), not a fixed multiple — a fixed
brightness cutoff only produces contrast if the symbol regularly reaches
that multiple, whereas percentile rank self-calibrates so the loudest
days for any given symbol are always vivid and quiet days are always
dim.
Direction is close vs. open — the same test used to color the candles on
the price chart itself, so MSI's green/red always agrees with what the
candle next to it shows.
A bar is recolored yellow (compression) when its volume ranks high
(top percentile, same threshold used for alerts) but its high-low range
is unusually narrow relative to ATR — heavy participation that isn't
moving price, which typically means one side is being absorbed at that
level. The live, still-forming bar is dimmed by default, since its
partial volume will always understate true relative volume until the
bar closes.
How to use it
Column height is the relative-volume multiple directly — a bar at 2.0
traded at twice its recent baseline volume. Brightness tells you whether
that reading is actually unusual for this symbol; a tall but dull column
means the symbol just runs volatile volume normally, while a vivid
column is a genuine standout. Green/red tells you which side controlled
the bar. A yellow bar is the one to watch closely — high volume with
nothing to show for it in price, often the setup before a breakout or
breakdown. Alerts fire separately for strong buying, strong selling, and
compression. On a symbol with no real volume data, the script raises a
clear error instead of rendering a blank pane. Indicator

ICT GapsICT Gaps
Multi-timeframe ICT gap toolkit: Fair Value Gaps from up to nine higher timeframes, plus New Week Opening Gaps (NWOG), New Day Opening Gaps (NDOG), and the Opening Range Gap (ORG) — all on one chart.
What it does
HTF Fair Value Gaps Displays FVGs (3-candle imbalances) from up to 9 configurable timeframes (defaults: 1m, 2m, 3m, 5m, 15m, 1H, 4H, 1D, 1W) on your current chart. Each timeframe has its own show/hide toggle, bullish/bearish colors, and display cap.
Zones extend a configurable distance ahead of the current candle, with each timeframe's labels stacked in its own column so you can read the chart at a glance.
Mitigation tracking with five modes: None, Wick filled, Body filled, Wick filled half, Body filled half. Mitigated zones freeze at the candle that filled them and recolor (or hide entirely — your choice).
C.E. (Consequent Encroachment) midpoint line on every FVG, with selectable line style.
Proximity filter: only FVGs within an ATR-based distance of current price are drawn, keeping the chart clean. The multiplier is adjustable.
Optional merging of back-to-back FVGs (two 3-candle gaps sharing 2 candles) into a single zone.
"Hide Lower Timeframes" automatically hides any configured timeframe below your chart timeframe.
Opening Gaps (NWOG / NDOG) The gap between Friday's close and the new week's open (NWOG), and between each day's close and the next day's open (NDOG). Keeps a configurable number of recent gaps (ICT convention: last 5). Opening gaps do not mitigate — they stay on the chart while relevant.
Opening Range Gap (ORG) The gap between the previous regular session close (default 16:15 ET) and today's regular session open (09:30 ET). The box spans exactly the overnight region — from the prior close to the opening bell — and freezes there. Session window and time-zone are configurable. Requires a 15-minute or lower chart timeframe so session boundaries align with bars.
Internal levels for gaps Each gap type can display either the C.E. midpoint or SD quadrant lines at 0/25/50/75/100% of the gap — one dropdown per feature, so the two never conflict. SD lines can carry small 25/50/75 value labels in a color of your choice.
Usage tips
Keep fill colors mostly transparent (75–90%). Opaque fills will visibly jump in front of the candles when hovered — that's TradingView's hover behavior, not the script.
If you prefer candles always on top: right-click the indicator → Visual order → Send to back.
ORG requires a 15m or lower chart. NWOG/NDOG require an intraday chart.
On a 1H chart with defaults, expect the nearest timeframe's zones to sit a few candles right of price, with higher timeframes stacked further out. Adjust "Distance from current candle" and "Spacing between timeframes" to taste.
Credits
Built on the open-source "ICT HTF FVGs" by fadizeidan, extended with additional timeframes, gap types (NWOG/NDOG/ORG), SD levels, mitigation-freeze behavior, and gap-session logic. Published under the Mozilla Public License 2.0.
This indicator is a charting tool for ICT-style analysis. It is not financial advice and produces no buy/sell signals. Indicator

Indicator

Indicator

S&R + Trends | Polytrends Method (gracefultrading)SUPPORT & RESISTANCE + TRENDS | POLYTRENDS METHOD
Maps market structure automatically: every trend is detected, classified, and turned into support/resistance levels that know their own state. Built around the polytrends method of reading structure through trends and progression. This is my own independent, open-source interpretation of the framework, coded from scratch based on publicly available material. For educational purposes only — not financial advice.
TRENDS AND CONTAINMENT
Every pivot is compared against the previous pivot in the same direction. A swing that pushes past the prior trend is a valid continuation and draws in the trend colour. A swing that fails to exceed it — a lower high on the way up and or a lower low on the way down — is a containment trend, drawn in its own colour and style.
The current in-progress leg draws dashed, so you always see the swing being built. Pivot detection reacts to wick pullbacks, close-breaks of the prior candle, structural breaks, and same-bar reversals — not fixed-length lookbacks.
LEVELS WITH STATE
Each trend leaves a level at the candle body, committed only after the next opposite pivot confirms it. Every label shows the level's current state at a glance:
G — gained
SG — support gained
L — lost
RL — resistance lost
State updates bar by bar as price closes through or reclaims a level. An optional break/test offset (in ticks or percent) means a level only counts as gained, lost, or tested once price clears it by your buffer.
PAIRED STRUCTURE
Levels come from trends and draws in colour-matched pairs from a 12-colour set, each pair originating from the same piece of structure.
Tested levels draw in a different line style from untested ones and can be hidden entirely; when hidden, you choose whether each pair still shows its tested partner so pairs stay intact. At high relevance settings, clustered tested levels within a tick distance thin down to the strongest one.
POLYBOUNDS
Experimental.
A corner readout that reduces the chart to the two prices that matter:
▲ hold above — the key gained level below price. Bulls are in control while price holds above it.
▼ hold below — the key lost level above price. Bears are in control while price holds below it.
Each line is coloured to match its pair on the chart, and the box only quotes levels that are actually drawn. A Trend Day row (1H and below) reads whether the session is shaping up bullish, bearish, or rangebound based on where price sits against the bounds.
SETTINGS
Levels above/below counts. A relevance dial controlling how deep into history levels are pulled from (50 bars to full history). Independent colours, styles, and widths for trends, containment trends, and levels. Configurable label background and twelve pair colours. A right-offset so all level rays align cleanly ahead of price.
HOW TO READ IT
The market is always in progression — always attempting either a new high or a new low. Every swing this indicator draws is one attempt in that sequence, and every level is the footprint it leaves behind.
Progression rule: in an uptrend, price should not lose the previous swing low if it intends to go higher — losing it shifts probability toward the opposite objective. Mirror logic in a downtrend. Watch the level states: a support flipping from SG to L is that shift happening in real time.
Containment is the early warning. A containment trend (lower high in an uptrend, higher low in a downtrend) means the progression is failing before any level has broken. Trend weakness is the warning; level failure is the confirmation.
Levels mark accepted value. They're built from candle bodies, not wicks — the goal is to see where the market accepted or rejected value, which is why the break/test offset exists to filter wick noise.
Untested levels react first. Fresh levels are the highest-priority reaction zones; tested levels remain valid structure and become targets when price is nearer to them. The pair colours show you which structure each level came from.
Timeframes nest. Higher-timeframe levels are destinations; lower-timeframe levels are the navigation between them. Significant trends typically start from higher-timeframe pivots — the biggest swings on your chart usually trace back to them. RTH-formed levels tend to carry the most weight.
Works on any symbol and timeframe; the Trend Day readout is built for intraday. This is a tool for reading structure, not a signal service — nothing replaces risk management. Indicator

Indicator

Indicator

Indicator

Indicator

Indicator

ashknany.trading//@version=6
indicator(
"ashknany.trading",
shorttitle = "ashknany.trading",
overlay = true,
max_lines_count = 500,
max_labels_count = 500,
max_boxes_count = 100,
max_bars_back = 5000
)
//=====================================================================
// الإعدادات
//=====================================================================
// إعدادات النقاط والأهداف
pipValue = input.float(0.10, "قيمة الـ Pip بالسعر", step = 0.01, minval = 0.001, group = "🎯 الأهداف ووقف الخسارة")
targetPips = input.int(40, "المسافة بين الأهداف Pip", minval = 1, group = "🎯 الأهداف ووقف الخسارة")
stopPips = input.int(40, "وقف الخسارة Pip", minval = 1, group = "🎯 الأهداف ووقف الخسارة")
lineBars = input.int(60, "طول خطوط الصفقة", minval = 10, maxval = 300, group = "🎯 الأهداف ووقف الخسارة")
// إعدادات الدعم والمقاومة
pivotLength = input.int(8, "قوة الدعم والمقاومة", minval = 2, maxval = 50, group = "📊 الدعم والمقاومة")
showSR = input.bool(true, "إظهار الدعم والمقاومة", group = "📊 الدعم والمقاومة")
// إعدادات الأوردر بلوك
obLookback = input.int(15, "البحث عن الأوردر بلوك", minval = 3, maxval = 50, group = "📦 الأوردر بلوك")
showOB = input.bool(true, "إظهار مناطق الأوردر بلوك", group = "📦 الأوردر بلوك")
useBodyOnly = input.bool(false, "استخدام جسم الشمعة فقط", group = "📦 الأوردر بلوك")
// إعدادات الفيبوناتشي
showFib = input.bool(true, "إظهار مستويات الفيبوناتشي", group = "📐 الفيبوناتشي")
useFibFilter = input.bool(true, "اشتراط توافق الدخول مع الفيبوناتشي", group = "📐 الفيبوناتشي")
// فلتر الاتجاه
emaLength = input.int(50, "طول EMA", minval = 1, group = "⚙️ فلتر الاتجاه")
useEMAFilter = input.bool(true, "استخدام فلتر الاتجاه EMA", group = "⚙️ فلتر الاتجاه")
showEMA = input.bool(true, "إظهار EMA", group = "⚙️ فلتر الاتجاه")
// إعدادات الإشارات
cooldownBars = input.int(10, "الفاصل بين الإشارات", minval = 1, group = "🔔 إشارات الدخول")
confirmClose = input.bool(true, "انتظار إغلاق الشمعة", group = "🔔 إشارات الدخول")
//=====================================================================
// الحسابات الأساسية
//=====================================================================
targetDistance = targetPips * pipValue
stopDistance = stopPips * pipValue
emaTrend = ta.ema(close, emaLength)
atrValue = ta.atr(14)
plot(
showEMA ? emaTrend : na,
title = "EMA",
color = color.new(color.blue, 20),
linewidth = 2
)
//=====================================================================
// الدعم والمقاومة
//=====================================================================
pivotHigh = ta.pivothigh(high, pivotLength, pivotLength)
pivotLow = ta.pivotlow(low, pivotLength, pivotLength)
var float resistanceLevel = na
var float supportLevel = na
var int resistanceBar = na
var int supportBar = na
if not na(pivotHigh)
resistanceLevel := pivotHigh
resistanceBar := bar_index - pivotLength
if not na(pivotLow)
supportLevel := pivotLow
supportBar := bar_index - pivotLength
plot(
showSR ? resistanceLevel : na,
title = "المقاومة",
color = color.orange,
linewidth = 2,
style = plot.style_stepline
)
plot(
showSR ? supportLevel : na,
title = "الدعم",
color = color.orange,
linewidth = 2,
style = plot.style_stepline
)
//=====================================================================
// كسر الهيكل
//=====================================================================
bullishBreak =
not na(resistanceLevel) and
close > resistanceLevel and
close <= resistanceLevel
bearishBreak =
not na(supportLevel) and
close < supportLevel and
close >= supportLevel
//=====================================================================
// اكتشاف الأوردر بلوك
// آخر شمعة هابطة قبل الكسر الصاعد
// وآخر شمعة صاعدة قبل الكسر الهابط
//=====================================================================
var float bullishOBHigh = na
var float bullishOBLow = na
var int bullishOBBar = na
var float bearishOBHigh = na
var float bearishOBLow = na
var int bearishOBBar = na
var box bullishOBBox = na
var box bearishOBBox = na
if bullishBreak
float foundBullHigh = na
float foundBullLow = na
int foundBullBar = na
for i = 1 to obLookback
if na(foundBullBar) and close < open
foundBullHigh := useBodyOnly ? open : high
foundBullLow := useBodyOnly ? close : low
foundBullBar := bar_index - i
if not na(foundBullBar)
bullishOBHigh := foundBullHigh
bullishOBLow := foundBullLow
bullishOBBar := foundBullBar
if not na(bullishOBBox)
box.delete(bullishOBBox)
if showOB
bullishOBBox := box.new(
left = bullishOBBar,
top = bullishOBHigh,
right = bar_index + 100,
bottom = bullishOBLow,
border_color = color.new(color.green, 10),
bgcolor = color.new(color.green, 85),
extend = extend.right,
text = "أوردر بلوك شراء",
text_color = color.green,
text_size = size.small
)
if bearishBreak
float foundBearHigh = na
float foundBearLow = na
int foundBearBar = na
for i = 1 to obLookback
if na(foundBearBar) and close > open
foundBearHigh := useBodyOnly ? close : high
foundBearLow := useBodyOnly ? open : low
foundBearBar := bar_index - i
if not na(foundBearBar)
bearishOBHigh := foundBearHigh
bearishOBLow := foundBearLow
bearishOBBar := foundBearBar
if not na(bearishOBBox)
box.delete(bearishOBBox)
if showOB
bearishOBBox := box.new(
left = bearishOBBar,
top = bearishOBHigh,
right = bar_index + 100,
bottom = bearishOBLow,
border_color = color.new(color.red, 10),
bgcolor = color.new(color.red, 85),
extend = extend.right,
text = "أوردر بلوك بيع",
text_color = color.red,
text_size = size.small
)
// إبطال الأوردر بلوك عند كسره
bullOBInvalid =
not na(bullishOBLow) and
close < bullishOBLow
bearOBInvalid =
not na(bearishOBHigh) and
close > bearishOBHigh
if bullOBInvalid
bullishOBHigh := na
bullishOBLow := na
if not na(bullishOBBox)
box.delete(bullishOBBox)
bullishOBBox := na
if bearOBInvalid
bearishOBHigh := na
bearishOBLow := na
if not na(bearishOBBox)
box.delete(bearishOBBox)
bearishOBBox := na
//=====================================================================
// الفيبوناتشي بين آخر قمة وآخر قاع
//=====================================================================
validSwing =
not na(resistanceLevel) and
not na(supportLevel) and
resistanceLevel > supportLevel
swingRange = validSwing ? resistanceLevel - supportLevel : na
// اتجاه آخر حركة بحسب آخر Pivot
lastSwingBullish =
validSwing and
not na(supportBar) and
not na(resistanceBar) and
resistanceBar > supportBar
lastSwingBearish =
validSwing and
not na(supportBar) and
not na(resistanceBar) and
supportBar > resistanceBar
bullFib50 =
validSwing ?
resistanceLevel - swingRange * 0.50 :
na
bullFib618 =
validSwing ?
resistanceLevel - swingRange * 0.618 :
na
bearFib50 =
validSwing ?
supportLevel + swingRange * 0.50 :
na
bearFib618 =
validSwing ?
supportLevel + swingRange * 0.618 :
na
fib50Level =
lastSwingBullish ? bullFib50 :
lastSwingBearish ? bearFib50 :
na
fib618Level =
lastSwingBullish ? bullFib618 :
lastSwingBearish ? bearFib618 :
na
fib50Plot = plot(
showFib ? fib50Level : na,
title = "Fibonacci 50%",
color = color.new(color.purple, 10),
linewidth = 1,
style = plot.style_stepline
)
fib618Plot = plot(
showFib ? fib618Level : na,
title = "Fibonacci 61.8%",
color = color.new(color.fuchsia, 10),
linewidth = 2,
style = plot.style_stepline
)
fill(
fib50Plot,
fib618Plot,
color = showFib ? color.new(color.purple, 90) : na,
title = "منطقة الفيبوناتشي"
)
//=====================================================================
// شروط الدخول
//=====================================================================
// ملامسة منطقة الأوردر بلوك
bullOBTouch =
not na(bullishOBHigh) and
not na(bullishOBLow) and
low <= bullishOBHigh and
high >= bullishOBLow
bearOBTouch =
not na(bearishOBHigh) and
not na(bearishOBLow) and
high >= bearishOBLow and
low <= bearishOBHigh
// وجود السعر داخل منطقة فيبوناتشي
bullFibZone =
lastSwingBullish and
not na(bullFib50) and
not na(bullFib618) and
low <= math.max(bullFib50, bullFib618) and
high >= math.min(bullFib50, bullFib618)
bearFibZone =
lastSwingBearish and
not na(bearFib50) and
not na(bearFib618) and
high >= math.min(bearFib50, bearFib618) and
low <= math.max(bearFib50, bearFib618)
// فلتر الاتجاه
bullTrendOK = not useEMAFilter or close > emaTrend
bearTrendOK = not useEMAFilter or close < emaTrend
// فلتر الفيبوناتشي
bullFibOK = not useFibFilter or bullFibZone
bearFibOK = not useFibFilter or bearFibZone
// شمعة تأكيد
bullishCandle =
close > open and
close > (high + low) / 2
bearishCandle =
close < open and
close < (high + low) / 2
// منع تكرار الإشارة داخل نفس المنطقة
newBullTouch = bullOBTouch and not bullOBTouch
newBearTouch = bearOBTouch and not bearOBTouch
var int lastSignalBar = na
cooldownOK =
na(lastSignalBar) or
bar_index - lastSignalBar >= cooldownBars
barConfirmed =
not confirmClose or
barstate.isconfirmed
buySignal =
newBullTouch and
bullTrendOK and
bullFibOK and
bullishCandle and
cooldownOK and
barConfirmed
sellSignal =
newBearTouch and
bearTrendOK and
bearFibOK and
bearishCandle and
cooldownOK and
barConfirmed
//=====================================================================
// خطوط وبيانات آخر صفقة
//=====================================================================
var line entryLine = na
var line tp1Line = na
var line tp2Line = na
var line slLine = na
var label entryLabel = na
var label tp1Label = na
var label tp2Label = na
var label slLabel = na
deleteTradeObjects() =>
if not na(entryLine)
line.delete(entryLine)
if not na(tp1Line)
line.delete(tp1Line)
if not na(tp2Line)
line.delete(tp2Line)
if not na(slLine)
line.delete(slLine)
if not na(entryLabel)
label.delete(entryLabel)
if not na(tp1Label)
label.delete(tp1Label)
if not na(tp2Label)
label.delete(tp2Label)
if not na(slLabel)
label.delete(slLabel)
//=====================================================================
// صفقة الشراء
//=====================================================================
if buySignal
lastSignalBar := bar_index
deleteTradeObjects()
float buyEntry = close
float buyTP1 = buyEntry + targetDistance
float buyTP2 = buyEntry + targetDistance * 2
float buySL = buyEntry - stopDistance
entryLine := line.new(
bar_index,
buyEntry,
bar_index + lineBars,
buyEntry,
color = color.blue,
width = 3
)
tp1Line := line.new(
bar_index,
buyTP1,
bar_index + lineBars,
buyTP1,
color = color.green,
width = 2,
style = line.style_dashed
)
tp2Line := line.new(
bar_index,
buyTP2,
bar_index + lineBars,
buyTP2,
color = color.green,
width = 2,
style = line.style_dashed
)
slLine := line.new(
bar_index,
buySL,
bar_index + lineBars,
buySL,
color = color.red,
width = 2,
style = line.style_dashed
)
entryLabel := label.new(
bar_index + lineBars,
buyEntry,
"دخول شراء " + str.tostring(buyEntry, format.mintick),
style = label.style_label_left,
color = color.blue,
textcolor = color.white
)
tp1Label := label.new(
bar_index + lineBars,
buyTP1,
"TP1 - 40 PIP " + str.tostring(buyTP1, format.mintick),
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
tp2Label := label.new(
bar_index + lineBars,
buyTP2,
"TP2 - 80 PIP " + str.tostring(buyTP2, format.mintick),
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
slLabel := label.new(
bar_index + lineBars,
buySL,
"SL " + str.tostring(buySL, format.mintick),
style = label.style_label_left,
color = color.red,
textcolor = color.white
)
//=====================================================================
// صفقة البيع
//=====================================================================
if sellSignal
lastSignalBar := bar_index
deleteTradeObjects()
float sellEntry = close
float sellTP1 = sellEntry - targetDistance
float sellTP2 = sellEntry - targetDistance * 2
float sellSL = sellEntry + stopDistance
entryLine := line.new(
bar_index,
sellEntry,
bar_index + lineBars,
sellEntry,
color = color.blue,
width = 3
)
tp1Line := line.new(
bar_index,
sellTP1,
bar_index + lineBars,
sellTP1,
color = color.green,
width = 2,
style = line.style_dashed
)
tp2Line := line.new(
bar_index,
sellTP2,
bar_index + lineBars,
sellTP2,
color = color.green,
width = 2,
style = line.style_dashed
)
slLine := line.new(
bar_index,
sellSL,
bar_index + lineBars,
sellSL,
color = color.red,
width = 2,
style = line.style_dashed
)
entryLabel := label.new(
bar_index + lineBars,
sellEntry,
"دخول بيع " + str.tostring(sellEntry, format.mintick),
style = label.style_label_left,
color = color.blue,
textcolor = color.white
)
tp1Label := label.new(
bar_index + lineBars,
sellTP1,
"TP1 - 40 PIP " + str.tostring(sellTP1, format.mintick),
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
tp2Label := label.new(
bar_index + lineBars,
sellTP2,
"TP2 - 80 PIP " + str.tostring(sellTP2, format.mintick),
style = label.style_label_left,
color = color.green,
textcolor = color.white
)
slLabel := label.new(
bar_index + lineBars,
sellSL,
"SL " + str.tostring(sellSL, format.mintick),
style = label.style_label_left,
color = color.red,
textcolor = color.white
)
//=====================================================================
// علامات الشراء والبيع
//=====================================================================
plotshape(
buySignal,
title = "شراء",
text = "شراء",
style = shape.labelup,
location = location.belowbar,
color = color.green,
textcolor = color.white,
size = size.small
)
plotshape(
sellSignal,
title = "بيع",
text = "بيع",
style = shape.labeldown,
location = location.abovebar,
color = color.red,
textcolor = color.white,
size = size.small
)
// علامات كسر الهيكل
plotshape(
bullishBreak,
title = "كسر مقاومة",
style = shape.circle,
location = location.belowbar,
color = color.new(color.green, 30),
size = size.tiny
)
plotshape(
bearishBreak,
title = "كسر دعم",
style = shape.circle,
location = location.abovebar,
color = color.new(color.red, 30),
size = size.tiny
)
//=====================================================================
// التنبيهات
//=====================================================================
alertcondition(
buySignal,
title = "ashknany.trading - شراء",
message = "إشارة شراء جديدة من مؤشر ashknany.trading"
)
alertcondition(
sellSignal,
title = "ashknany.trading - بيع",
message = "إشارة بيع جديدة من مؤشر ashknany.trading"
)
//=====================================================================
// اسم المؤشر في خلفية التشارت
//=====================================================================
var table watermark = table.new(
position.middle_center,
1,
1
)
if barstate.islast
table.cell(
watermark,
0,
0,
"ashknany.trading",
text_color = color.new(color.gray, 82),
text_size = size.huge,
bgcolor = color.new(color.white, 100)
) Indicator

TEWMA Adaptive Channel - [JTCAPITAL]TEWMA Adaptive Channel - is a modified way to use Weighted Moving Averages (WMA), Triple Exponential Moving Averages (TEMA), and Average True Range (ATR) for adaptive Trend-Following.
Instead of relying solely on a moving average to estimate trend direction, the indicator combines multiple layers of smoothing with volatility-adjusted boundaries to distinguish between ordinary price fluctuations and genuine momentum expansions. By requiring price to exceed an adaptive volatility threshold before establishing directional bias, the indicator aims to filter insignificant market noise while remaining responsive to meaningful changes in trend.
The result is an adaptive channel that not only reflects the current trend structure but also highlights moments where volatility expands enough to suggest the beginning or continuation of directional movement.
The indicator works by calculating in the following steps:
Source Selection
The script begins by selecting a price source. By default this is the closing price, although any TradingView supported source can be used, including Open, High, Low, HL2, HLC3, OHLC4 or any custom input.
Every calculation within the indicator originates from this selected source, allowing traders to tailor the responsiveness of the channel to their preferred price representation.
Weighted Moving Average Pre-Smoothing
Before calculating the final trend estimate, the selected source is first smoothed using a Weighted Moving Average (WMA).
Unlike a Simple Moving Average, which treats every observation equally, the WMA assigns progressively larger weights to more recent price data. This allows the average to respond faster to changing market conditions while still filtering a significant portion of short-term market noise.
The indicator calculates two independent WMAs:
• A primary WMA using the selected Length.
• A secondary WMA whose Length is automatically determined by multiplying the primary Length by the selected Multiplier.
Using two separate smoothing horizons allows the indicator to simultaneously observe both intermediate and broader market structure.
Triple Exponential Moving Average Processing
Each Weighted Moving Average is then processed using a Triple Exponential Moving Average (TEMA).
The purpose of TEMA is to dramatically reduce the lag normally associated with moving averages while maintaining smooth trend estimation.
Rather than simply averaging prices multiple times, TEMA mathematically combines several exponential averages in a way that removes much of the delay introduced by conventional smoothing techniques.
The result is two independent TEWMAs:
• A faster trend estimate.
• A slower trend estimate.
Each provides a different perspective on the underlying market direction.
Adaptive Trend Estimation
Instead of selecting either the fast or slow trend estimate individually, the script averages both together.
This creates the final TEWMA centerline.
Combining two smoothing horizons provides several advantages:
• Faster reaction than relying solely on a long-period average.
• Less sensitivity than relying only on a short-period average.
• Better stability during consolidations.
• Smoother representation of sustained directional movement.
The centerline therefore serves as the primary estimate of the underlying market trend.
Average True Range (ATR) Calculation
While the trend estimate is being constructed, the script also calculates the Average True Range (ATR).
ATR measures current market volatility by evaluating the True Range over the selected ATR Length.
Unlike indicators that only observe closing prices, ATR incorporates:
• Current High
• Current Low
• Previous Close
This enables volatility to be measured even when markets gap between candles.
Higher ATR values indicate expanding volatility, while lower values indicate quieter market conditions.
Adaptive Channel Construction
The ATR is multiplied by the selected Multiplier and added to both sides of the TEWMA centerline.
Upper Channel:
TEWMA + ATR × Multiplier
Lower Channel:
TEWMA − ATR × Multiplier
Unlike fixed-width envelopes, these boundaries continuously adapt to changing market conditions.
During volatile periods the channel naturally expands.
During quieter periods it contracts.
This adaptive behavior allows the indicator to maintain consistent sensitivity across different market environments.
Trend Confirmation Logic
Rather than determining trend direction simply by whether price is above or below the moving average, the indicator waits for price to demonstrate sufficient strength to move beyond the adaptive volatility envelope.
A close above the Upper Adaptive Channel confirms bullish momentum.
A close below the Lower Adaptive Channel confirms bearish momentum.
Once one of these conditions has been established, that directional bias remains active until price proves enough strength to invalidate it by exceeding the opposite side of the channel.
Because the trend state is preserved during ordinary pullbacks inside the channel, the indicator produces a much smoother representation of prevailing market direction and avoids unnecessary fluctuations caused by short-term noise.
Momentum Expansion Detection
Whenever price closes beyond either adaptive boundary, the corresponding channel immediately changes color.
These colored channel boundaries are not intended to signal overbought or oversold conditions.
Instead, they highlight moments where price has travelled beyond its statistically expected volatility range.
Such events frequently occur during:
• Breakout candles
• Strong trend continuation
• Volatility expansion
• Momentum acceleration
• Periods of increased market participation
Because the adaptive bands are volatility-adjusted, these highlighted moments naturally become rarer during quiet markets while remaining meaningful during highly active conditions.
Buy and Sell Conditions:
This indicator is designed as an adaptive trend-following framework rather than a fixed signal generator.
Instead of producing mechanical Buy and Sell arrows, it continuously evaluates whether market momentum is strong enough to establish or maintain a directional trend.
Bullish market conditions are identified when price successfully closes above the Upper Adaptive Channel. This indicates that buying pressure has expanded beyond recent normal volatility and confirms bullish directional strength. Once confirmed, the TEWMA centerline represents this bullish market bias until sufficient bearish momentum develops.
Bearish market conditions are identified when price closes below the Lower Adaptive Channel. This reflects selling pressure strong enough to exceed recent market volatility and establishes a bearish directional bias that remains active until the opposite condition occurs.
Because ordinary pullbacks inside the adaptive channel do not immediately alter the prevailing trend, the indicator naturally filters much of the short-term market noise that frequently causes false directional changes in conventional moving average systems.
Additional confirmation can always be incorporated using tools such as RSI, MACD, ADX, Volume, Higher Timeframe analysis, Price Action, or Market Structure depending on individual trading style.
Features and Parameters:
Source
Selects the price series used throughout every calculation.
Length
Determines the primary smoothing period used for the first Weighted Moving Average and TEMA calculation.
Multiplier
Controls two adaptive mechanisms simultaneously:
Determines the secondary smoothing period.
Determines the width of the ATR channel.
Automatic Dual-Length Trend Estimation
Creates a second smoothing period automatically by multiplying the primary Length with the selected Multiplier, allowing the indicator to blend both intermediate and longer-term market structure.
ATR Length
Determines the sensitivity of volatility measurements.
Adaptive Volatility Channel
Expands automatically during volatile markets.
Contracts automatically during quieter markets.
Persistent Trend Detection
Maintains the prevailing directional bias until an opposing volatility-confirmed breakout occurs, reducing unnecessary trend reversals during temporary retracements.
Momentum Expansion Visualization
Highlights periods where price exceeds its adaptive volatility envelope, drawing attention to moments of exceptional directional strength.
Specifications:
Weighted Moving Average (WMA)
The Weighted Moving Average is a price smoothing technique that places progressively greater emphasis on the most recent observations while still incorporating historical price data.
Compared to a Simple Moving Average, this produces a faster response to changing market conditions without sacrificing the overall stability of the trend estimate.
Within this indicator, the WMA serves as the initial smoothing stage before the more advanced Triple Exponential calculations are performed.
Triple Exponential Moving Average (TEMA)
The Triple Exponential Moving Average was specifically developed to minimize one of the largest weaknesses of traditional moving averages: lag.
Rather than simply averaging prices repeatedly, TEMA combines multiple exponential calculations in a mathematical way that significantly reduces delay while maintaining smooth trend estimation.
This allows the indicator to remain responsive during changing market conditions without becoming excessively sensitive to short-term fluctuations.
Dual Adaptive Trend Estimation
One of the defining characteristics of this indicator is that it does not rely upon a single smoothing horizon.
Instead, it combines both a faster and slower TEWMA into one balanced trend estimate.
This provides a centerline capable of reacting to developing market conditions while still filtering much of the erratic behavior commonly associated with shorter moving averages.
The result is a smoother and more reliable representation of the prevailing market direction.
Average True Range (ATR)
Average True Range is one of the most widely recognized volatility measurements in technical analysis.
Rather than measuring whether price is bullish or bearish, ATR measures the magnitude of price movement.
By incorporating both intraday movement and overnight price gaps, ATR provides a realistic estimate of current market volatility that continuously adapts as conditions change.
Adaptive Volatility Channels
The upper and lower channel boundaries are constructed by adding and subtracting an ATR-based volatility measurement from the TEWMA centerline.
Unlike static envelopes, these bands constantly adjust their width according to prevailing market conditions.
This allows the channel to remain proportionate regardless of whether markets are experiencing low-volatility consolidation or high-volatility expansion.
Trend Confirmation
The indicator uses the adaptive channel as a confirmation mechanism rather than allowing minor fluctuations around the moving average to dictate trend direction.
By requiring price to exceed the adaptive volatility threshold before establishing a directional bias, the indicator focuses on movements that demonstrate sufficient conviction to stand out from normal market behavior.
This approach significantly reduces frequent directional changes during ranging markets while preserving responsiveness during genuine trend development.
Momentum Expansion
When price moves beyond either adaptive channel boundary, it has exceeded what recent volatility would generally consider normal price behavior.
These moments often coincide with expanding participation, increasing momentum and stronger directional conviction.
Rather than predicting reversals or guaranteeing continuation, the adaptive channel simply highlights that the market is currently experiencing an unusually energetic price movement relative to its recent volatility profile.
Persistent Trend Representation
The TEWMA centerline serves as a continuously updated representation of the prevailing market bias.
Because the underlying trend state only changes after price has demonstrated sufficient strength to exceed the adaptive channel in the opposite direction, temporary retracements and ordinary market noise have less influence on the overall trend indication.
This allows traders to focus on the broader directional structure instead of reacting to every short-lived fluctuation.
Combining Trend and Volatility
One of the primary strengths of this indicator lies in the combination of adaptive smoothing with adaptive volatility.
The TEWMA centerline estimates the underlying direction of the market, while the ATR channel continuously evaluates whether price movement possesses enough momentum to confirm that direction.
By combining these two independent measurements, the indicator delivers a framework that simultaneously monitors trend, volatility, momentum, and market structure, making it particularly effective across a wide variety of market conditions while remaining intuitive to interpret. Indicator

Indicator

TrendGrade Buy Sell SignalsTrendGrade — Buy & Sell Signals (MTF Confirmed)
What it does
TrendGrade is a signal-grading system built on top of a Supertrend trigger. Instead of treating every Supertrend flip as an equal trade opportunity, it classifies each buy signal by quality using trend-strength analysis (XTL), higher-timeframe confirmation, and a transparent rule-based priority score. It is designed primarily for intraday swing timeframes (e.g., 2H) with 4H confirmation and an optional Daily veto.
How it works
1. Base trigger — Supertrend
The entry engine is the classic ATR-based Supertrend (default ATR 14, multiplier 2.0). A buy setup appears when the trend flips from bearish to bullish; a sell setup appears on the opposite flip.
2. Signal grading — XTL (eXpert Trend Locator)
XTL is based on Tom Joseph's statistical concept for separating directional moves from random market noise, implemented here via a Double-CCI-style calculation with a selectable moving-average engine (28 MA types, default VWMA-26 on HLC3) and a fixed threshold (default 37).
XTL above the threshold = BULL environment
XTL below the negative threshold = BEAR environment
Otherwise = NEUTRAL
Optional bar coloring paints candles by XTL state (bull / neutral / bear).
3. Multi-timeframe confirmation (anti-repaint)
4H confirmation: close above the 4H EMA-21, EMA slope flat or rising, plus an optional RSI(14) momentum check (RSI > 50 or rising).
Daily veto (optional): if the Daily close is below its EMA-21 AND the EMA slope is down (strong downtrend), all buy signals are blocked. Blocked signals are still shown on the chart as an orange × for transparency.
By default only closed higher-timeframe bars are used (`lookahead_off` + confirmed-bar indexing), so MTF confirmation does not repaint. This can be disabled for faster (but mutable) live-bar confirmation.
4. Signal classes
STRONG BUY — Supertrend flip + XTL BULL + 4H confirmation (lime label)
BUY — Supertrend flip without full confirmation (green label)
SELL — Supertrend flip down, only fired if a valid buy occurred first (simple position tracking, so sells are not orphaned)
Filtered/blocked raw signals are plotted as gray circles or orange × marks so you can always see what was suppressed and why.
5. Optional EMA-89 filter
Buy signals can additionally be required to close above EMA-89 (with an adjustable % tolerance). Off by default.
6. Priority score (0–100)
Each signal gets a transparent, rule-based score from RSI, MFI, relative volume, EMA ribbon alignment (5/8/13/34/55/89/200), Parabolic SAR position and CMF. This is a simple checklist score — it is NOT a statistical probability.
7. Alerts & webhook automation
Standard `alertcondition()` alerts for Strong Buy / Buy / Sell / trend change.
A structured JSON alert (via `alert()`) designed for webhook automation (e.g., Make.com / n8n): symbol, timeframe, price, ATR-based Target-1/Target-2, Supertrend stop, R:R ratio, priority score, XTL state, 4H/Daily MTF status, RSI/MFI/CMF, relative volume, EMA support/resistance map, and flags such as "volume spike" (relative volume ≥ 3×) and "strong money inflow" (CMF ≥ 0.15).
Optional early intrabar alert: fires before bar close once a configurable percentage of the bar has elapsed (default 60%), clearly tagged `early_mode=1`. Early alerts can be invalidated before the bar closes (repaint risk is explicitly flagged); the confirmed bar-close alert is always sent separately.
Settings overview
Supertrend: ATR period, multiplier, source, ATR method
XTL: length, MA type (28 options), source, threshold, traditional/modern CCI formula
MTF: confirmation timeframe (default 4H), veto timeframe (default 1D), EMA length, slope lookback, momentum check, closed-bar mode
EMA-89 filter, EMA ribbon display, Parabolic SAR display
Targets: ATR multiples for Target-1 / Target-2 (used in alert messages)
Oscillators/volume lengths and attention thresholds (used in alert messages)
Early-signal toggle and minimum bar progress
Repainting notes
Confirmed signals are evaluated on bar close.
MTF data uses `lookahead_off` and, by default, the last closed higher-timeframe bar, so confirmation status does not change retroactively (at the cost of up to one higher-timeframe bar of delay).
The optional early intrabar alert is intentionally repainting by nature and is clearly labeled as a pre-warning; the final confirmation is always sent at bar close.
Credits
XTL (eXpert Trend Locator) concept by Tom Joseph — a statistical market evaluation distinguishing directional trends from random noise.
XTL implementation adapted from the public "Double CCI" approach on TradingView.
Supertrend logic based on the widely used ATR-based community implementation.
Moving-average library includes public implementations credited in-code to @everget (JMA), @DonovanWall (FRAMA, COVWMA), @allanster (VAMA), @RedKTrader (RSS_WMA), @Duyck (ADX MA) and @glaz (RSI EMA).
Disclaimer
This indicator is for educational and informational purposes only. It is not financial advice and past signal behavior does not guarantee future results. Always do your own research and manage risk appropriately. Indicator

Indicator

JMJ SNIPER-7X - Jai Mata Ji Institutional PCR, Max Pain and DXY JMJ SNIPER-7X is a 7-point intraday decision dashboard for Indian markets (NIFTY, BANKNIFTY, stocks, MCX metals). You enter 3 values from the NSE option chain (Current PCR, Morning PCR, Max Pain strike); every other layer is automatic.
THE 7 POINTS: (1) Asset Status. (2) Smart Money Zone from fixed PCR bands: above 1.60 overbought, 1.20-1.50 bullish, 0.90-1.10 no-trade, 0.50-0.80 bearish, below 0.40 oversold, plus transition bands. (3) PCR Pulse: intraday shift vs your 09:30 baseline reading. (4) Max Pain magnet line with live distance from price. (5) Trap Finder: price-vs-PCR divergence measured from the same 09:30 baseline. (6) Global X-Ray: automatic US Dollar Index (DXY) trend filter using confirmed previous-day daily values (non-repainting); DXY rising is a headwind for Indian equities and commodities. (7) Sniper Verdict: mechanical STRONG BUY / STRONG SELL / ARMED / TRAP / NO TRADE, firing only on a confirmed Darvas box breakout close.
ENGINE: startup-safe one-shot Darvas box (one signal per box, no repeats on recrosses), India VIX filter that blocks fresh signals when hot, fail-closed data checks (missing DXY/VIX data blocks signals instead of allowing them), ATR-based stop-loss and target labels, and 4 ready-made alert conditions.
NOTES: TradingView has no NSE option-chain feed, so PCR and Max Pain are manual inputs. In the default Live-only mode, signals fire only on confirmed realtime bars and historical bars are never painted with today's PCR (no fake backtest). Recreate alerts after changing inputs. Works best on 5m/15m standard candles, 1D or lower.
Educational tool only - not financial advice. Jai Mata Ji. Indicator

Indicator

Session IB Confluence CockpitClearance turns the Initial Balance of each trading session into a clear go / wait / no-go decision. Instead of stacking indicators and eyeballing confluence, you get one verdict panel that weighs six independent conditions and tells you — in plain language — whether the current break is worth taking, and exactly where entry, stop and targets sit.
How it works
Every session (Asia, London, New York) builds its own Initial Balance from the first 30 minutes, its own volume profile, and its own set of levels. When price closes outside the IB, Clearance evaluates the break against six conditions and shows the result as a traffic light:
GREEN — cleared. The break is with the trend, through thin volume, and unobstructed toward target.
YELLOW — wait. A break formed, but something's missing — the panel names exactly what (e.g. a POC magnet in the way, or a neutral trend).
RED — no trade. Price is still inside the IB, or the break fights the trend.
The six conditions
IB break — price has closed outside the Initial Balance
EMA trend — the break is aligned with the 20/50/200 trend
LVN break — price cleared a low-volume node (thin = fast)
VA acceptance — close beyond the value area, not just a spike
No POC magnet — no high-volume node braking the move before T1
R:R ≥ 1.0 — the trade geometry is worth it
GREEN requires the trend and the IB break as hard conditions, plus at least five of six overall — so signals are selective by design.
What you get on the chart
Multi-session IB with mid and ±50% / ±100% extension targets
Per-session volume profile: POC, Value Area (VAH/VAL) and LVN zones, with a clean grayscale histogram that highlights the POC and fades the tails
EMA 20/50/200 trend filter
Automatic entry / stop / target levels with live R-multiples, marked by a circle on the signal candle
Sweep (FBR) markers when price takes out IB or prior-day levels and closes back
A rolling stats read on how often the current break scenario reaches its first extension
Full session history — scroll back and study previous sessions with all their levels intact
Instrument presets for OMX, DAX and NQ (or set your own times manually)
Settings
Everything is adjustable: IB length, value-area %, LVN threshold, profile resolution, how many sessions stay on the chart, dimming of older sessions, colors, and toggles for every visual element. Alerts fire on GREEN long and short.
Notes
Session presets are defined in Central European Time — keep the timezone on Europe/Stockholm. On instruments that report tick volume (e.g. IG cash indices) the profile shape and CVD are tick-based; use them for structure, not absolute contract volume.
This tool is for market analysis and education. It does not predict price and is not financial advice. Always manage your own risk. Indicator
