Bollinger Breakout MarkersSubtle triangle markers that indicate when price extends out of the Bollinger bands to indicate overbought and oversold conditions
Penunjuk dan strategi
Enhanced Std Dev Oscillator (Z-Score)Enhanced Std Dev Oscillator (Z-Score)
Overview
The Enhanced Std Dev Oscillator (ESDO) is a refined Z-Score indicator that normalizes price deviations from a moving mean using standard deviation, smoothed for clarity and equipped with divergence detection. This oscillator shines in identifying extreme overbought/oversold conditions and potential reversals, making it ideal for mean-reversion strategies in stocks, forex, or crypto. By highlighting when prices stray too far from the norm, it helps traders avoid chasing trends and focus on high-probability pullbacks.
Key Features
Customisable Mean & Deviation: Choose SMA or EMA for the mean (default: SMA, length 14); opt for Population or Sample standard deviation for precise statistical accuracy.
Smoothing for Clarity: Apply a simple moving average (default: 3) to the raw Z-Score, reducing noise without lagging signals excessively.
Zone Highlighting: Background colours flag extreme zones—red tint above +2 (overbought), green below -2 (oversold)—for quick visual scans.
Divergence Alerts: Automatically detects bullish (price lows lower, Z-Score higher) and bearish (price highs higher, Z-Score lower) divergences using pivot points (default length: 5), with labeled shapes for easy spotting.
Built-in Alerts: Notifications for Z-Score crossovers into OB/OS zones and divergence events to keep you informed without constant monitoring.
How It Works
Core Calculation: Computes the mean (SMA/EMA) over the specified length, then standard deviation (Population or adjusted Sample formula for N>1). Z-Score = (Source - Mean) / Std Dev, handling edge cases like zero deviation.
Smoothing: Averages the Z-Score with an SMA to create a cleaner plot oscillating around zero.
Levels & Zones: Plots horizontal lines at ±1 (orange dotted) and ±2 (red dashed) for reference; backgrounds activate in extreme zones.
Divergence Logic: Scans for pivot highs/lows in price and Z-Score; flags divergences when price extremes diverge from oscillator extremes (looking back 2 pivots for confirmation).
Visualisation: Blue line for the smoothed Z-Score; green/red labels for bull/bear divergences.
Usage Tips
Buy Signal: Z-Score crosses below -2 (oversold) or bullish divergence forms—pair with volume spike for confirmation.
Sell Signal: Z-Score crosses above +2 (overbought) or bearish divergence—watch for resistance alignment.
Customisation: Use EMA mean for trendier assets; enable Sample std dev for smaller datasets. Increase pivot length (7-10) in volatile markets to filter false signals.
Timeframes: Excels on daily/4H for swing trades; test smoothing on lower frames to avoid over-smoothing. Always combine with trend filters like a 200-period MA.
This open-source script is licensed under Mozilla Public License 2.0. Backtest thoroughly—past performance isn't indicative of future results. Trade with discipline! 📈
© HighlanderOne
Advanced Directional Stoch RSIAdvanced Directional Stochastic RSI
Overview
The Advanced Directional Stochastic RSI (Adv Stoch RSI Dir) is a powerful oscillator that combines the classic Stochastic RSI with John Ehlers' SuperSmoother filter for ultra-smooth signals and reduced noise. Unlike traditional Stoch RSI, this indicator incorporates directional coloring based on price action relative to a smoothed trend line, helping traders quickly spot bullish or bearish momentum. It's designed for swing traders and scalpers looking for clearer overbought/oversold conditions in volatile markets.
Key Features
Directional Coloring: %K line turns green when price is above the trend MA (bullish) and red when below (bearish), providing instant visual bias.
Multi-Pass SuperSmoothing: Apply Ehlers' SuperSmoother filter up to 5 times for customizable noise reduction—dial in passes (default: 2) to balance responsiveness and smoothness.
Trend-Aware Baseline: Uses a cascaded smoothed moving average (default length: 20) to gauge overall direction, making the oscillator more context-aware.
Classic Stoch RSI Core: Built on RSI (default: 14) and Stochastic (default: 14), with SMA smoothing for %K (3) and %D (3).
Visual Aids: Includes overbought (80), oversold (20), and midline (50) levels, plus a subtle blue fill between OB/OS zones for easy reference.
How It Works
Source Smoothing: The input source (default: close) is passed through the SuperSmoother filter multiple times to create a trend MA.
Stoch RSI Calculation: Computes RSI on the source, then applies Stochastic to the RSI values, followed by SMA smoothing for base %K and %D.
Advanced Smoothing: Extra SuperSmoother layers are applied to %K and %D based on your chosen passes, minimizing whipsaws.
Directional Logic: Compares current close to the trend MA to color %K dynamically.
Plotting: %K (thick line, colored) and %D (thin orange) oscillate between 0-100, highlighting crossovers and divergences.
Usage Tips
Buy Signal: Green %K crosses above %D below 50, or bounces off oversold (20) in uptrends.
Sell Signal: Red %K crosses below %D above 50, or rejects overbought (80) in downtrends.
Customization: Increase smoothing passes (3-5) for choppy markets; reduce for faster signals. Pair with volume or support/resistance for confirmation.
Timeframes: Best on 1H-4H charts for stocks/crypto; adjust lengths for forex.
This open-source script is licensed under Mozilla Public License 2.0. Backtest thoroughly—past performance isn't indicative of future results. Enjoy trading smarter with less noise! 🚀
© HighlanderOne
SM OTC style Supply/Demand Zones Lite+//@version=6
indicator("OTC SD MTF Lite+", "OTCSDmtf+", overlay=true, max_boxes_count=200, max_labels_count=200)
// ================= Inputs =================
useH4 = input.bool(true, "Show 4H zones")
useD1 = input.bool(true, "Show 1D zones")
useW1 = input.bool(true, "Show 1W zones")
useM1 = input.bool(false, "Show 1M zones")
baseLen = input.int(2, "Base length (HTF bars)", 1, 5)
wickPctMax = input.float(35.0, "Max wick % in base", 0, 100)
impulseX = input.float(1.5, "Departure body vs ATR (x)", 0.5, 5.0)
atrLen = input.int(14, "ATR length (HTF)")
extendBars = input.int(2000, "Extend bars on chart", 200, 10000)
maxPerTF = input.int(12, "Max zones per TF", 3, 30)
showLegend = input.bool(true, "Show tiny legend (4H/1D/1W/1M)")
onlyNearest = input.bool(false, "Show ONLY nearest zone above/below")
hideOverlapTF = input.bool(true, "Hide overlapping zones within each TF (keep newest)")
showNearestLabels = input.bool(false, "Show distance labels to nearest above/below")
// --- Hard cap for future drawing with xloc.bar_index ---
FUTURE_CAP = 500
// Colors (Demand hues per TF). Supply uses red for contrast.
colH4 = color.new(color.teal, 78)
colD1 = color.new(color.blue, 78)
colW1 = color.new(color.orange, 78)
colM1 = color.new(color.purple, 78)
colSup= color.new(color.red, 78)
// ================= Helpers =================
wickiness(h, l, o, c) =>
rng = math.max(h - l, syminfo.mintick)
topW = h - math.max(o, c)
botW = math.min(o, c) - l
100.0 * (topW + botW) / rng
// Returns: (dTrig, dProx, dDist, sTrig, sProx, sDist)
f_htfSignals(baseBars, wickMax, xImpulse, aLen) =>
float _o = open
float _h = high
float _l = low
float _c = close
float _atr = ta.atr(aLen)
bool ok = true
for i = 1 to baseBars
ok := ok and (wickiness(_h , _l , _o , _c ) <= wickMax)
bool bullDepart = _c > _o and (_c - _o) > xImpulse * _atr
bool bearDepart = _c < _o and (_o - _c) > xImpulse * _atr
float dTrig = 0.0
float dProx = na
float dDist = na
float sTrig = 0.0
float sProx = na
float sDist = na
if ok and bullDepart
float hi = ta.highest(_h, baseBars)
float lo = ta.lowest(_l, baseBars)
dTrig := 1.0
dProx := lo
dDist := hi
if ok and bearDepart
float hi2 = ta.highest(_h, baseBars)
float lo2 = ta.lowest(_l, baseBars)
sTrig := 1.0
sProx := hi2
sDist := lo2
// ================= Pull HTF signals =================
= request.security(syminfo.tickerid, "240", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
= request.security(syminfo.tickerid, "D", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
= request.security(syminfo.tickerid, "W", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
= request.security(syminfo.tickerid, "M", f_htfSignals(baseLen, wickPctMax, impulseX, atrLen))
// ================= Storage per TF =================
var zH4 = array.new_box()
var aH4 = array.new_bool()
var lH4 = array.new_label()
var sH4 = array.new_int() // 1 = Demand, -1 = Supply
var zD1 = array.new_box()
var aD1 = array.new_bool()
var lD1 = array.new_label()
var sD1 = array.new_int()
var zW1 = array.new_box()
var aW1 = array.new_bool()
var lW1 = array.new_label()
var sW1 = array.new_int()
var zM1 = array.new_box()
var aM1 = array.new_bool()
var lM1 = array.new_label()
var sM1 = array.new_int()
// ================= Overlap utils =================
overlap(topA, botA, topB, botB) =>
not (topA < botB or botA > topB)
purgeOverlaps(arrB, arrA, arrL, newTop, newBot) =>
if hideOverlapTF and array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box bOld = array.get(arrB, i)
float t = box.get_top(bOld)
float btm = box.get_bottom(bOld)
if overlap(newTop, newBot, t, btm)
box.delete(bOld)
label.delete(array.get(arrL, i))
array.set(arrA, i, false)
// ================= Add zone =================
addZone(arrB, arrA, arrL, arrS, topV, botV, baseColor, isDemand) =>
purgeOverlaps(arrB, arrA, arrL, topV, botV)
int leftX = bar_index - 1
int rightX = bar_index + math.min(extendBars, FUTURE_CAP) // respect +500 cap
box b = box.new(leftX, topV, rightX, botV, xloc=xloc.bar_index, bgcolor=baseColor, border_color=color.new(color.black, 0))
float ly = isDemand == 1 ? topV : botV
st = isDemand == 1 ? label.style_label_down : label.style_label_up
string tagTxt = isDemand == 1 ? "Demand" : "Supply"
label l = label.new(leftX, ly, tagTxt, xloc=xloc.bar_index, style=st, textcolor=color.white, color=color.new(color.black, 0), size=size.tiny)
array.push(arrB, b)
array.push(arrA, true)
array.push(arrL, l)
array.push(arrS, isDemand)
if array.size(arrB) > maxPerTF
box.delete(array.shift(arrB))
array.shift(arrA)
label.delete(array.shift(arrL))
array.shift(arrS)
// ================= Maintain / Invalidate =================
extendAll(arrB, arrA) =>
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box.set_right(array.get(arrB, i), bar_index + math.min(extendBars, FUTURE_CAP)) // respect +500 cap
invalidate(arrB, arrA, arrL) =>
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box b = array.get(arrB, i)
float t = box.get_top(b)
float btm = box.get_bottom(b)
// Close outside band → remove
if close > t or close < btm
box.delete(b)
label.delete(array.get(arrL, i))
array.set(arrA, i, false)
// ================= New HTF bar flags (strict booleans) =================
int chH4 = ta.change(time("240"))
int chD1 = ta.change(time("D"))
int chW1 = ta.change(time("W"))
int chM1 = ta.change(time("M"))
bool newBarH4 = useH4 and (not na(chH4)) and (chH4 != 0)
bool newBarD1 = useD1 and (not na(chD1)) and (chD1 != 0)
bool newBarW1 = useW1 and (not na(chW1)) and (chW1 != 0)
bool newBarM1 = useM1 and (not na(chM1)) and (chM1 != 0)
// ================= Create zones on new HTF bar =================
if newBarH4
if d4t > 0 and not na(d4p) and not na(d4d)
addZone(zH4, aH4, lH4, sH4, d4d, d4p, colH4, 1)
if s4t > 0 and not na(s4p) and not na(s4d)
addZone(zH4, aH4, lH4, sH4, s4p, s4d, colSup, -1)
if newBarD1
if d1t > 0 and not na(d1p) and not na(d1d)
addZone(zD1, aD1, lD1, sD1, d1d, d1p, colD1, 1)
if s1t > 0 and not na(s1p) and not na(s1d)
addZone(zD1, aD1, lD1, sD1, s1p, s1d, colSup, -1)
if newBarW1
if w1t > 0 and not na(w1p) and not na(w1d)
addZone(zW1, aW1, lW1, sW1, w1d, w1p, colW1, 1)
if swt > 0 and not na(swp) and not na(swd)
addZone(zW1, aW1, lW1, sW1, swp, swd, colSup, -1)
if newBarM1
if m1t > 0 and not na(m1p) and not na(m1d)
addZone(zM1, aM1, lM1, sM1, m1d, m1p, colM1, 1)
if smt > 0 and not na(smp) and not na(smd)
addZone(zM1, aM1, lM1, sM1, smp, smd, colSup, -1)
// ================= Maintain & Invalidate (every bar) =================
extendAll(zH4, aH4)
extendAll(zD1, aD1)
extendAll(zW1, aW1)
extendAll(zM1, aM1)
invalidate(zH4, aH4, lH4)
invalidate(zD1, aD1, lD1)
invalidate(zW1, aW1, lW1)
invalidate(zM1, aM1, lM1)
// ================= Nearest across all TFs =================
tfNearest(arrB, arrA) =>
int upIdx = -1
int dnIdx = -1
float upDist = 1e10
float dnDist = 1e10
float upBtm = na
float dnTop = na
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box b = array.get(arrB, i)
float t = box.get_top(b)
float btm = box.get_bottom(b)
if btm >= close
float d = btm - close
if d < upDist
upDist := d
upIdx := i
upBtm := btm
if t <= close
float d2 = close - t
if d2 < dnDist
dnDist := d2
dnIdx := i
dnTop := t
= tfNearest(zH4, aH4)
= tfNearest(zD1, aD1)
= tfNearest(zW1, aW1)
= tfNearest(zM1, aM1)
float upBest = 1e10, dnBest = 1e10
int upArr = -1, upIdxSel = -1, dnArr = -1, dnIdxSel = -1
color upColor = color.new(color.white, 100), dnColor = color.new(color.white, 100)
if (not na(uh4y)) and uh4d < upBest
upBest := uh4d, upArr := 0, upIdxSel := uh4i, upColor := colH4
if (not na(ud1y)) and ud1d < upBest
upBest := ud1d, upArr := 1, upIdxSel := ud1i, upColor := colD1
if (not na(uw1y)) and uw1d < upBest
upBest := uw1d, upArr := 2, upIdxSel := uw1i, upColor := colW1
if (not na(um1y)) and um1d < upBest
upBest := um1d, upArr := 3, upIdxSel := um1i, upColor := colM1
if (not na(dh4y)) and dh4d < dnBest
dnBest := dh4d, dnArr := 0, dnIdxSel := dh4i, dnColor := colH4
if (not na(dd1y)) and dd1d < dnBest
dnBest := dd1d, dnArr := 1, dnIdxSel := dd1i, dnColor := colD1
if (not na(dw1y)) and dw1d < dnBest
dnBest := dw1d, dnArr := 2, dnIdxSel := dw1i, dnColor := colW1
if (not na(dm1y)) and dm1d < dnBest
dnBest := dm1d, dnArr := 3, dnIdxSel := dm1i, dnColor := colM1
// ================= Nearest-only visibility (optional) =================
hideAll(arrB, arrA) =>
if array.size(arrB) > 0
for i = 0 to array.size(arrB) - 1
if array.get(arrA, i)
box.set_bgcolor(array.get(arrB, i), color.new(color.white, 100))
box.set_border_color(array.get(arrB, i), color.new(color.white, 100))
showOne(arrB, arrA, arrS, idx, demColor) =>
if idx >= 0 and idx < array.size(arrB)
if array.get(arrA, idx)
bool isDemand = array.get(arrS, idx) == 1
color c = isDemand ? demColor : colSup
box.set_bgcolor(array.get(arrB, idx), c)
box.set_border_color(array.get(arrB, idx), color.new(color.black, 0))
if onlyNearest
hideAll(zH4, aH4), hideAll(zD1, aD1), hideAll(zW1, aW1), hideAll(zM1, aM1)
if upArr == 0
showOne(zH4, aH4, sH4, upIdxSel, upColor)
if upArr == 1
showOne(zD1, aD1, sD1, upIdxSel, upColor)
if upArr == 2
showOne(zW1, aW1, sW1, upIdxSel, upColor)
if upArr == 3
showOne(zM1, aM1, sM1, upIdxSel, upColor)
if dnArr == 0
showOne(zH4, aH4, sH4, dnIdxSel, dnColor)
if dnArr == 1
showOne(zD1, aD1, sD1, dnIdxSel, dnColor)
if dnArr == 2
showOne(zW1, aW1, sW1, dnIdxSel, dnColor)
if dnArr == 3
showOne(zM1, aM1, sM1, dnIdxSel, dnColor)
// ================= Nearest distance labels (optional) =================
var label nearUp = na
var label nearDn = na
makeNearLabel(y, txt) =>
label.new(bar_index, y, txt, xloc=xloc.bar_index, style=label.style_label_left, color=color.new(color.black, 0), textcolor=color.white, size=size.tiny)
if showNearestLabels
if not na(nearUp)
label.delete(nearUp)
if not na(nearDn)
label.delete(nearDn)
if upArr != -1
box bUp = upArr == 0 ? array.get(zH4, upIdxSel) : upArr == 1 ? array.get(zD1, upIdxSel) : upArr == 2 ? array.get(zW1, upIdxSel) : array.get(zM1, upIdxSel)
float upBtm = box.get_bottom(bUp)
float pctUp = math.round(10000.0 * (upBtm - close) / close) / 100.0
nearUp := makeNearLabel(upBtm, "Nearest Above ~ " + str.tostring(pctUp) + "%")
if dnArr != -1
box bDn = dnArr == 0 ? array.get(zH4, dnIdxSel) : dnArr == 1 ? array.get(zD1, dnIdxSel) : dnArr == 2 ? array.get(zW1, dnIdxSel) : array.get(zM1, dnIdxSel)
float dnTop = box.get_top(bDn)
float pctDn = math.round(10000.0 * (close - dnTop) / close) / 100.0
nearDn := makeNearLabel(dnTop, "Nearest Below ~ " + str.tostring(pctDn) + "%")
// ================= Tiny legend (dots) =================
var table legend = na
if showLegend and na(legend)
legend := table.new(position.top_left, 4, 1)
if showLegend and not na(legend)
table.cell(legend, 0, 0, "● 4H", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(legend, 1, 0, "● 1D", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(legend, 2, 0, "● 1W", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell(legend, 3, 0, "● 1M", text_color=color.white, bgcolor=color.new(color.black, 0))
table.cell_set_bgcolor(legend, 0, 0, color.new(color.teal, 70))
table.cell_set_bgcolor(legend, 1, 0, color.new(color.blue, 70))
table.cell_set_bgcolor(legend, 2, 0, color.new(color.orange, 70))
table.cell_set_bgcolor(legend, 3, 0, color.new(color.purple, 70))
Basic ICT PD Array MarkerIt focuses on OBs and FVGs on your chosen timeframe (e.g., H1 for /NQ). This is open-source friendly and based on ICT logic from community scripts.
90min + Daily + Weekly Cycles + Alerts [Final]Quarterly theory indicator
Customizable indicator 90m cycles, daily, and weekly
WRAMA (with alerts)Updated the original WRAMA indicator to include alerts when the background changes colors.
aaa sibilio 5.5 New Due## **Le Caratteristiche Fondamentali delle Medie: Principi Teorici e Applicazioni Strategiche**
### **Il Principio della Non-Parallelità: Fondamento Matematico**
Il primo principio fondamentale che governa le medie mobili stabilisce che **qualsiasi media non può mai essere parallela alla sua regressione lineare**. Questo non è un caso o un'anomalia, ma una conseguenza diretta della natura matematica delle medie mobili.
**Spiegazione teorica:** Una media mobile è un filtro passa-basso che rimuove le frequenze ad alta velocità dai dati di prezzo, mentre una regressione lineare rappresenta la tendenza lineare ottimale nel periodo considerato. Poiché la media mobile mantiene traccia delle oscillazioni attorno al trend (seppur attenuate), mentre la regressione elimina completamente queste oscillazioni per fornire solo la direzione generale, le due curve non possono mai essere identiche o parallele.
**Implicazione cruciale:** Questa caratteristica certifica che **le medie hanno sempre un andamento curvilineo** rispetto alla loro regressione. La curvatura non è un'imperfezione del calcolo, ma la manifestazione della dinamica intrinseca dei dati di mercato filtrati attraverso la media mobile.
### **L'Energia del Sistema: Derivazione dalla Curvatura**
È proprio questa caratteristica curvilinea che ci consente di determinare parametri fondamentali come **l'energia del sistema**.
**Base fisica:** In fisica, l'energia potenziale di un sistema curvilineo è proporzionale alla deviazione dalla traiettoria di equilibrio (rappresentata dalla regressione lineare). Nel nostro contesto:
- **Energia potenziale** = Distanza tra media mobile e sua regressione
- **Energia cinetica** = Velocità di avvicinamento o allontanamento tra le due curve
- **Energia totale del sistema** = Somma di energia potenziale e cinetica
**Applicazione pratica:** Quando la media si allontana dalla sua regressione, accumula energia potenziale che deve essere rilasciata. Quando si avvicina rapidamente, manifesta energia cinetica che può portare a overshooting del punto di equilibrio.
### **Il Principio dell'Arrotolamento Gerarchico**
Il secondo principio fondamentale stabilisce che **le curve si arrotolano tra loro partendo dai periodi più lunghi verso quelli più piccoli**. Questo fenomeno ha radici profonde nella teoria dei sistemi dinamici.
**Spiegazione teorica:** Le medie con periodi più lunghi hanno maggiore inerzia e resistenza al cambiamento (analogamente alla massa in fisica). Quando si verifica un cambiamento di tendenza, questo si propaga prima nelle medie a periodo lungo (che rappresentano le forze dominanti del sistema), per poi diffondersi progressivamente verso le medie a periodo più breve.
**Meccanismo di propagazione:**
1. **Livello macro** (medie lunghe): Cambio di direzione delle forze principali
2. **Livello medio** (medie intermedie): Trasmissione del segnale
3. **Livello micro** (medie brevi): Manifestazione finale del cambiamento
### **Formazioni Strategiche Derivate**
Questo arrotolamento gerarchico ci consente di identificare **formazioni importanti** per la strategia:
**Confluenza di Arrotolamento:** Quando più medie di diversi periodi iniziano simultaneamente il processo di arrotolamento, si crea una zona di alta probabilità di inversione.
**Cascata di Allineamento:** La sequenza temporale con cui le medie si arrotolano fornisce informazioni sulla forza e persistenza del movimento imminente.
**Zone di Resistenza Dinamica:** I punti dove l'arrotolamento incontra resistenza indicano livelli critici dove le forze opposte si equilibrano temporaneamente.
### **Implicazioni per la Strategia**
Questi principi teorici si traducono in vantaggi operativi concreti:
1. **Prevedibilità dell'energia:** Possiamo quantificare l'energia accumulata nel sistema e prevedere la forza dei movimenti futuri
2. **Timing degli ingressi:** L'arrotolamento gerarchico fornisce una sequenza temporale per ottimizzare i punti di ingresso
3. **Gestione del rischio:** La comprensione dell'energia del sistema permette di dimensionare correttamente le posizioni
La combinazione di questi due principi - non-parallelità e arrotolamento gerarchico - trasforma le medie mobili da semplici indicatori di trend in strumenti sofisticati per l'analisi energetica e dinamica dei mercati finanziari.
versione inglese
## **The Fundamental Characteristics of Moving Averages: Theoretical Principles and Strategic Applications**
### **The Non-Parallelism Principle: Mathematical Foundation**
The first fundamental principle governing moving averages establishes that **any moving average can never be parallel to its linear regression**. This is not coincidental or anomalous, but a direct consequence of the mathematical nature of moving averages.
**Theoretical explanation:** A moving average is a low-pass filter that removes high-frequency components from price data, while a linear regression represents the optimal linear trend over the considered period. Since the moving average maintains trace of oscillations around the trend (albeit attenuated), while the regression completely eliminates these oscillations to provide only the general direction, the two curves can never be identical or parallel.
**Crucial implication:** This characteristic certifies that **moving averages always have a curvilinear pattern** relative to their regression. The curvature is not an imperfection in the calculation, but the manifestation of the intrinsic dynamics of market data filtered through the moving average.
### **System Energy: Derivation from Curvature**
It is precisely this curvilinear characteristic that allows us to determine fundamental parameters such as **system energy**.
**Physical basis:** In physics, the potential energy of a curvilinear system is proportional to the deviation from the equilibrium trajectory (represented by the linear regression). In our context:
- **Potential energy** = Distance between moving average and its regression
- **Kinetic energy** = Speed of approach or separation between the two curves
- **Total system energy** = Sum of potential and kinetic energy
**Practical application:** When the moving average moves away from its regression, it accumulates potential energy that must be released. When it approaches rapidly, it manifests kinetic energy that can lead to overshooting the equilibrium point.
### **The Hierarchical Rolling Principle**
The second fundamental principle establishes that **curves roll around each other starting from longer periods toward shorter ones**. This phenomenon has deep roots in dynamical systems theory.
**Theoretical explanation:** Moving averages with longer periods have greater inertia and resistance to change (analogous to mass in physics). When a trend change occurs, it propagates first in long-period averages (which represent the dominant forces of the system), then progressively diffuses toward shorter-period averages.
**Propagation mechanism:**
1. **Macro level** (long averages): Change in direction of principal forces
2. **Medium level** (intermediate averages): Signal transmission
3. **Micro level** (short averages): Final manifestation of the change
### **Derived Strategic Formations**
This hierarchical rolling allows us to identify **important formations** for the strategy:
**Rolling Confluence:** When multiple averages of different periods simultaneously begin the rolling process, a high-probability reversal zone is created.
**Alignment Cascade:** The temporal sequence with which averages roll provides information about the strength and persistence of the imminent movement.
**Dynamic Resistance Zones:** Points where rolling encounters resistance indicate critical levels where opposing forces temporarily balance.
### **Strategic Implications**
These theoretical principles translate into concrete operational advantages:
1. **Energy predictability:** We can quantify the energy accumulated in the system and predict the strength of future movements
2. **Entry timing:** Hierarchical rolling provides a temporal sequence to optimize entry points
3. **Risk management:** Understanding system energy allows proper position sizing
The combination of these two principles - non-parallelism and hierarchical rolling - transforms moving averages from simple trend indicators into sophisticated tools for energetic and dynamic analysis of financial markets.
Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)Repeater Integer Levels (…999, …888, …777)
Volume PivotOVERVIEW
Volume Pivot is a technical analysis tool for TradingView designed to identify key turning points in the market by focusing on volume rather than price. It detects peaks and troughs (pivots) in trading volume to pinpoint moments of maximum market interest or exhaustion.
This indicator performs its analysis on both the Current Timeframe (CTF) and a user-defined Higher Timeframe (HTF). This dual-perspective approach allows traders to simultaneously grasp short-term market reactions and long-term structural shifts, leading to more informed and high-conviction trading decisions.
FEATURES
Automatic Pivot Detection
Automatically identifies and plots Volume Pivot Highs (peaks) and Pivot Lows (troughs) based on a user-defined Lookback Length.
Dual Timeframe Display
- CTF Signals : Plotted as tiny circles directly above the corresponding volume bars for immediate, short-term context.
- HTF Signals : Plotted as slightly larger circles at the bottom of the indicator pane, making them easy to distinguish as signals of higher significance.
Flexible HTF Configuration
Customize which higher timeframe to use for analysis based on your current chart timeframe. For example, you can set the indicator to reference the 1-hour chart as the HTF when you are on the 5-minute chart, and the Daily chart as the HTF when you are on the 1-hour chart.
Intuitive Volume Bars
The volume bars are color-coded to show whether volume is increasing (bullish color) or decreasing (bearish color) compared to the previous bar, offering a quick visual gauge of market momentum.
Full Customization
Easily toggle the visibility of CTF and HTF signals and customize the colors for bullish and bearish pivots to match your charting preferences.
RD-DynamicTSMADescription of the RD-DynamicTSMA Pine Script Indicator:
This single indicator dynamically adjusts the three SMAs to key periods used by professional traders across timeframes:
Daily: 10, 21, 50 periods (standard for swing trading trends).
Weekly+: 10, 21, 30 periods (optimized for positional & longer-term views).
Lengths auto-update on timeframe switches.
Pivot MoChiThis uses Current Day opening in place of previous day close
More Dynamic than Traditional Pivots
Horizontal Lines [Yellow]The Horizontal Lines indicator is a simple yet powerful visual tool designed for traders in forex, options, and other financial markets. It allows users to mark and track key price levels directly on their chart with clear, bright yellow lines.
FibPulse144 [CHE] FibPulse144 — ADX-gated 13/21 crossover with 144-trend regime and closed-bar labels
Summary
FibPulse144 combines a fast moving-average crossover with a 144-period trend regime and an ADX strength gate. Signals are confirmed on closed bars only and drawn as labels on the price chart, while an ADX line in a separate pane provides context. Color gradients are derived from normalized ADX, so visual intensity reflects trend strength without changing the underlying logic. The approach reduces false flips during weak conditions and keeps entries aligned with the dominant trend.
Motivation: Why this design?
Traditional crossover signals can flip repeatedly during sideways phases and often trigger against the higher-time regime. By requiring alignment with a slower trend proxy and by gating entries through a rising ADX condition, FibPulse144 favors structurally cleaner transitions. Gradient coloring communicates strength visually, helping users temper aggressiveness without additional indicators.
What’s different vs. standard approaches?
Baseline: Classic dual-MA crossover with unconditional signals.
Architecture differences:
Two-bar regime confirmation against a 144-period trend average.
Pending-signal logic that waits for regime and optional ADX approval.
ADX strength gate using the prior reading relative to a user threshold and earlier value.
Gradient colors scaled by an ADX window with gamma controls.
Price-chart labels enforced via overlay on an otherwise pane-based indicator.
Practical effect: Fewer signals during weak or choppy conditions, labels that appear only after a bar closes, and color intensity that mirrors trend quality.
How it works (technical)
The script computes fast and slow moving averages using the selected method and lengths. A separate 144-length average defines the regime using a two-bar confirmation above or below it. Crossovers are observed on the previous bar to avoid intrabar ambiguity; once a prior crossover is detected, it is stored as pending. A pending long requires regime alignment and, if enabled, an ADX condition based on the previous reading being above the threshold and greater than an earlier reading. The state machine holds neutral, long, or short until an exit condition or ADX reset is met. ADX is normalized within a user window, scaled with gamma, and mapped to up and down color palettes to render gradients. Labels on the price panel are forced to overlay, while the ADX line and threshold guide remain in a separate pane.
Parameter Guide
Source — Input data for all calculations. Default: close. Tip: keep consistent with your chart.
MA Type — EMA or SMA. Default: EMA. EMA reacts faster; SMA is smoother.
Fast / Slow — Fast and slow lengths for crossover. Defaults: 13 and 21. Shorter reacts earlier; longer reduces noise.
Trend — Regime average length. Default: 144. Larger values stabilize regime; smaller values increase sensitivity.
Use 144 as trend filter — Enables regime gating. Default: true. Disable to allow raw crossovers.
Use ADX filter — Requires ADX strength. Default: true. Disable to allow signals regardless of strength.
ADX Len — DI and ADX smoothing length. Default: 14. Higher values smooth strength; lower values react faster.
ADX Thresh — Minimum strength for signals. Default: 25. Raise to reduce flips; lower to capture earlier moves.
Entry/Exit labels (price) — Price-panel labels on state changes. Default: true.
Signal labels in ADX pane — Small markers at the ADX value on entries. Default: true.
Label size — tiny, small, normal, large. Default: normal.
Enable barcolor — Optional candle tint by regime and gradient. Default: false.
Enable gradient — Turns on ADX-driven color blending. Default: true.
Window — Bars used to normalize ADX for colors. Default: 100; minimum: 5.
Gamma bars / Gamma plots — Nonlinear scaling for bar and line intensities. Default: 0.80; between 0.30 and 2.00.
Gradient transp (0–90) — Transparency for gradient colors. Default: 0.
MA fill transparency (0–100) — Fill opacity between fast and slow lines. Default: 65.
Palette colors (Up/Down) — Dark and neon endpoints for up and down gradients. Defaults as in the code.
Reading & Interpretation
Fast/Slow lines: When the fast line is above the slow line, the line and fill use the long palette; when below, the short palette is used.
Trend MA (144): Neutral gray line indicating the regime boundary.
Labels on price: “LONG” appears when the state turns long; “SHORT” when it turns short. Labels appear only after the bar closes and conditions are satisfied.
ADX pane: The ADX line shows current strength. The dotted threshold line is the user level for gating. Optional small markers indicate entries at the ADX value.
Bar colors (optional): Candle tint intensity reflects normalized ADX. Higher intensity implies stronger conditions.
Practical Workflows & Combinations
Trend following: Use long entries when fast crosses above slow and price has held above the trend average for two bars, with ADX above threshold. Mirror this for shorts below the trend average.
Exits and stops: Consider reducing exposure when price closes on the opposite side of the trend average for two consecutive bars or when ADX fades below the threshold if the ADX filter is enabled.
Structure confirmation: Combine with higher-timeframe structure such as swing highs and lows or a simple market structure overlay for confirmation.
Multi-asset/Multi-TF: Works across liquid assets. For lower timeframes, consider a slightly lower ADX threshold; for higher timeframes, maintain or raise the threshold to avoid unnecessary flips.
Behavior, Constraints & Performance
Repaint/confirmation: Signals are based on previous-bar crossovers and are confirmed on bar close. No higher-timeframe or security calls are used. Intrabar markers are not relied upon.
Resources: The script declares `max_bars_back` of 2000, uses no loops or arrays, and employs persistent variables for pending signals and state.
Known limits: Crossover systems can lag after sudden reversals. During tight ranges, disabling the ADX filter may increase flips; keeping it enabled may skip early transitions.
Sensible Defaults & Quick Tuning
Starting point: EMA, 13/21/144, ADX length 14, ADX threshold 25, gradients on, barcolor off.
Too many flips: Increase ADX threshold or length; increase trend length; consider SMA instead of EMA.
Too sluggish: Lower ADX threshold slightly; shorten fast and slow lengths; reduce the trend length.
Colors overpowering: Increase gradient transparency or reduce gamma values toward one.
What this indicator is—and isn’t
This is a visualization and signal layer that combines crossover, regime, and strength gating. It does not predict future movements, manage risk, or execute trades. Use it alongside clear structure, risk controls, and a defined position management plan.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Quarterly Earnings - v1This script shows company fundamentals in a TradingView table: Earnings Per Share (EPS), Price-to-Earnings Ratio (P/E, TTM), Sales (in Crores), Operating Margin (OPM %), Return on Assets (ROA %), and Return on Equity (ROE %).
Daily Markers (adjustable)Draws daily vertical markers to visually indicate the beginning of a new day. These can be easily offset for your time zone, or e.g. for the beginning of your trading day.
Time Range by exp3rtsTime Window highlights a custom time range directly on your chart, helping you focus on specific market sessions or trading hours.
Key Features:
Highlights a custom time range with a shaded background
Fully adjustable start and end time (hour & minute)
Supports multiple time zones (e.g., GMT, UTC, Europe/Berlin)
Optional market color shading inside the window (bull/bear neutral tone)
Use Cases:
Mark London Open, New York Session, or any session overlap
Focus on high-probability trading hours
Visualize your backtesting timeframe or algo activity window
Track premarket or after-hours activity for futures or indices
Customization:
Set the beginning and end time in your local or exchange time zone
Choose your timezone string (e.g., "GMT", "Etc/UTC", "America/New_York")
Automatically colors candles in the time window for easy visibility