Gaussian ChannelGaussian channel indicator that gets increasingly opaque depending how many sigma price is from its mean
Penunjuk dan strategi
Labden Buy/Sell V1.0Based on the semafor dot indicator, emas, hull moving average RSI, and more. best for trend following / momentum trading and reversals
Donchian Predictive Channel (Zeiierman)█ Overview
Donchian Predictive Channel (Zeiierman) extends the classic Donchian framework into a predictive structure. It does not just track where the range has been; it projects where the Donchian mid, high, and low boundaries are statistically likely to move based on recent directional bias and volatility regime.
By quantifying the linear drift of the Donchian midline and the expansion or compression rate of the Donchian range, the indicator generates a forward propagation cone that reflects the prevailing trend and volatility state. This produces a cleaner, more analytically grounded projection of future price corridors, and it remains fully aligned with the signal precision of the underlying Donchian logic.
█ How It Works
⚪ Donchian Core
The script first computes a standard Donchian Channel over a configurable Length:
Upper Band (dcHi) – highest high over the lookback.
Lower Band (dcLo) – lowest low over the lookback.
Midline (dcMd) – simple midpoint of upper and lower: (dcHi + dcLo)/ 2.
f_getDonchian(length) =>
hi = ta.highest(high, length)
lo = ta.lowest(low, length)
md = (hi + lo) * 0.5
= f_getDonchian(lenDC)
⚪ Slope Estimation & Range Dynamics
To turn the Donchian Channel into a predictive model, the script measures how both the midline and the range are changing over time:
Midline Slope (mSl) – derived from a 1-bar difference in linear regression of the midline.
Range Slope (rSl) – derived from a 1-bar difference in linear regression of the Donchian range (dcHi − dcLo).
This pair describes both directional drift (uptrend vs. downtrend) and range expansion/compression (volatility regime).
f_getSlopes(midLine, rngVal, length) =>
mSl = ta.linreg(midLine, length, 0) - ta.linreg(midLine, length, 1)
rSl = ta.linreg(rngVal, length, 0) - ta.linreg(rngVal, length, 1)
⚪ Forward Projection Engine
At the last bar, the indicator constructs a set of forward points for the mid, upper, and lower projections over Forecast Bars:
The midline is projected linearly using the midline slope per bar.
The range is adjusted using the range slope per bar, creating either a widening cone (expansion) or a tightening cone (compression).
Upper and lower projections are then anchored around the projected midline, with logic that keeps the structure consistent and prevents pathological flips when slope changes sign.
f_generatePoints(hi0, md0, lo0, steps, midSlp, rngSlp) =>
upPts = array.new()
mdPts = array.new()
dnPts = array.new()
fillPts = array.new()
hi_vals = array.new_float()
md_vals = array.new_float()
lo_vals = array.new_float()
curHiLocal = hi0
curLoLocal = lo0
curMidLocal = md0
segBars = math.floor(steps / 3)
segBars := segBars < 1 ? 1 : segBars
for b = 0 to steps
mdProj = md0 + midSlp * b
prevRange = curHiLocal - curLoLocal
rngProj = prevRange + rngSlp * b
hiTemp = 0.0
loTemp = 0.0
if midSlp >= 0
hiTemp := math.max(curHiLocal, mdProj + rngProj * 0.5)
loTemp := math.max(curLoLocal, mdProj - rngProj * 0.5)
else
hiTemp := math.min(curHiLocal, mdProj + rngProj * 0.5)
loTemp := math.min(curLoLocal, mdProj - rngProj * 0.5)
hiProj = hiTemp < mdProj ? curHiLocal : hiTemp
loProj = loTemp > mdProj ? curLoLocal : loTemp
if b % segBars == 0
curHiLocal := hiProj
curLoLocal := loProj
curMidLocal := mdProj
array.push(hi_vals, curHiLocal)
array.push(md_vals, curMidLocal)
array.push(lo_vals, curLoLocal)
array.push(upPts, chart.point.from_index(bar_index + b, curHiLocal))
array.push(mdPts, chart.point.from_index(bar_index + b, curMidLocal))
array.push(dnPts, chart.point.from_index(bar_index + b, curLoLocal))
ptSet.new(upPts, mdPts, dnPts)
⚪ Rejection Signals
The script also tracks failed Donchian breakouts and marks them as potential reversal/reversion cues:
Signal Down: Triggered when price makes an attempt above the upper Donchian band but then pulls back inside and closes above the midline, provided enough bars have passed since the last signal.
Signal Up: Triggered when price makes an attempt below the lower Donchian band but then snaps back inside and closes below the midline, also requiring sufficient spacing from the previous signal.
// Base signal conditions (unfiltered)
bearCond = high < dcHi and high >= dcHi and close > dcMd and bar_index - lastMarker >= lenDC
bullCond = low > dcLo and low <= dcLo and close < dcMd and bar_index - lastMarker >= lenDC
// Apply MA filter if enabled
if signalfilter
bearCond := bearCond and close < ma // Bearish only below MA
bullCond := bullCond and close > ma // Bullish only above MA
signalUp := false
signalDn := false
if bearCond
lastMarker := bar_index
signalDn := true
if bullCond
lastMarker := bar_index
signalUp := true
█ How to Use
The Donchian Predictive Channel is designed to outline possible future price trajectories. Treat it as a directional guide, not a fixed prediction tool.
⚪ Map Future Support & Resistance
Use the projected upper and lower paths as dynamic future reference levels:
Projected upper band ≈ is likely a resistance corridor if the current trend and volatility persist.
Projected lower band ≈ likely support corridor or expected downside range.
⚪ Trend Path & Volatility Cone
Because the projection is driven by midline and range slopes, the channel behaves like a trend + volatility cone:
Steep positive midline slope + expanding range → accelerating, high-volatility trend.
Flat midline + compressing range → coiling/contracting regime ahead of potential expansion.
This helps you distinguish between a gentle drift and an aggressive move that likely needs more risk buffer.
⚪ Reversion & Rejection Signals
The Donchian-based signals are especially useful for mean-reversion and fade-style trades.
A Signal Down near the upper band can mark a failed breakout and a potential rotation back toward the midline or the lower projected band.
A Signal Up near the lower band can flag a failed breakdown and a potential snap-back up the channel.
When Filter Signals is enabled, these signals are only generated when they align with the chart’s directional bias as defined by the moving average. Bullish signals are allowed only when the price is above the MA, and bearish signals only when the price is below it.
This reduces noise and helps ensure that reversions occur in harmony with the prevailing trend environment.
█ Settings
Length – Donchian lookback length. Higher values produce a smoother channel with fewer but more stable signals. Lower values make the channel more reactive and increase sensitivity at the cost of more noise.
Forecast Bars – Number of bars used for projecting the Donchian channel forward.
Higher values create a broader, longer-term projection. Lower values focus on short-horizon price path scenarios.
Filter Signals – Enables directional filtering of Donchian signals using the selected moving average. When ON, bullish signals only trigger when the price is above the MA, and bearish signals only trigger when the price is below it. This helps reduce noise and aligns reversions with the broader trend context.
Moving Average Type – The type of moving average used for signal filtering and optional plotting.
Choose between SMA, EMA, WMA, or HMA depending on desired responsiveness. Faster averages (EMA, HMA) react quickly, while slower ones (SMA, WMA) smooth out short-term noise.
Moving Average Length – Lookback length of the moving average. Higher values create a slower, more stable trend filter. Lower values track price more tightly and can flip the directional bias more frequently.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Alg0 ۞ Hal0 Triple EMA BlastFully customizable and stand-alone comprehensive indicator for scalping and short-term trading.
Cheers!
A۞H
FVG 3 Candle Detector with Liqui Levels# FVG 3 Candle Detector with Liqui Levels - TradingView Description
---
## 🇬🇧 ENGLISH
### Short Description
Detects Fair Value Gaps (FVGs) after Liquidity Sweeps on multiple timeframes. Combines ICT concepts with Smart Money trading strategies.
### Full Description
**FVG 3 Candle Detector with Liqui Levels** automatically identifies high-probability trading setups by detecting Swing Highs/Lows across three customizable timeframes and drawing Fair Value Gaps after liquidity breaks.
#### 🎯 Key Features
**Multi-Timeframe Swing Detection**
- Real 3-candle swing formation detection (pivot surrounded by lower highs / higher lows)
- Three fully customizable timeframes (default: 5min, 15min, 60min)
- Automatic timeframe hierarchy: higher timeframe always takes priority
**Smart FVG Detection**
- Only draws FVGs in the correct direction after a liquidity sweep
- After High Break → Only bearish FVGs
- After Low Break → Only bullish FVGs
- Customizable number of FVGs per timeframe
**Visual Clarity**
- Color-coded by timeframe (default: Blue/Green/Orange)
- Lines extend until broken by price
- Mitigated levels shown transparently
#### ⚙️ Settings
- **Timeframes:** Freely selectable (e.g., 1min, 5min, 15min, 1H, 4H)
- **Colors:** Customizable per timeframe
- **FVG Count:** Set how many FVGs to draw after each break
- **Mitigation:** Choose between Wick or Close
#### 📈 Best Used On
- Lower timeframes (30s, 1min) for precise entries
- Works on all instruments (Forex, Crypto, Stocks, Futures)
#### 💡 Trading Logic
1. Wait for a swing level to be swept (liquidity grab)
2. Look for FVG formation in the opposite direction
3. Enter on FVG for reversal trade
---
Z-Fusion Oscillator | Lyro RSThe Z-Fusion Oscillator converts five momentum indicators into Z-scores and blends them into one normalized signal that adapts across markets.
By combining normalization, smoothing, and divergence detection, users can easily identify when momentum is accelerating, weakening, reversing, or entering extreme zones
🔶 USAGE
The Z-Fusion Oscillator is designed to give traders a unified reading of market momentum—removing the noise of comparing tools that normally run on different scales.
By transforming RSI, MACD histogram, Stochastic, Momentum, and Rate of Change into Z-scores, this tool standardizes all inputs, making trend strength and shifts easier to interpret.
A dual-line system (fast Z-fusion line + slower baseline) highlights turning points, while overbought/oversold bands and “X-marks” help traders spot exhaustion and potential reversals.
🔹 Unified Momentum Structure
The indicator’s core strength comes from combining five Z-scored signals into one average.
Which makes momentum behavior more consistent across assets, reduces false extremes, and highlights true shifts in trend conviction.
🔹 Divergence Detection
The tool includes fully integrated divergence detection:
Regular Bullish Divergence: Price makes a lower low while Z-Fusion forms a higher low.
Regular Bearish Divergence: Price makes a higher high while Z-Fusion forms a lower high
Bullish and bearish divergences are marked directly on the oscillator with labels and colored pivot connections, making hidden momentum shifts obvious.
🔹 Visual Extremes
Two sets of upper and lower Z-score thresholds help identify:
Extreme overbought surges
Extreme oversold drops
Reversal zones
Potential exhaustion conditions
Background coloring reinforces when the oscillator moves beyond major levels, helping traders quickly assess momentum pressure.
🔹 Detecting Momentum Anomalies
Z-scores allow the oscillator to highlight when market momentum behaves abnormally relative to its own recent history.
For example:
The oscillator reaching +1 or –1 after an extended trend may indicate a climax.
A sharp Z-score reversal within an extreme zone can signal a trend exhaustion or a corrective move.
Divergences often appear earlier due to normalization smoothing out indicator noise.
This makes the Z-Fusion Oscillator particularly useful for spotting subtle shifts in trend direction that traditional indicators may miss.
🔶 DETAILS
🔹 Composite Z-Score Framework
Each momentum tool is smoothed, normalized, and transformed:
RSI → EMA-smoothed, Z-scored
MACD histogram → Z-scored
Stochastic → EMA + SMA smoothing, then Z-scored
Momentum → EMA-smoothed, Z-scored
Rate of Change → EMA-smoothed, Z-scored
These are averaged into one composite Z-score to provide a consistent reading across assets and market conditions.
🔹 Fusion Trend Lines
Two lines serve as the core signal:
Fast Line (savg) – reacts quicker to trend changes
Slow Line (savg2) – acts as a baseline filter
Crossovers between these lines highlight momentum shifts, while their color reflects trend bias.
🔹 Overbought/Oversold Zones
Two upper and two lower Z-score thresholds define “zones”:
Upper zones highlight overheated momentum or potential bearish reversals
Lower zones highlight depressed momentum or potential bullish reversals
Filled regions and background colors help visually confirm extreme conditions.
🔹 Pivot-Based Divergence Engine
The script includes filtered pivot detection with customizable look-backs and range limits to ensure divergences are meaningful, not noise-driven.
🔶 SETTINGS
🔹 Indicator Settings
Source — Price series used for all calculations.
Z-Score Length — Lookback period for Z-score normalization.
Z-Score MA Length — Smoothing length for the fusion signal lines.
Overbought/Oversold Levels — Four customizable threshold lines.
Color Palette — Choose from preset themes or define custom colors.
🔹 RSI
Length — RSI calculation period.
EMA Smoothing Length — Smooths RSI before Z-score conversion.
🔹 MACD
Fast Length — Fast EMA length.
Slow Length — Slow EMA length.
Signal Line Length — MACD signal smoothing.
🔹 Stochastic
%K Length — Main stochastic length.
EMA Smoothing — Smooths %K for stability.
%D Length — Smoothing for the signal line.
🔹 Momentum
Length — Momentum lookback.
EMA Smoothing — Smooths momentum before Z-scoring.
🔹 Rate of Change
Length — ROC lookback.
EMA Smoothing — Smooths ROC values.
🔹 Divergence
Enable/Disable Divergence Detection — Toggle divergence engine.
Pivot Left/Right Lookback — Defines pivot detection sensitivity.
Detection Range Limits — Controls allowable range for divergence.
Bull/Bear Colors & Styling — Customize divergence visualization.
🔶 SUMMARY
The Z-Fusion Oscillator combines multiple momentum signatures into a single normalized signal, enabling traders to:
Identify reversals early
Detect momentum exhaustion
Spot bullish and bearish divergences
Track overbought/oversold conditions
Visualize trend strength with clarity
Whether you're a swing trader, intraday analyst, or trend-reversal hunter, the Z-Fusion Oscillator provides a powerful and adaptive way to read momentum.
8FigRenko – Precision FVG Zones8FigRenko – Pure FVG Zones is a clean, reliable Fair Value Gap tool designed for traders who want accurate FVG zones only from the chart timeframe — without repainting, without higher-timeframe complications, and without messy borders.
This script is built for traders who want simple, precise, and visually clean imbalance zones that work the way FVGs should work:
🔥 Features
✔ Chart-timeframe FVGs only
No request.security, no multi-TF artifacts, no lagging or repainting.
The script reads exactly what your chart shows and never mixes timeframes.
✔ Wick-based or Body-based detection
Use classic ICT wick gaps, or switch to body-only gaps with one click.
✔ Minimum FVG size (points)
Filters out noise by requiring a minimum point distance (default: 5 points).
Great for futures and fast intraday charts.
✔ Clean, seamless boxes (no borders)
The FVG zones are rendered with borderless boxes, matching the modern style shown in institutional imbalance tools.
✔ Proper “end-to-end” FVG drawing
Each gap box starts from the origin of the imbalance and extends forward automatically.
✔ Auto-disrespect removal
FVGs are automatically deleted when price invalidates the zone:
Bullish FVG removed if close < FVG low
Bearish FVG removed if close > FVG high
No clutter. No manual cleanup.
✔ Extend zones forever or to the current bar
Choose if your FVGs run across the full future chart or just up to the latest candle.
✔ Optional: show only most recent FVG
Great for scalping or IFV (Immediate Fair Value) strategies.
coinjin 정·역배열 대시보드 (Progress+Events)This script analyzes trend alignment using the 5 / 20 / 60 / 112 / 224 / 448 / 896 SMAs,
providing highly precise detection of bullish and bearish stack conditions,
and identifies 12 advanced trend-reversal signals through a multi-timeframe dashboard.
이 스크립트는 5 / 20 / 60 / 112 / 224 / 448 / 896 SMA 기준으로
정배열·역배열 상태를 매우 정교하게 분석하고,
12가지 고급 추세 전환 시그널을 자동 탐지하는 멀티타임프레임 대시보드입니다.
Swing High-Low Line ConnectorSwing High-Low Line Connector is a simple and intuitive tool that automatically detects swing highs and swing lows using fractal-style pivot logic and connects them with clean, continuous lines. This indicator helps traders visualize market structure, trend shifts, and swing-based support/resistance levels at a glance.
The script identifies each confirmed swing point based on a user-defined lookback window (left/right bars). When a new swing is confirmed, the indicator updates the previous leg or creates a new one, effectively drawing the classic “zigzag-style” connections used in discretionary trading and price-action analysis.
A dynamic tail extension is included to show the most recent swing extending toward the current price. By default, the tail follows a ZigZag-style logic—extending upward after a swing low and downward after a swing high—but users can also anchor it to Close, High, Low, or HL2.
Features
Automatic detection of swing highs and swing lows
Clean line connections between swings (similar to discretionary market-structure mapping)
Proper consolidation handling: weaker highs/lows are ignored
Optional ZigZag-style dynamic tail extension
Fully customizable lookback window, line color, and line width
Works on any market and timeframe
Use Cases
Identifying market structure (HH, HL, LH, LL)
Visualizing trend transitions
Spotting breakout levels and swing-based support/resistance
Aiding discretionary swing trading, trend following, or pattern recognition
This indicator keeps the logic simple and visual—ideal for traders who prefer clean chart structure without unnecessary noise.
flotschgee gorge PDH/LBased on "PDHL Sweep + C123 (by Veronica)" but it shows the respective PDH/L for every day of the last week
Thi Cloud EMA SystemThis is a spinoff of the Ripster's cloud system.
I altered it in order to be more accurate using the 5 min candle instead of the 10
FVG – (auto close + age) GR V1.0FVG – Fair Value Gaps (auto close + age counter)
Short Description
Automatically detects Fair Value Gaps (FVGs) on the current timeframe, keeps them open until price fully fills the gap or a maximum bar age is reached, and shows how many candles have passed since each FVG was created.
Full Description
This indicator automatically finds and visualizes Fair Value Gaps (FVGs) using the classic 3-candle ICT logic on any timeframe.
It works on whatever timeframe you apply it to (M1, M5, H1, H4, etc.) and adapts to the current chart.
FVG detection logic
The script uses a 3-candle pattern:
Bullish FVG
Condition:
low > high
Gap zone:
Lower boundary: high
Upper boundary: low
Bearish FVG
Condition:
high < low
Gap zone:
Lower boundary: high
Upper boundary: low
Each detected FVG is drawn as a colored box (green for bullish, red for bearish in this version, but you can adjust colors in the inputs).
Auto-close rules
An FVG remains on the chart until one of the following happens:
Full fill / mitigation
A bullish FVG closes when any candle’s low goes down to or below the lower boundary of the gap.
A bearish FVG closes when any candle’s high goes up to or above the upper boundary of the gap.
Maximum bar age reached
Each FVG has a maximum lifetime measured in candles.
When the number of candles since its creation reaches the configured maximum (default: 200 bars), the FVG is automatically removed even if it has not been fully filled.
This keeps the chart cleaner and prevents very old gaps from cluttering the view.
Age counter (labels inside the boxes)
Inside every FVG box there is a small label that:
Shows how many bars have passed since the FVG was created.
Moves together with the right edge of the box and stays vertically centered in the gap.
This makes it easy to distinguish fresh gaps from older ones and prioritize which zones you want to pay attention to.
Inputs
FVG color – Main fill color for all FVG boxes.
Show bullish FVGs – Turn bullish gaps on/off.
Show bearish FVGs – Turn bearish gaps on/off.
Max bar age – Maximum number of candles an FVG is allowed to stay on the chart before it is removed.
Usage
Works on any symbol and any timeframe.
Can be combined with your own ICT / SMC concepts, order blocks, session ranges, market structure, etc.
You can also choose to only display bullish or only bearish FVGs depending on your directional bias.
Disclaimer
This script is for educational and informational purposes only and is not financial advice. Always do your own research and use proper risk management when trading.
SMC BOS/CHoCH + Auto Fib (5m/any TF) durane//@version=6
indicator('SMC BOS/CHoCH + Auto Fib (5m/any TF)', overlay = true, max_lines_count = 200, max_labels_count = 200)
// --------- Inputs ----------
left = input.int(3, 'Pivot Left', minval = 1)
right = input.int(3, 'Pivot Right', minval = 1)
minSwingSize = input.float(0.0, 'Min swing size (price units, 0 = disabled)', step = 0.1)
fib_levels = input.string('0.0,0.236,0.382,0.5,0.618,0.786,1.0', 'Fibonacci levels (comma separated)')
show_labels = input.bool(true, 'Show BOS/CHoCH labels')
lookbackHighLow = input.int(200, 'Lookback for structure (bars)')
// Parse fib levels
strs = str.split(fib_levels, ',')
var array fibs = array.new_float()
if barstate.isfirst
for s in strs
array.push(fibs, str.tonumber(str.trim(s)))
// --------- Find pivot highs / lows ----------
pHigh = ta.pivothigh(high, left, right)
pLow = ta.pivotlow(low, left, right)
// store last confirmed swings
var float lastSwingHighPrice = na
var int lastSwingHighBar = na
var float lastSwingLowPrice = na
var int lastSwingLowBar = na
if not na(pHigh)
// check min size
if minSwingSize == 0 or pHigh - nz(lastSwingLowPrice, pHigh) >= minSwingSize
lastSwingHighPrice := pHigh
lastSwingHighBar := bar_index - right
lastSwingHighBar
if not na(pLow)
if minSwingSize == 0 or nz(lastSwingHighPrice, pLow) - pLow >= minSwingSize
lastSwingLowPrice := pLow
lastSwingLowBar := bar_index - right
lastSwingLowBar
// --------- Detect BOS & CHoCH (simple robust logic) ----------
var int lastBOSdir = 0 // 1 = bullish BOS (price broke above), -1 = bearish BOS
var int lastBOSbar = na
var float lastBOSprice = na
// Look for price closes beyond last structural swings within lookback
// Bullish BOS: close > recent swing high
condBullBOS = not na(lastSwingHighPrice) and close > lastSwingHighPrice and bar_index - lastSwingHighBar <= lookbackHighLow
// Bearish BOS: close < recent swing low
condBearBOS = not na(lastSwingLowPrice) and close < lastSwingLowPrice and bar_index - lastSwingLowBar <= lookbackHighLow
bosTriggered = false
chochTriggered = false
if condBullBOS
bosTriggered := true
if lastBOSdir != 1
// if previous BOS direction was -1, this is CHoCH (change of character)
chochTriggered := lastBOSdir == -1
chochTriggered
lastBOSdir := 1
lastBOSbar := bar_index
lastBOSprice := close
lastBOSprice
if condBearBOS
bosTriggered := true
if lastBOSdir != -1
chochTriggered := lastBOSdir == 1
chochTriggered
lastBOSdir := -1
lastBOSbar := bar_index
lastBOSprice := close
lastBOSprice
// --------- Plot labels for BOS / CHoCH ----------
if bosTriggered and show_labels
if chochTriggered
label.new(bar_index, high, text = lastBOSdir == 1 ? 'CHoCH ↑' : 'CHoCH ↓', style = label.style_label_up, color = color.new(color.orange, 0), textcolor = color.white, yloc = yloc.abovebar)
else
label.new(bar_index, high, text = lastBOSdir == 1 ? 'BOS ↑' : 'BOS ↓', style = label.style_label_left, color = lastBOSdir == 1 ? color.green : color.red, textcolor = color.white, yloc = yloc.abovebar)
// --------- Auto Fibonacci drawing ----------
var array fib_lines = array.new_line()
var array fib_labels = array.new_label()
var int lastFibId = na
// Function to clear previous fibs
f_clear() =>
if array.size(fib_lines) > 0
for i = 0 to array.size(fib_lines) - 1
line.delete(array.get(fib_lines, i))
if array.size(fib_labels) > 0
for i = 0 to array.size(fib_labels) - 1
label.delete(array.get(fib_labels, i))
array.clear(fib_lines)
array.clear(fib_labels)
// Decide anchors for fib: if lastBOSdir==1 (bullish) anchor from lastSwingLow -> lastSwingHigh
// if lastBOSdir==-1 (bearish) anchor from lastSwingHigh -> lastSwingLow
if lastBOSdir == 1 and not na(lastSwingLowPrice) and not na(lastSwingHighPrice)
// bullish fib: low -> high
startPrice = lastSwingLowPrice
endPrice = lastSwingHighPrice
// draw
f_clear()
for i = 0 to array.size(fibs) - 1 by 1
lvl = array.get(fibs, i)
priceLevel = startPrice + (endPrice - startPrice) * lvl
ln = line.new(x1 = lastSwingLowBar, y1 = priceLevel, x2 = bar_index, y2 = priceLevel, xloc = xloc.bar_index, extend = extend.right, color = color.new(color.green, 60), width = 1, style = line.style_solid)
array.push(fib_lines, ln)
lab = label.new(bar_index, priceLevel, text = str.tostring(lvl * 100, '#.0') + '%', style = label.style_label_right, color = color.new(color.green, 80), textcolor = color.white, yloc = yloc.price)
array.push(fib_labels, lab)
if lastBOSdir == -1 and not na(lastSwingHighPrice) and not na(lastSwingLowPrice)
// bearish fib: high -> low
startPrice = lastSwingHighPrice
endPrice = lastSwingLowPrice
f_clear()
for i = 0 to array.size(fibs) - 1 by 1
lvl = array.get(fibs, i)
priceLevel = startPrice + (endPrice - startPrice) * lvl
ln = line.new(x1 = lastSwingHighBar, y1 = priceLevel, x2 = bar_index, y2 = priceLevel, xloc = xloc.bar_index, extend = extend.right, color = color.new(color.red, 60), width = 1, style = line.style_solid)
array.push(fib_lines, ln)
lab = label.new(bar_index, priceLevel, text = str.tostring(lvl * 100, '#.0') + '%', style = label.style_label_right, color = color.new(color.red, 80), textcolor = color.white, yloc = yloc.price)
array.push(fib_labels, lab)
// --------- Optional: plot lastSwing points ----------
plotshape(not na(lastSwingHighPrice) ? lastSwingHighPrice : na, title = 'LastSwingHigh', location = location.absolute, style = shape.triangledown, size = size.tiny, color = color.red, offset = 0)
plotshape(not na(lastSwingLowPrice) ? lastSwingLowPrice : na, title = 'LastSwingLow', location = location.absolute, style = shape.triangleup, size = size.tiny, color = color.green, offset = 0)
// --------- Alerts ----------
alertcondition(bosTriggered and lastBOSdir == 1, title = 'Bullish BOS', message = 'Bullish BOS detected on {{ticker}} @ {{close}}')
alertcondition(bosTriggered and lastBOSdir == -1, title = 'Bearish BOS', message = 'Bearish BOS detected on {{ticker}} @ {{close}}')
alertcondition(chochTriggered, title = 'CHoCH Detected', message = 'CHoCH detected on {{ticker}} @ {{close}}')
// End
5-8-13 + AVWAP + Fibonacci FULL Sistem (Temiz & Profesyonel)✅ What This Indicator Is Doing (Full Explanation in English)
Your custom system combines several powerful components:
EMA 5-8-13,
AVWAP,
Auto Fibonacci,
Triple-Confirmation Buy/Sell Signals,
Background Trend Coloring.
Below is the complete breakdown.
🟩 1. Trend Detection with EMA 5-8-13
The indicator colors the background based on the alignment of:
EMA 5
EMA 8
EMA 13
Trend logic:
Uptrend (Green background):
EMA5 > EMA8 > EMA13
Downtrend (Red background):
EMA5 < EMA8 < EMA13
Caution Zone (Brown/Orange):
EMA5 < EMA8 but EMA8 > EMA13
→ Trend weakening, prepare for reversal.
🟩 2. Classic Buy/Sell Signals (EMA Cross)
These labels are the small “AL” and “SAT” signals.
BUY: EMA 5 crosses above EMA 13
SELL: EMA 5 crosses below EMA 13
This captures basic trend reversals.
🟩 3. AVWAP Dip/Peak Detection
The indicator automatically finds significant swing points:
AVWAP DIP (Green small label)
AVWAP PEAK (Red small label)
It then launches a new AVWAP line starting from that pivot.
So the yellow line is always the current Anchored VWAP starting from the most recent important DIP or PEAK.
🟩 4. Auto Fibonacci Levels (Clean Version)
The indicator calculates Fibonacci levels based on the last N bars (120 by default):
0.0
0.236
0.382
0.500
0.618
0.786
1.0
You now use the clean version, meaning:
✔ Only one set of Fibonacci lines appears
✔ No overlapping lines
✔ No chart clutter
✔ Always readable and minimal
🟩 5. Triple-Confirmation Buy/Sell Signals (Strong Signals)
These are the more important green/red labels (“🔥 AL” / “⚠️ SAT”).
A TRIPLE BUY (AL) happens when:
Price breaks above AVWAP
EMA 5-8-13 are aligned upward (trendUp)
Price is above Fibonacci 0.382
A TRIPLE SELL (SAT) happens when:
Price breaks below AVWAP
EMA 5-8-13 aligned downward (trendDown)
Price is below Fibonacci 0.382
This removes weak signals and gives high-quality entries and exits.
🟩 Summary of What You Saw on the Chart
Trend shifted to caution zone
Then EMA trend fully turned bearish
Price broke below AVWAP
Price dropped below Fibonacci 0.382
Triple Confirmation Sell appeared
Downtrend continued strongly afterward
Your indicator correctly identified:
👉 Trend weakening
👉 Bearish reversal
👉 Strong Sell zone
👉 Final drop
Candle Patterns Ver.2When someone decided to start trading the first thing we learn is how to read and understand the candlesticks. This little "boxes" with sticks tell us how the market sentiment and they can be used to "predict" future moves. I put predict inside a quotation marks because I would say predict the market is almost an utopia and we all know the reason.
Anyway with a good understand in reading the candlesticks with other indicators(like momentum or even a MA) can give us some edge when analyzing an instrument.
Since we have a lot of candlesticks types I did some back test and figured out that for my strategy that three candlestick types works very well. I will briefly describe then.
Engulfing Bar
This type of candlestick shows us a potential reversal based on the previous bar.
A bullish Engulfing has the close higher than the open it works better if the previous one is a bearish bar(open higher than close) and it is at a Support level. The body of the Engulfing bar should "engulf" the full body of the previous bar. If all parameters(previous bearish bar at Support level after a downtrend move) this Engulfing will represents a reversal move. When I say reversal it could means a pullback reversal(if the past trend is downtrend) or if the previous downtrend is a pullback from a past uptrend. In any way the previous bearish followed by an bullish Engulfing in general leads for an upward move.
The same picture applies to a previous bullish bar followed by an bearish Engulfing bar that if appears at the Resistance level will lead to a downward move.
One thing that is worth to mention is in a downward(or upward) move we have a small bullish bar followed by a bullish Engulfing this situation may lead to a continuation, not reversal.
Pinbar Bar:
This is another candlestick type that represents possible reversal. The Pinbar candle show a small(or medium) size but the important part is the size of the stick. If the stick is the upper one and has the size of 2 times the size of the body, it is a bearish bars and it appears after an uptrend move it represents that the buyers are losing momentum so we can expect a reversal move. When this type of bar appears after a downward move, it is a bullish bars but the stick is the lower one and has the size of two times of the body it will represents a bullish reversal. In this picture this candle is called a "Hammer".
So based on that I develop an indicator that shows me these 2 bars types and makes easy to identify with the other indicator possible entries.
Please feel free for a constructive comments and hope it help any one whe trading. Candlestick are the fundamentals of Price action.
You all have a great trading new week.
DeltaATR + VWAP DIF + MA'sI attempted to create an indicator using a different approach to analyzing potential trend reversals, and although it is still a work in progress, it is already fully functional. The indicator combines the price relative to VWAP with ATR normalization, providing a way to measure deviations in terms of market volatility.
How the indicator works:
Delta Calculation:
The core of the indicator calculates the difference between the current price and the VWAP (Volume Weighted Average Price), then normalizes this difference by the ATR (Average True Range). This provides a volatility-adjusted measure of how far the price has moved relative to its typical range.
Histogram Visualization:
The deltaATR is displayed as a histogram, where positive values indicate the price is above VWAP and negative values indicate it is below. The histogram is color-coded for easy interpretation: typically red for above VWAP and green for below, with configurable transparency.
Dual Moving Averages:
Two moving averages (fast and slow) are applied to the deltaATR. This creates a crossover system:
When the fast average crosses above the slow average, it may indicate an upcoming bullish reversal.
When the fast average crosses below the slow average, it may indicate a potential bearish reversal.
Zero Line Reference:
A reference line at zero corresponds to VWAP, helping traders see whether price is generally above or below the average volume-weighted level.
Alert Lines (Optional Panel):
A second panel provides four configurable alert lines, allowing users to set key thresholds to monitor extreme deltaATR values. These lines are thin, dashed, and fully customizable in terms of color and thickness.
Panel for Values and Signals:
The indicator includes a side panel showing:
Current deltaATR
Fast and slow averages
Current trend signal (Bullish, Bearish, or Neutral)
How it can be used:
Identify potential trend reversals by monitoring the crossover between the fast and slow averages of deltaATR.
Use the histogram to observe when the price is deviating significantly from VWAP in terms of ATR.
Set alert lines for specific thresholds to highlight overextended conditions or significant volatility moves.
Combine with other technical indicators for confirmation before entering or exiting trades.
This indicator is particularly useful for traders looking to anticipate reversals in volatile markets, as it adapts the delta measure to the current market conditions using ATR normalization, making it more responsive and robust than raw price deviations alone.
3 Fib Strategy – Automatic Trend Fib Extension ConfluenceWhat This Script Does
✔ Auto-detects swing highs and lows
Using pivot detection, adjustable by the user.
✔ Builds 3 independent trend-based Fib extension projections
Measures:
Wave 1 → Wave 2 → Wave 3
Wave 2 → Wave 3 → Wave 4
Wave 3 → Wave 4 → Wave 5
✔ Calculates the exact fib levels:
1.0 (1:1 extension)
1.236 extension
1.382 extension
✔ Detects confluence zones
When all 3 fib measurement sets overlap at the same target:
Green label = 1:1 confluence
Orange label = 1.236–1.382 confluence
✔ Draws long dotted lines across the chart
So you can visually track confluence zones.
Institution Radar Institution Radar
Institution Radar compares Price RSI with Volume-Delta RSI to show when price moves are real (backed by volume) or fake (moving without volume).
This helps reveal two powerful concepts:
Absorption (Bullish or Bearish)
Absorption happens when a large limit order is sitting in the order book.
Market orders hit it over and over, but the level doesn't break.
This usually means:
Strong players are absorbing the aggressive orders
Price is likely to move in the opposite direction
The next candle often reacts immediately
Can lead to a full reversal or just a short 1–2 candle move
Exhaustion (Bullish or Bearish)
Exhaustion happens when institutions pull their limit orders away.
There is no real volume behind the move, so price drifts up or down easily.
This usually means:
The current move is weak
A slowdown, pullback, or reversal is likely
Often shows up right before a flip in direction
📌 What the Signals Mean
Green signal → next candles often push upward
Red signal → next candles often push downward
These can mark trend reversals or temporary 1–2 candle reactions
🎚️ Sensitivity Setting
You can adjust how strict the signals are:
Lower sensitivity = more signals, more noise
Higher sensitivity = fewer signals, but more accurate and stronger
A higher sensitivity is recommended if you only want the cleanest institutional moments.
Project 1 - Complete with CMF and All IndicatorsProject 1 – Multi-Indicator Suite
This script combines several widely-used technical indicators into a single visual framework.
It is designed to help traders track momentum, trend strength, volume behavior, and money flow without switching between multiple tools.
Included components:
• MACD with dynamic color changes
• RSI with percentage change and directional marker
• ADX with trend-strength shading and Δ% calculation
• CMF (Chaikin Money Flow) with positive/negative flow tracking
• Volume Oscillator for short–long volume pressure
• Auto-updated labels for RSI, ADX, and CMF
• Lightweight visual lines to show momentum changes
Use cases:
• Trend confirmation
• Momentum diagnostics
• Volume-based pressure analysis
• Money-flow direction and strength
• Multi-factor confluence without indicator stacking
This tool does not generate buy/sell signals and does not imply trading outcomes.
It is a visual analytics suite built for discretionary technical analysis.
Pair Cointegration & Static Beta Analyzer (v6)Pair Cointegration & Static Beta Analyzer (v6)
This indicator evaluates whether two instruments exhibit statistical properties consistent with cointegration and tradable mean reversion.
It uses long-term beta estimation, spread standardization, AR(1) dynamics, drift stability, tail distribution analysis, and a multi-factor scoring model.
1. Static Beta and Spread Construction
A long-horizon static beta is estimated using covariance and variance of log-returns.
This beta does not update on every bar and is used throughout the entire model.
Beta = Cov(r1, r2) / Var(r2)
Spread = PriceA - Beta * PriceB
This “frozen” beta provides structural stability and avoids rolling noise in spread construction.
2. Correlation Check
Log-price correlation ensures the instruments move together over time.
Correlation ≥ 0.85 is required before deeper cointegration diagnostics are considered meaningful.
3. Z-Score Normalization and Distribution Behavior
The spread is standardized:
Z = (Spread - MA(Spread)) / Std(Spread)
The following statistical properties are examined:
Z-Mean: Should be close to zero in a stationary process
Z-Variance: Measures amplitude of deviations
Tail Probability: Frequency of |Z| being larger than a threshold (e.g. 2)
These metrics reveal whether the spread behaves like a mean-reverting equilibrium.
4. Mean Drift Stability
A rolling mean of the spread is examined.
If the rolling mean drifts excessively, the spread may not represent a stable long-term equilibrium.
A normalized drift ratio is used:
Mean Drift Ratio = Range( RollingMean(Spread) ) / Std(Spread)
Low drift indicates stable long-run equilibrium behavior.
5. AR(1) Dynamics and Half-Life
An AR(1) model approximates mean reversion:
Spread(t) = Phi * Spread(t-1) + error
Mean reversion requires:
0 < Phi < 1
Half-life of reversion:
Half-life = -ln(2) / ln(Phi)
Valid half-life for 10-minute bars typically falls between 3 and 80 bars.
6. Composite Scoring Model (0–100)
A multi-factor weighted scoring system is applied:
Component Score
Correlation 0–20
Z-Mean 0–15
Z-Variance 0–10
Tail Probability 0–10
Mean Drift 0–15
AR(1) Phi 0–15
Half-Life 0–15
Score interpretation:
70–100: Strong Cointegration Quality
40–70: Moderate
0–40: Weak
A pair is classified as cointegrated when:
Total Score ≥ Threshold (default = 70)
7. Main Cointegration Panel
Displays:
Static beta
Log-price correlation
Z-Mean, Z-Variance, Tail Probability
Drift Ratio
AR(1) Phi and Half-life
Composite score
Overall cointegration assessment
8. Beta Hedge Position Sizing (Average-Price Based)
To provide a more stable hedge ratio, hedge sizing is computed using average prices, not instantaneous prices:
AvgPriceA = SMA(PriceA, N)
AvgPriceB = SMA(PriceB, N)
Required B per 1 A = Beta * (AvgPriceA / AvgPriceB)
Using averaged prices results in a smoother, more reliable hedge ratio, reducing noise from bar-to-bar volatility.
The panel displays:
Required B security for 1 A security (average)
This represents the beta-neutral quantity of B required to hedge one unit of A.
Overview of Classical Stationarity & Cointegration Methods
The principal econometric tools commonly used in assessing stationarity and cointegration include:
Augmented Dickey–Fuller (ADF) Test
Phillips–Perron (PP) Test
KPSS Test
Engle–Granger Cointegration Test
Phillips–Ouliaris Cointegration Test
Johansen Cointegration Test
Since these procedures rely on regression residuals, matrix operations, and distribution-based critical values that are not supported in TradingView Pine Script, a practical multi-criteria scoring approach is employed instead. This framework leverages metrics that are fully computable in Pine and offers an operational proxy for evaluating cointegration-like behavior under platform constraints.
References
Engle & Granger (1987), Co-integration and Error Correction
Poterba & Summers (1988), Mean Reversion in Stock Prices
Vidyamurthy (2004), Pairs Trading
Explanation structured with assistance from OpenAI’s ChatGPT
Regards.
Fib and Slope Trend Detector [EWT] + MTF Dashboard🚀 Overview
The Momentum Structure Trend Detector is a sophisticated trend-following tool that combines Price Velocity (Slope) with Market Structure (Fibonacci) to identify high-probability trend reversals and continuations.
Unlike traditional indicators that rely heavily on lagging moving averages, this script analyzes the speed of price action in real-time. It operates on the core principle of market structure: Impulse moves are fast and steep, while corrections are slow and shallow.
🧠 The Logic: Physics Meets Market Structure
This indicator determines the trend direction by calculating the Slope (Velocity) of price swings.
ZigZag Calculation: It first identifies market swings (Highs and Lows) using a standard pivot detection algorithm.
Slope Calculation: It calculates the velocity of every completed leg using the formula: $Slope = \frac{|Price Change|}{|Time Duration|}$.
Trend Definition:
Uptrend : If the previous Up-move was fast (Impulse) and the subsequent Down-move is slower (Correction), the market is primed for an uptrend.
Downtrend : If the previous Down-move was fast (Impulse) and the subsequent Up-move is slower (Correction), the market is primed for a downtrend.
🔥 Key Features
1. Aggressive Real-Time Detection (No Lag)
Most structure indicators wait for a "Higher High" to confirm a trend, which often leads to late entries. This script uses an Aggressive Live Slope calculation:
It compares the current developing slope of the live price action against the slope of the previous completed leg.
Result: As soon as the current move becomes "steeper" (faster) than the previous correction, the trend flips immediately. This allows you to catch the "meat" of the move before a new pivot is even confirmed.
2. Fibonacci Validity Filter
Momentum alone isn't enough; we need structural integrity.
The script calculates the 78.6% Retracement level of the impulse leg.
If a correction moves deeper than this Fibonacci limit (on a closing basis), the trend structure is considered "broken" or "invalid," and the indicator switches to a Neutral state. This filters out choppy/ranging markets.
3. Multi-Timeframe (MTF) Dashboard
A customizable dashboard on the chart allows for fractal analysis. You can view the trend state (UP/DOWN/NEUTRAL) across 9 different timeframes (1m to 1M) simultaneously.
Green Row : Uptrend
Red Row : Downtrend
Gray : Neutral/Indeterminate
4. Smart Visuals
Background Colo r: Changes dynamically (Teal for Bullish, Red for Bearish, Gray for Neutral) to give you an instant read of the market state.
Slope Labels : Displays the calculated numeric slope on the chart, helping you visualize the momentum difference between impulse and corrective waves.
Invalidation Levels : Automatically plots the invalidation line (Stop Loss level) based on the market structure.
🛠️ Settings & Inputs
Strategy Settings
Pivot Deviation Length : Sensitivity of the ZigZag calculation (Default: 5). Lower numbers = more sensitive to small swings.
Max Retracement % : The Fibonacci limit for a valid correction (Default: 78.6%).
Min Bars for Live Calc : To prevent noise, the script waits for this many bars after a pivot before calculating the "Live Slope" (Default: 3).
Dashboard Settings
Show Dashboard : Toggle the table on/off.
Timeframe Toggles : Enable/Disable specific timeframes (1m, 5m, 15m, 30m, 1H, 4H, 1D, 1W, 1M) to suit your trading style.
🎯 How to Use
Wait for Background Change : When the background turns Teal, it indicates that a corrective pullback has ended and a new impulse with high velocity has begun.
Check Invalidation : Look at the plotted Stop Loss Level. If price closes below this line, the trade idea is invalid.
Confirm with Dashboard : Use the table to ensure the higher timeframes (e.g., 1H, 4H) align with your current chart's direction for higher probability setups.
Disclaimer : This tool is designed for trend analysis and educational purposes. Past performance (momentum) is not indicative of future results. Always manage your risk.
Defended Price Levels (DPLs) — Melvin Dickover ConceptThis indicator identifies and draws horizontal “Defended Price Levels” (DPLs) exactly as originally described by Melvin E. Dickover in his trading methodology.
Dickover observed that when extreme relative volume and extreme “freedom of movement” (volume-to-price-movement ratio) occur on the same bar, especially on bars with large gaps or unusually large bodies, the closing price (or previous close) of that bar very often becomes a significant future support/resistance level that the market later “defends.”
This script automates the detection of those exact coincident spikes using two well-known public indicators:
Relative Volume (RVI)
• Original idea: Melvin Dickover
• Pine Script implementation used here: “Relative Volume Indicator (Freedom Of Movement)” by LazyBear
Link:
Freedom of Movement (FoM)
• Original idea and calculation: starbolt64
• Pine Script: “Freedom of Movement” by starbolt64
Link:
How this indicator works
Calculates the raw (possibly negative) LazyBear RVI and starbolt64’s exact FoM values
Normalizes and standardizes both over the user-defined lookback
Triggers only when both RVI and FoM exceed the chosen number of standard deviations on the same bar (true Dickover coincident-spike condition)
Applies Dickover’s original price-selection rules (uses current close on big gaps or 2× body expansion candles, otherwise previous close)
Draws a thin maroon horizontal ray only when the new level is sufficiently far from all previously drawn levels (default ≥0.8 %) and the maximum number of levels has not been reached
Keeps the chart clean by limiting the total number of significant defended levels shown
This is not a republish or minor variation of the two source scripts — it is a faithful automation of Melvin Dickover’s specific “defended price line” concept that he manually marked using the coincidence of these two indicators.
Full credit goes to:
Melvin E. Dickover — creator of the Defended Price Levels concept
LazyBear — author of the Relative Volume (RVI) implementation used here
starbolt64 — author of the Freedom of Movement indicator and calculation
Settings (all adjustable):
Standard Deviation Length (default 60)
Spike Threshold in standard deviations (default 2.0)
Minimum distance between levels in % (default 0.8 %)
Maximum significant levels to display (15–80)
Use these horizontal maroon lines as potential future support/resistance zones that the market has previously shown strong willingness to defend.
Thank you to Melvin, LazyBear, and starbolt64 for the original work that made this automation possible.






















