3 of SlowStochastics
스토캐스틱 3개를 한번에 볼수 있습니다. 천장과 바닥은 각 100의 위치마다 존재합니다
You can see three slow stochastics at once. The ceiling and floor are located at each 100 (0 - 100 - 200- 300)
Cerca negli script per "100万新币等于多少人民币"
Percentage Price Oscillator (PPO)The Percentage Price Oscillator (PPO) is a momentum oscillator that measures the difference between two moving averages as a percentage of the larger moving average. As with its cousin, MACD, the Percentage Price Oscillator is shown with a signal line, a histogram and a centerline. Signals are generated with signal line crossovers, centerline crossovers, and divergences. First, PPO readings are not subject to the price level of the security. Second, PPO readings for different securities can be compared, even when there are large differences in the price.
Calculations
PPO: {(12-day EMA - 26-day EMA)/26-day EMA} x 100
Signal Line: 9-day EMA of PPO
PPO Histogram: PPO - Signal Line
While MACD measures the absolute difference between two moving averages, PPO makes this a relative value by dividing the difference by the slower moving average (26-day EMA). PPO is simply the MACD value divided by the longer moving average. The result is multiplied by 100 to move the decimal place two spots.
Interpretation
As with MACD, the PPO reflects the convergence and divergence of two moving averages. PPO is positive when the shorter moving average is above the longer moving average. The indicator moves further into positive territory as the shorter moving average distances itself from the longer moving average. This reflects strong upside momentum. The PPO is negative when the shorter moving average is below the longer moving average. Negative readings grow when the shorter moving average distances itself from the longer moving average (goes further negative). This reflects strong downside momentum. The histogram represents the difference between PPO and its 9-day EMA, the signal line. The histogram is positive when PPO is above its 9-day EMA and negative when PPO is below its 9-day EMA. The PPO-Histogram can be used to anticipate signal line crossovers in the PPO.
MACD, PPO and Price
MACD levels are affected by the price of a security. A high-priced security will have higher or lower MACD values than a low-priced security, even if volatility is basically equal. This is because MACD is based on the absolute difference in the two moving averages. Because MACD is based on absolute levels, large price changes can affect MACD levels over an extended period of time. If a stock advances from 20 to 100, its MACD levels will be considerably smaller around 20 than around 100. The PPO solves this problem by showing MACD values in percentage terms.
Conclusions
The Percentage Price Oscillator (PPO) generates the same signals as the MACD, but provides an added dimension as a percentage version of MACD. The PPO levels of the Dow Industrials (price > 20K) can be compared against the PPO levels of IBM (price < 200) because the PPO “levels” the playing field. In addition, PPO levels in one security can be compared over extended periods of time, even if the price has doubled or tripled. This is not the case for the MACD.
Limitations
Despite its advantages, the PPO is still not the best oscillator to identify overbought or oversold conditions because movements are unlimited (in theory). Levels for RSI and the Stochastic Oscillator are limited and this makes them better suited to identify overbought and oversold levels.
Source: Stockcharts
Multiple Moving AveragesThis is really simple. But useful for me as I don't have a paid account. No-pro users can only use 3 indicators at once and because I rely heavily on simple moving averages it can be a real pain.
This one indicator features:
20 MA
50 MA
100 MA
200 MA
which I find are the most useful overall. The 20 and 50 over all time frame but in particular < 1 day, the 100 and 200 at > 4 hr time frames. In general I don't use the 100 MA that much. The daily 200 MA is a critical support for many assets like stocks and cryptos. I'm by no means a pro and if you are learning I recommend becoming familiar with moving averages right at the beginning.
If you want to deactivate some of the lines, you can do it via the indicator's settings icon.
Exponential Moving Average (Set of 3) [Krypt] + 13/34 EMAsI took Krypt's script and essentially added on to it.
the 20/50/100/200 EMAs should be used together as support and resistance as normal.
Wait for price to break 200 EMA
Wait for 50 EMA to cross 200 EMA
Wait for pullback to 50 EMA to open position
20 and 100 EMAs are for extra information about moving support and resistance
and 13/34 EMAs should be used in conjunction
When 13 EMA crosses 34 EMA, open position
When price gets far from 13/34, close position (because price will attempt to revert back to mean)
This is better for scalping and swing trades than the 20/50/100/200 setup.
Twitter: @AzorAhai06
Ichimoku Cloud Score v1.0This script calculates a simple Ichimoku Score based on the signals documented here , with a few additions. Each of the score components can be individually weighted via the script inputs . The output is a plot of the normalized Ichimoku score, in the range of -100 to 100.
This script has been heavily modified from 'Ichimoku Cloud Signal Score v2.0.0 '. Credit to user 'dashed' for the initial implementation.
This has been modified with several refinements:
Clean/Organized Code
Simplified Inputs
Improved Style
Scores normalized to a range (-100, 100)
Bugfixes and Improvements
Script Inputs: i.imgur.com
Volume RatioDefinition:
Volume ratio can be obtained in a similar way to RSI.
Volume Ratio (%) = 100 - 100/(1+vr)
The parameter "vr" is defined as
vr=(A+U/2)/(D+U/2)
A=Total volume of the periods when the price advanced
D=Total volume of the periods when the price declined
U=Total volume of the periods when the price unchanged
After substitution, following expression can be derived and the denominator represents total volume of all periods.
Volume Ratio (%) = 100 x (A+U/2)/(A+D+U)
Notes:
A similar method to interpret RSI can be employed.
1) Overbought level over 70% and oversold level under 30%. These levels need to be adjusted according to the periods, time frames and issues.
2) Bullish picture over 50% line and bearish picture under 50% line.
3) Crossing oversold level to the upside can be taken as a confirmation of bullish reversal. - and vice versa for a bearish reversal.
4) After a long-term bearish market, the increase of volume can happen in the early stage of a bullish market.
5) Buying opportunity can be suggested when the volume ratio is declining and the price is either advancing or leveling off.
CCI with Volume Weighted EMA Here is an attempt to improve on the CCI using a volume weighted ema which is then plugged into the CCI formula.
Use:
The CCI with VW EMA is an oscillator that gives readings between -100 and +100. The usual use is to 'go long' with values over +100 and short on values less than -100.
Another use of this oscillator is a countertrend indicator where one sells at crosses under +100 and buys on crosses over -100.
Multi-Functional Fisher Transform MTF with MACDL TRIGGERWhat this indicator gives you is a true signal when price is exhausted and ready for a fast turnaround. Fisher Transform is set for multi-time frame and also allows the user to change the length. This way a user can compare two or more time spans and lengths to look for these MACDL divergent triggers after a Fisher exhaustion. With so many indicators, it's probably best to merge these indicators and change the Fisher and Trigger colors so you can still have a look at price action (remember to scale right after merger). I've noticed from time to time when you have Fisher 34 100 and 300 up and running on two different time frames such as 5 and 15 min charts, with MACDL triggers on the 100/300 or 34/100 you get a high probability trade trigger. However, there are rare exceptions such as when price moves in a parabolic state up or down for a long period where this indication does not work. Ideally this indicator works best in a sideways market or slow rising/descending moving market.
This indicator was worked on by Glaz, nmike and myself
LazyBear also introduced the MACDL indicator
CCI Crossover AlertThis very simple indicator will give you a blue background where the CCI crossed from below -100 to above -100, and a red background where it crossed from above 100 to below 100.
Absorption PRO V2
Absorption PRO
Identify smart money absorption and hidden reversals with precision.
The Absorption PRO indicator detects abnormal trading activity and potential absorption zones — moments when large orders absorb market pressure before a reversal or continuation. It uses dynamic volume deviation and candle structure filters to highlight strong absorption areas visually.
⚙️ Parameters
Base period (mean & deviation): 200
Defines the lookback length used to calculate the average and standard deviation of volume.
A higher value (like 200) makes the indicator smoother and better for higher timeframes.
Minimum Z-score (abnormal volume): 2
Sets the threshold for detecting abnormal volume spikes.
The higher this value, the rarer (but stronger) the detected absorption signals.
Small body limit: 0.25
Filters candles with small real bodies compared to their total range — ideal for spotting absorption with high volume and low price movement (classic absorption signature).
Background color intensity (0–100): 85
Adjusts the opacity of the visual background highlight.
Higher values make absorption zones more visible on the chart.
📊 Usage
Look for highlighted bars or zones when volume is abnormally high, but the candle body remains small — indicating possible absorption.
Combine it with price structure and delta/volume profile tools for confirmation.
CRT 4H/1D + FVG + OB (Entry/SL/TP Alerts) — v2.0 Gökhan//@version=5
indicator("CRT 4H/1D + FVG + OB (Entry/SL/TP Alerts) — v2.0", overlay=true, max_labels_count=500, max_lines_count=500)
//──── Inputs
use4H = input.bool(true, "Use 4H CRT")
use1D = input.bool(true, "Use 1D CRT")
needFVG = input.bool(true, "Require FVG confirmation")
useOBfilter = input.bool(false, "Require simple OB filter (prev body mid)")
lookFVGbars = input.int(5, "FVG lookback bars", minval=2, maxval=20)
atrLen = input.int(14, "ATR Length", minval=5)
atrMult = input.float(0.5, "ATR SL buffer (xATR)", step=0.05)
lineW = input.int(2, "Line Width", minval=1, maxval=4)
boxTransp = input.int(85, "Range Box Transparency", minval=0, maxval=100)
showBoxes = input.bool(true, "Show HTF Range Boxes")
showLines = input.bool(true, "Show HTF Lines & 50%")
showPlan = input.bool(true, "Show Entry/SL/TP lines when active")
persistBars = input.int(30, "Keep plan on chart (bars)", minval=5, maxval=500)
//──── Colors
col4H = color.new(color.teal, 0)
col1D = color.new(color.orange, 0)
colUp = color.new(color.lime, 0)
colDn = color.new(color.red, 0)
colMid = color.new(color.gray, 30)
colPlan = color.new(color.blue, 0)
//──── Helpers: previous HTF candle OHLC
f_prevHTF(tf) =>
hh = request.security(symbol=syminfo.tickerid, timeframe=tf, expression=high , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
ll = request.security(symbol=syminfo.tickerid, timeframe=tf, expression=low , gaps=barmerge.gaps_off, lookahead=barmerge.lookahead_off)
= f_prevHTF("240")
= f_prevHTF("D")
H4_hi = nz(H4_hi_raw)
H4_lo = nz(H4_lo_raw)
D1_hi = nz(D1_hi_raw)
D1_lo = nz(D1_lo_raw)
H4_mid = (H4_hi + H4_lo)/2.0
D1_mid = (D1_hi + D1_lo)/2.0
//──── Local
h = high, l = low, c = close, o = open
//──── CRT: Sweep & Reclaim
H4_upSweep = use4H and (h > H4_hi) and (c < H4_hi) // yukarı süpür → aşağı dönüş
H4_dnSweep = use4H and (l < H4_lo) and (c > H4_lo) // aşağı süpür → yukarı dönüş
D1_upSweep = use1D and (h > D1_hi) and (c < D1_hi)
D1_dnSweep = use1D and (l < D1_lo) and (c > D1_lo)
// Hangi TF tetikledi? Öncelik: 4H sonra 1D (isteğe göre değiştirilebilir)
bearSweep = H4_upSweep or (not H4_upSweep and D1_upSweep)
bullSweep = H4_dnSweep or (not H4_dnSweep and D1_dnSweep)
useH4levels = H4_upSweep or H4_dnSweep
rngHi = useH4levels ? H4_hi : D1_hi
rngLo = useH4levels ? H4_lo : D1_lo
rngMid= useH4levels ? H4_mid: D1_mid
//──── FVG (classic 3-candle)
// Bullish FVG at bar i: low > high
// Bearish FVG at bar i: high < low
f_hasBullFVG(window) =>
ok = false
for i = 0 to window-1
ok := ok or (low > high )
ok
f_hasBearFVG(window) =>
ok = false
for i = 0 to window-1
ok := ok or (high < low )
ok
bullFVG = f_hasBullFVG(lookFVGbars) // yukarı dönüş teyidi
bearFVG = f_hasBearFVG(lookFVGbars) // aşağı dönüş teyidi
//──── Basit OB filtresi (prev body midpoint reclaim)
// Bullish: c > (o +c )/2
// Bearish: c < (o +c )/2
prevMid = (o + c ) / 2.0
bullOBok = c > prevMid
bearOBok = c < prevMid
// Zorunlu teyit seti
bullConfirm = (not needFVG or bullFVG) and (not useOBfilter or bullOBok)
bearConfirm = (not needFVG or bearFVG) and (not useOBfilter or bearOBok)
// Nihai SETUP (yön + teyit)
bearSetup = bearSweep and bearConfirm
bullSetup = bullSweep and bullConfirm
//──── Lines & Boxes
plot(showLines and use4H ? H4_hi : na, "4H High", col4H, lineW, plot.style_linebr)
plot(showLines and use4H ? H4_lo : na, "4H Low", col4H, lineW, plot.style_linebr)
plot(showLines and use4H ? H4_mid: na, "4H 50%", colMid, 1, plot.style_linebr)
plot(showLines and use1D ? D1_hi : na, "1D High", col1D, lineW, plot.style_linebr)
plot(showLines and use1D ? D1_lo : na, "1D Low", col1D, lineW, plot.style_linebr)
plot(showLines and use1D ? D1_mid: na, "1D 50%", colMid, 1, plot.style_linebr)
var box h4Box = na
var box d1Box = na
if showBoxes and barstate.islast
if use4H and not na(H4_hi) and not na(H4_lo)
if na(h4Box)
h4Box := box.new(bar_index-1, H4_lo, bar_index, H4_hi, bgcolor=color.new(col4H, boxTransp), border_color=col4H)
else
box.set_left(h4Box, bar_index-1), box.set_right(h4Box, bar_index)
box.set_bottom(h4Box, H4_lo), box.set_top(h4Box, H4_hi)
if use1D and not na(D1_hi) and not na(D1_lo)
if na(d1Box)
d1Box := box.new(bar_index-1, D1_lo, bar_index, D1_hi, bgcolor=color.new(col1D, boxTransp), border_color=col1D)
else
box.set_left(d1Box, bar_index-1), box.set_right(d1Box, bar_index)
box.set_bottom(d1Box, D1_lo), box.set_top(d1Box, D1_hi)
//──── Entry/SL/TP Plan (stateful)
atr = ta.atr(atrLen)
tick = syminfo.mintick
var bool planActive = false
var bool planBull = na
var float planEntry = na
var float planSL = na
var float planTP1 = na
var float planTP2 = na
var int planBars = 0
// Yeni setup oluştuğunda plan kur
if barstate.isconfirmed
if bearSetup
planActive := true, planBull := false
planEntry := rngHi // retest: prev High
planSL := math.max(high, rngHi) + atrMult*atr
planTP1 := rngMid
planTP2 := rngLo
planBars := 0
label.new(bar_index, high, "CRT BEAR setup\nEntry≈"+str.tostring(planEntry)+"\nSL≈"+str.tostring(planSL)+"\nTP1≈"+str.tostring(planTP1)+" TP2≈"+str.tostring(planTP2),
style=label.style_label_down, color=color.new(colDn,0), textcolor=color.white, size=size.tiny)
if bullSetup
planActive := true, planBull := true
planEntry := rngLo // retest: prev Low
planSL := math.min(low, rngLo) - atrMult*atr
planTP1 := rngMid
planTP2 := rngHi
planBars := 0
label.new(bar_index, low, "CRT BULL setup\nEntry≈"+str.tostring(planEntry)+"\nSL≈"+str.tostring(planSL)+"\nTP1≈"+str.tostring(planTP1)+" TP2≈"+str.tostring(planTP2),
style=label.style_label_up, color=color.new(colUp,0), textcolor=color.white, size=size.tiny)
// Plan takibi
entryTouched = planActive and ((planBull and low <= planEntry) or (not planBull and high >= planEntry))
tp1Hit = planActive and ((planBull and high >= planTP1) or (not planBull and low <= planTP1))
tp2Hit = planActive and ((planBull and high >= planTP2) or (not planBull and low <= planTP2))
slHit = planActive and ((planBull and low <= planSL) or (not planBull and high >= planSL))
if planActive
planBars += 1
// de-activate on exit
if slHit or tp2Hit or planBars > persistBars
planActive := false
// Görsel plan çizgileri
plot(showPlan and planActive ? planEntry : na, "Entry", color.new(colPlan, 0), 2, plot.style_linebr)
plot(showPlan and planActive ? planSL : na, "SL", color.new(color.red, 0), 2, plot.style_linebr)
plot(showPlan and planActive ? planTP1 : na, "TP1", color.new(color.gray, 0), 1, plot.style_linebr)
plot(showPlan and planActive ? planTP2 : na, "TP2", color.new(color.gray, 0), 1, plot.style_linebr)
// İşaretler
plotshape(bearSetup, title="Bear Setup", style=shape.triangledown, location=location.abovebar, size=size.tiny, color=colDn, text="CRT▼")
plotshape(bullSetup, title="Bull Setup", style=shape.triangleup, location=location.belowbar, size=size.tiny, color=colUp, text="CRT▲")
//──── Alerts
alertcondition(bearSetup, title="CRT Setup Ready (Bearish)",
message="CRT Bearish setup ready on {{ticker}} {{interval}} | Entry≈{{plot(\"Entry\")}} SL≈{{plot(\"SL\")}} TP1≈{{plot(\"TP1\")}} TP2≈{{plot(\"TP2\")}}")
alertcondition(bullSetup, title="CRT Setup Ready (Bullish)",
message="CRT Bullish setup ready on {{ticker}} {{interval}} | Entry≈{{plot(\"Entry\")}} SL≈{{plot(\"SL\")}} TP1≈{{plot(\"TP1\")}} TP2≈{{plot(\"TP2\")}}")
alertcondition(entryTouched, title="CRT Retest Filled",
message="CRT Entry retest filled on {{ticker}} {{interval}}")
US Leverage Overlay — Margin Debt & Total Credit (YoY / Z-score)What this does
An overlay indicator that brings U.S. leverage proxies from FRED onto your main price chart (left axis). Choose between a proxy for investor margin debt or total credit market debt and view them as YoY %, Z-score of YoY, or an Indexed Level so they’re comparable with price without wrecking the scale.
Data sources (FRED symbols)
--- Margin (investor leverage proxy): FRED:BOGZ1FL663067003Q
Brokers & Dealers; Receivables Due from Customers ≈ margin loans (quarterly).
--- TotalCredit (economy-wide leverage): FRED:TCMDO
All sectors; Debt Securities & Loans; Liability (quarterly).
Note: These are quarterly series. The indicator samples monthly and holds values between official prints, so you’ll see step-like updates when new data drops.
Views (pick one in settings)
--- YoY % — 12-month rate of change. Above 0% = leverage expanding; below 0% = contracting.
--- Z-score (YoY) — Standardizes YoY vs. its recent history to flag unusual moves (regime shifts).
--- Indexed Level — 100 × (level / moving average), a compact “above/below trend” view.
How to read quickly
--- Rising YoY % > 0 → leverage expansion (often supportive for risk).
--- Falling YoY % < 0 → deleveraging headwind.
--- Z-score spikes (±2) → unusually fast changes; watch for volatility or policy inflections.
--- Indexed Level crossing down through 100 → slipping below trend.
Inputs
--- Data source: Margin or TotalCredit
--- YoY/Z-score lookbacks and Index baseline length
--- Overlay: overlay=true, scale=scale.left (uses its own left axis by default)
Tips
--- If it spawns in a sub-pane, right-click the label → Move to → Main chart.
--- For context, consider adding related series on separate panes:
FRED:TOTALSL (Consumer Credit), FRED:REVOLSL (Credit Cards),
FRED:BUSLOANS (C&I Loans), FRED:TDSP (Debt Service Ratio).
--- Occasionally FRED returns “Failed to fetch”; re-add or reload fixes it.
Why it’s useful
Equity drawdowns often line up with turns in leverage (households, corporates, or brokers). This overlay gives you a clean, normalized read so you can spot expansion vs. contraction alongside price action.
Compatibility
--- Pine Script® v6
--- Works on any chart timeframe (data internally sampled monthly)
Educational use only — not financial advice.
Multi EMA + Indicators + Mini-Dashboard + Reversals v6📘 Multi EMA + Indicators + Mini-Dashboard + Reversals v6
🧩 Overview
This indicator is a multi-EMA setup that combines trend, momentum, and reversal analysis in a single visual framework.
It integrates four exponential moving averages (EMAs), key oscillators (RSI, MACD, Stochastic, CCI), volatility filtering (ATR), and a dynamic mini-dashboard that summarizes all signals in real time.
Its purpose is to help traders visually confirm trend alignment, filter valid entries, and identify possible trend continuation or reversal points.
It can display buy/sell arrows, detect reversal candles, and issue alerts when trading conditions are met.
⚙️ Core Components
1. Moving Averages (EMA Setup)
EMA1 (fast) and EMA2 (medium) define the short-term trend and trigger bias.
When the price is above both EMAs → bullish bias.
When below → bearish bias.
EMA3 and EMA4 act as trend filters. Their slopes (up or down) confirm overall momentum and help validate signals.
Each EMA has customizable lengths, sources, and colors for up/down trends.
This “EMA stack” is the foundation of the setup — a structured trend-following framework that adapts to market speed and volatility.
2. Momentum and Confirmation Filters
Each indicator can be individually enabled or disabled for flexibility.
RSI: confirms direction (above/below 50).
MACD: detects momentum crossover (MACD > Signal for bullish confirmation).
Stochastic: identifies trend continuation (K > D for longs, K < D for shorts).
CCI: adds trend bias above/below a threshold.
ATR Filter: filters out small, low-volatility candles to reduce noise.
You can activate only the filters that fit your trading plan — for instance, trend traders often use RSI and MACD, while scalpers may rely on Stochastic and ATR.
3. Reversal Detection
The indicator includes an optional Reversal Section that independently detects potential turning points.
It combines multiple configurable criteria:
Candlestick patterns (Bullish Hammer, Shooting Star).
Large Candle filter — detects unusually large bars (relative to close).
Price-to-EMA distance — identifies overextended moves that might revert.
RSI Divergence — detects potential momentum shifts.
RSI Overbought/Oversold zones (70/30 by default).
Doji Candles — sign of indecision.
A bullish or bearish reversal signal appears when enough selected criteria are met.
All sub-modules can be toggled on/off individually, giving you full control over sensitivity.
4. Signal Logic
Buy and sell signals are triggered when EMA alignment and the chosen confirmations agree:
Buy Signal
→ Price above EMA1 & EMA2
→ Confirmations (RSI/MACD/Stoch/CCI/ATR) pass
→ Trend filters (EMA3/EMA4) point upward
Sell Signal
→ Price below EMA1 & EMA2
→ Confirmations align bearishly
→ Trend filters (EMA3/EMA4) slope downward
Reversal signals can appear independently, even against the current EMA trend, depending on your settings.
5. Visual Dashboard
A mini-dashboard appears near the chart showing:
Current trade bias (LONG / SHORT / NEUTRAL)
EMA3 and EMA4 trend directions (↑ / ↓)
Quick visual bars (🟩 / 🟥) for each filter: RSI, MACD, Stoch, ATR, CCI, EMA filters
Reversal criteria status (Doji, RSI divergence, candle size, etc.)
This panel gives you a compact overview of all indicator states at a glance.
The color of the panel changes dynamically — green for bullish, red for bearish, gray for neutral.
6. Alerts
Built-in alerts allow automation or notifications:
Buy Alert
Sell Alert
Reversal Buy
Reversal Sell
You can connect these alerts to TradingView notifications or external bots for semi-automated execution.
💡 How to Use
✅ Trend-Following Setup
Focus on trades in the direction of EMA1 & EMA2.
Confirm with EMA3 & EMA4 trending in the same direction.
Use RSI/MACD/Stoch filters to ensure momentum supports the trade.
Avoid entries when ATR filter indicates low volatility.
🔄 Reversal Setup
Enable the Reversal section for potential tops/bottoms.
Look for reversal buy signals near support zones or after strong downtrends.
Use RSI divergence or Doji + Hammer signals as confirmation.
Combine with key chart areas (supply/demand or previous swing levels).
⚖️ Combination Approach
Trade continuation signals when all EMAs are aligned and filters are green.
Trade reversals only when at a key area (support/resistance) and confirmed by reversal conditions.
Always check higher-timeframe bias before entering a trade.
🧭 Practical Tips
Use different EMA sets for different timeframes:
9/21/50/100 for swing or trend trades.
5/13/34/89 for intraday scalping.
Turn off filters you don’t use to reduce lag.
Always validate signals with price structure, not just indicator alignment.
Practice in replay mode before live trading.
🗺️ Key Chart Confluence (Highly Recommended)
Although the indicator provides structured signals, its best use is in confluence with:
Support and resistance levels
Supply/demand zones
Trendlines and channels
Liquidity pools
Volume clusters
Signals aligned with strong key areas on the chart tend to have greater reliability than isolated indicator triggers.
I use EMA 1 - 20 Open ; EMA 2 - 20 Close ; EMA 3 - 50 ; EMA 4 - 200 or 100 , but that's me...
⚠️ Important Disclaimer
This indicator is a technical tool, not a guarantee of results.
Trading involves risk, and no signal is ever 100% accurate.
Every trader should develop a personal strategy, use proper risk management, and adapt settings to their instrument and timeframe.
Always combine indicator signals with key chart areas, higher-timeframe context, and your own analysis before taking a trade.
Volume HeatMap Divergence [BigBeluga]🔵 OVERVIEW
The Volume HeatMap Divergence is a smart volume visualization tool that overlays normalized volume data directly on the chart. Using a color heatmap from aqua to red, it transforms raw volume into an intuitive scale — highlighting areas of weak to intense market participation. Additionally, it detects volume-based divergences from price to signal potential reversals or exhaustion zones. Combined with clear visual labeling, this tool empowers traders with actionable volume insights.
🔵 CONCEPTS
Normalized Volume Heatmap : Volume is normalized to a 0–100% scale and visually represented as candles below the chart.
float vol = volume / ta.percentile_nearest_rank(volume, 1000, 100) * 100
Bar Coloring : Price candles are dynamically colored based on volume intensity.
Volume Divergence Logic :
Bullish Divergence : Price forms a lower low, but volume forms a higher low.
Bearish Divergence : Price forms a higher high, but volume forms a lower high.
Dynamic Detection Range : Customizable range ensures divergence signals are meaningful and not random.
Volume Labels : Additional info on divergence bars shows both the actual volume and its normalized % score.
🔵 FEATURES
Volume Heatmap Plot : Normalized volume values colored using a smooth gradient from aqua (low) to red (high).
Price Bar Coloring : Candlesticks on the main chart adopt the same heatmap color based on volume.
Divergence Detection :
Bullish divergence with label and low marker
Bearish divergence with label and high marker
Dual Divergence Labels :
On the volume plot : Direction (Bull/Bear), raw volume, and normalized %
On the price chart : Shape labels showing "Bull" or "Bear" at local highs/lows
Custom Inputs :
Divergence range (min & max), pivot detection distance (left/right)
Toggle to show/hide divergence labels, volume, and % text
Clear Bull/Bear Coloring : Fully customizable label and line colors for both bullish and bearish signals.
🔵 HOW TO USE
Use the indicator as an overlay to monitor real-time volume strength using the heatmap color.
Watch for divergence markers:
Bullish divergence: Candle shows higher volume while price makes a new low
Bearish divergence: Candle shows lower volume while price makes a new high
Use the volume info labels to verify the context of divergence:
Actual volume at divergence candle
Normalized % of that volume compared to past 1000 bars
Adjust pivot sensitivity using "Pivot Left" and "Pivot Right" to tune signal frequency and lag with a right pivot length.
Use divergence zones as early warnings for potential reversals or trend shifts.
Disable or customize labels in settings depending on your charting preferences.
🔵 CONCLUSION
Volume HeatMap Divergence merges heatmap-style volume visualization with intelligent divergence detection — giving traders a clean yet powerful edge. By revealing hidden disconnections between price and participation, it helps users spot exhaustion moves or hidden accumulation zones before the market reacts. Whether you’re a scalper, swing trader, or intraday strategist, this tool offers real-time clarity on who’s in control behind the candles.
Daily MA — Higher-Timeframe Daily Moving Average OverlayThis indicator plots a clean, higher-timeframe daily moving average directly on any chart, so you can always see where price sits relative to the daily trend — even while trading on lower timeframes (1m, 5m, etc.).
It’s designed to be:
Simple – a single, configurable daily MA line
Consistent – always anchored to the 1D timeframe
Flexible – choose EMA or SMA and customize line width/color
⸻
What This Indicator Does
Pulls the 1-Day (1D) moving average of the current symbol, regardless of your chart timeframe.
Lets you choose between EMA (Exponential Moving Average) or SMA (Simple Moving Average).
Plots that daily MA as a smooth overlay on your current chart.
Keeps the line visually clean and continuous, making it easy to see daily trend and dynamic support/resistance.
This is not a signals/strategy script. It doesn’t generate buy/sell arrows or backtest logic. It’s a context tool for visualizing the daily trend while you execute your own strategy.
⸻
Why a Daily MA Overlay Is Useful
Traders commonly use a daily moving average to:
Anchor intraday trades to the higher-timeframe trend
Longs when price is holding above the Daily MA
Shorts or caution when price is rejecting from the Daily MA
Identify dynamic support/resistance
Price often reacts around well-watched daily MAs (e.g., 50, 100, 200)
Filter setups
Only take long setups when price is above the daily trend line
Avoid counter-trend trades when price is extended far from the Daily MA
Because this script forces the MA to always be computed on 1D, you don’t have to switch back and forth between intraday and daily charts to keep track of the bigger picture.
⸻
Inputs & Settings
MA Length
Default: 200
Any positive integer (min 1)
Common examples: 50, 100, 200 for trend structure
MA Type
EMA – reacts faster to recent price (default)
SMA – smoother, slower, more “classic” feel
Line Width
Default: 2
Range: 1 to 10
Increase if you want the Daily MA to stand out clearly against other indicators
Color
Default: Purple tone
Fully customizable – pick any color that works with your chart theme
⸻
How to Use It in Your Workflow
Intraday traders (scalpers/day-traders):
Apply the indicator to your 1m/5m/15m charts.
Use the Daily MA as a trend filter :
Only look for long scalps when price is above the Daily MA.
Be more cautious with longs or consider shorts when price is below it.
Swing traders :
Use it on 1H/4H charts to see where price sits relative to a longer-term daily trend.
Watch for:
Pullbacks to the Daily MA in an uptrend as potential demand zones.
Rejections at the Daily MA in a downtrend as potential supply zones.
Risk management & context :
Avoid chasing extended moves far from the Daily MA.
Mark confluence with other tools (support/resistance, volume profile, etc.) around the Daily MA.
⸻
Notes & Limitations
The moving average itself is calculated from daily candles , then displayed on your current timeframe.
This is a visual aid only . It does not guarantee future performance or provide financial advice.
Always combine this indicator with your own analysis, risk management, and trading plan.
⸻
Disclaimer :
This script is provided for educational and informational purposes only. It is not financial advice and does not constitute a recommendation to buy or sell any financial instrument. Always do your own research and trade at your own risk.
Exhaustion Reversal Signals - ENHANCEDOverview
This is a reversal detection indicator that combines multiple technical analysis components to identify potential market turning points.
Core Components
1. Range Oscillator
Measures price deviation from a moving average (EMA/SMA) normalized by ATR
Values above +100 = bullish exhaustion zone
Values below -100 = bearish exhaustion zone
Detects momentum flattening (slope deceleration)
2. Stochastic Oscillator
Standard %K and %D with customizable parameters
Crossover detection (K crossing above/below D)
Oversold (<20) and Overbought (>80) zones
Momentum calculation (rate of change in K)
3. 🚀 Advanced Features
Early Detection System:
Identifies momentum exhaustion before confirmed crossovers
Detects when oscillator slope flattens (approaching zero)
Provides "advance warning" signals with relaxed thresholds
............................................................................................
Trend Filter:
50-period EMA for trend context
Three strength modes:
Soft: Allow all signals
Medium: Prefer trend-aligned signals
Strict: Only counter-trend reversals
Confidence Scoring (0-100%):
Oscillator extremity (30 pts)
Stochastic position (25 pts)
K-D divergence strength (20 pts)
Momentum alignment (15 pts)
Trend alignment (10 pts)
Minimum confidence threshold filtering
Visual Enhancements:
Dynamic background gradient (red→green based on oscillator)
Momentum bar coloring when slope flattens
Transparency adjustments based on momentum
Top Finder & Dip Hunter [BackQuant]Top Finder & Dip Hunter
A practical tool to map where price is statistically most likely to exhaust or mean-revert. It builds objective support for dips and resistance for tops from multiple methodologies, then filters raw touches with volume, momentum, trend, and price-action context to surface higher-quality reversal opportunities.
What this does
Draws a Dip Support line and a Top Resistance line using the method you select, or a blended hybrid.
Evaluates each touch/penetration against Quality Filters and assigns a 0–100 composite score.
Prints clean DIP and TOP signals only when depth/extension and quality pass your thresholds.
Optionally annotates the chart with the computed quality score at signal time.
Why it’s useful
Objectivity: Converts vague “looks extended” into rules, reduces discretion creep.
Signal hygiene: Filters raw touches using trend, volume, momentum, and candle structure to avoid obvious traps.
Adaptable regimes: Switch methods, sensitivity, and lookbacks to match choppy vs trending conditions.
How support and resistance are built
Pick one per side, or use “Hybrid.”
Dynamic: Anchors to the extreme of a lookback window, padded by recent ATR, so buffers expand in volatile periods and contract when calm.
Fibonacci: Uses the 0.618/0.786 retracement pair inside the current swing window to target common reaction zones.
Volatility: Uses a moving-average basis with standard-deviation bands to capture statistically stretched moves.
Volume-Weighted: Centers off VWAP and penalizes deviations using dispersion of price around VWAP, helpful on intraday instruments.
Hybrid: A weighted average of the above to smooth out single-method biases.
When a touch becomes a signal
Depth/extension test:
Dips must penetrate their support by at least Min Dip Depth % .
Tops must extend above resistance by at least Min Top Rise % .
Quality Score gate: The composite must clear Min Quality Score . Components:
Trend alignment: Favor dips in bullish regimes and tops in bearish regimes using EMAs and RSI.
Volume confirmation: Reward expansion or spikes versus a 20-period baseline.
RSI context: Prefer oversold for dips, overbought for tops.
Momentum shift: Look for short-term momentum turning in the expected direction.
Candle structure: Reward hammer/shooting-star style responses at the level.
How to use it
Pick your regime:
Range/chop, small caps, mean-revert intraday → Volatility or Volume Weighted .
Cleaner swings/trends → Dynamic or Fibonacci .
Unsure or mixed conditions → Hybrid .
Set windows: Start with Lookback = 50 for both sides. Increase in higher timeframes or slow assets, decrease for fast scalps.
Tune sensitivity: Raise Dip/Top Sensitivity to widen buffers and reduce noise. Lower to be more aggressive.
Gate with quality: Begin with Min Quality Score = 60 . Push to 70–80 for cleaner swing entries, relax to 50–60 for scalps.
Act on first prints: The script only fires on new qualified events. Use the score label to prioritize A-setups.
Typical workflows
Intraday futures/crypto: Volume-Weighted or Volatility methods for both sides, higher Sensitivity , require Volume Filter and Momentum Filter on. Look for DIP during opening drive exhaustion and TOP near late-session fatigue.
Swing equities/FX: Dynamic or Fibonacci with moderate sensitivity. Keep Trend Filter on to only take dips above the 200-EMA and tops below it.
Countertrend scouts: Lower Min Dip Depth % / Min Top Rise % slightly, but raise Min Quality Score to compensate.
Reading the chart
Lines: “Dip Support” and “Top Resistance” are the current actionable rails, lightly smoothed to reduce flicker.
Signals: “DIP” prints below bars when a qualified dip appears, “TOP” prints above for qualified tops.
Scores: Optional labels show the composite at signal time. Favor higher numbers, especially when aligned with higher-timeframe trend.
Background hints: Light highlights mark raw touches meeting depth/extension, even if they fail quality. Treat these as early warnings.
Tuning tips
If you get too many false DIP signals in downtrends, raise Min Dip Depth % and keep Trend Filter on.
If tops appear late in squeezes, lower Top Sensitivity slightly or switch top side to Fibonacci .
On assets with erratic volume, prefer Volatility or Dynamic methods and down-weight the Volume Filter .
For strict systems, increase Min Quality Score and require both Volume and Momentum filters.
What this is not
It is not a blind reversal signal. It’s a structured context tool. Combine with your risk plan and higher-timeframe map.
It is not a guarantee of mean reversion. In strong trends, expect fewer, higher-score opportunities and respect invalidation quickly.
Suggested presets
Scalp preset: Lookback 30–40, Sensitivity 1.2–1.5, Quality ≥ 55, Volume & Momentum filters ON.
Swing preset: Lookback 75–100, Sensitivity 1.0–1.2, Quality ≥ 70, Trend & Volume filters ON.
Chop preset: Volatility/Volume-Weighted methods, Quality ≥ 60, Momentum filter ON, RSI emphasis.
Input quick reference
Dip/Top Method: Choose the model for each side or “Hybrid” to blend.
Lookback: Swing window the levels are built from.
Sensitivity: Scales volatility padding around levels.
Min Dip Depth % / Min Top Rise %: Minimum breach/extension to qualify.
Quality Filters: Trend, Volume, Momentum toggles, plus Min Quality Score gate.
Visuals: Colors and whether to print score labels.
Best practices
Map higher-timeframe trend first, then act on lower-timeframe DIP/TOP in the trend’s favor.
Use the score as triage. Skip mediocre prints into news or at session open unless score is exceptional.
Pre-define stop placement relative to the level you used. If a DIP fails, exit on loss of structure rather than waiting for the next print.
Bottom line: Top Finder & Dip Hunter codifies where reversals are most defensible and only flags the ones with supportive context. Tune the method and filters to your market, then let the score keep your playbook disciplined.
💎 ProfittoPath – Glass HUD//@version=5
indicator("💎 ProfittoPath – Glass HUD", overlay=true)
// === Inputs ===
entryPrice = input.float(0.0, "Entry Price", step=0.01)
qty = input.float(1.0, "Position Size", step=1.0)
isLong = input.bool(true, "Long Trade?")
offsetY = input.int(60, "Vertical Offset (ticks)", step=1)
showPercent = input.bool(true, "Show % Change")
// === Calculations ===
inTrade = entryPrice > 0
priceDiff = inTrade ? (close - entryPrice) * (isLong ? 1 : -1) : na
plUsd = inTrade ? priceDiff * qty : na
plPercent = inTrade ? (priceDiff / entryPrice) * 100 : na
isProfit = inTrade ? (plUsd >= 0) : false
// === Colors ===
gold = color.rgb(255,215,0)
lossRed = color.rgb(255,90,90)
txtColor = isProfit ? gold : lossRed
bgGlass = color.new(color.rgb(15,15,15),85)
// === Entry Line ===
var line entryLine = na
if barstate.isfirst
entryLine := line.new(bar_index, entryPrice, bar_index, entryPrice, extend=extend.both, color=color.new(gold,40), style=line.style_dotted)
if inTrade
line.set_color(entryLine, color.new(gold,40))
else
line.set_color(entryLine, color.new(color.black,100))
// === Panel Label ===
var label pnlLabel = na
if barstate.isfirst
pnlLabel := label.new(bar_index, na, "", style=label.style_label_center, textcolor=txtColor, color=bgGlass, size=size.large)
// === Update ===
if inTrade
string pnlText = "💎 ProfittoPath Glass HUD\n"
pnlText += "────────────────────────\n"
pnlText += "Trade: " + (isLong ? "LONG 📈" : "SHORT 📉") + "\n"
pnlText += "Entry: " + str.tostring(entryPrice, format.mintick) + "\n"
pnlText += "Current: " + str.tostring(close, format.mintick) + "\n"
pnlText += "P/L: " + (isProfit ? "+" : "") + str.tostring(plUsd, format.mintick) + " USD"
if showPercent
pnlText += " (" + str.tostring(plPercent, "#.##") + "%)"
pnlText += "\n"
pnlText += "────────────────────────\n"
pnlText += "Status: " + (isProfit ? "PROFIT ✅" : "LOSS ❌")
label.set_text(pnlLabel, pnlText)
label.set_x(pnlLabel, bar_index)
label.set_y(pnlLabel, entryPrice + offsetY * syminfo.mintick)
label.set_color(pnlLabel, bgGlass)
label.set_textcolor(pnlLabel, txtColor)
else
label.set_text(pnlLabel, "💎 Set Entry Price ↑")
label.set_x(pnlLabel, bar_index)
label.set_y(pnlLabel, close)
label.set_color(pnlLabel, bgGlass)
label.set_textcolor(pnlLabel, gold)
Enhanced Auto Levels & TrendlinesOverview
The Enhanced Auto Levels & Trendlines (EAL&T) is a powerful, all-in-one indicator designed to automate the detection and visualization of key market structures. It combines auto-drawn trendlines, support/resistance levels with volume-based shadows and labels, and auto-flipping Fibonacci retracements/extensions. This tool helps traders identify potential reversals, breakouts, and targets without manual drawing.
Built on Pine Script v5, it uses pivot-based calculations for accuracy and includes customizable options for repainting, extensions, and sources. It's ideal for swing traders, scalpers, and analysts who want clean, dynamic charts.
Key Features
Auto Trendlines: Detects bullish/bearish trends based on pivots, with breakout detection and optional extensions/targets.
Auto Levels: Draws horizontal S/R levels from recent pivots, with "wick shadows" (boxes) highlighting volume strength and % buy/sell labels for sentiment.
Fibonacci Levels: Auto-flips between latest pivot high/low, showing retracements (0.236–0.786) and extensions (1.272–3.0) with customizable styles.
Customization: Override price sources, adjust lengths, colors, styles, and more. Supports repainting for real-time accuracy.
Performance: Limited to 500 bars back and 500 lines for efficiency; no heavy computations.
Visual Aids: Transparent shadows, extendable lines, and small labels for uncluttered charts.
How to Use
Step-by-Step Guide
Add to Chart: Load the indicator. Start with defaults.
Interpret Visuals:
Trendlines: Green (bullish/up), Red (bearish/down). Watch for breakouts – line "breaks" and extends if enabled.
Levels: Horizontal lines with shadows (boxes) showing wick strength. Green above price (resistance), Red below (support). Labels show % buy/sell sentiment.
Fibs: From latest swing low (0.0) to high (1.0). Use 0.5/0.618 for retracements; 1.272+ for targets. Flips automatically on trend change.
Customize for Your Strategy:
Volatile Markets (e.g., Crypto): Increase tl_length to 20+ for fewer false trends. Enable repainting for real-time.
Ranging Markets (e.g., Forex): Set override_source=true, custom_source=close for wick-ignoring pivots.
Fib Focus: Increase fib_extension_bars for longer projections. Hide trendlines if cluttered.
Levels Tuning: Shorten pivot lengths (e.g., 20) for intraday; lengthen (100+) for swings. Set shadow transparency to 100 to hide boxes.
Trading Ideas:
Breakout Trade: Buy on bull trendline break + Fib 0.618 confirmation.
Reversal: Sell at resistance level with high sell% label.
Targets: Use Fib extensions or trend targets for TP; levels for SL.
Combine: Overlay with MA crossover or volume for signals.
Tips & Troubleshooting:
Clutter? Toggle sections off or increase lengths.
No Lines? Ensure show_* is true; check chart history (needs 2x pivot length bars).
Repainting: Normal for real-time; disable for backtesting.
Custom Source: Test on demo – e.g., hl2 for median prices.
Updates: If lines don't extend, verify extend_bars > 0.
Credit : Auto Trendline Lib by HoanGhetti/SimpleTrendlines
Crypto Correlation Oscillator# Crypto Correlation Oscillator
**Companion indicator for Tri-Align Crypto Trend**
## Overview
The Crypto Correlation Oscillator helps you identify **alpha opportunities** and **market regime changes** by showing how closely your coin follows Bitcoin and other assets over time. It displays rolling correlations as an oscillator in a separate pane below your price chart.
## What It Does
This indicator calculates **Pearson correlations** between different trading pairs on a rolling window (default: 100 bars). Correlations range from **-1.0** (perfect inverse relationship) to **+1.0** (perfect positive relationship), with **0** meaning no correlation.
### The 5 Correlation Lines
1. **Blue (thick line) - Coin vs BTC**: The most important metric
- **High correlation (>0.7)**: Your coin is just following BTC - no independent movement
- **Low correlation (<0.3)**: Your coin has **alpha** - it's moving independently from BTC
- **Negative correlation**: Your coin moves opposite to BTC (rare but powerful)
2. **Purple - Coin/BTC vs BTC**: Inverse relationship check
- **Negative values**: When BTC rises, your coin weakens relative to BTC
- **Positive values**: When BTC rises, your coin strengthens against BTC
3. **Orange - Coin vs Coin/BTC**: Structural consistency check
- Shows how well the Coin/USDT and Coin/BTC pairs maintain their mathematical relationship
- Unusual values can indicate liquidity issues or market inefficiencies
4. **Light Red - Coin vs USDT.D** (optional): Stablecoin dominance correlation
- Shows how your coin correlates with USDT dominance
- Useful for understanding flight-to-safety dynamics
5. **Light Green - Coin vs BTC.D** (optional): Bitcoin dominance correlation
- Shows how your coin correlates with BTC dominance
- Helps identify altcoin season vs BTC dominance cycles
## How to Read It
### Finding Alpha Opportunities
- **Low blue line (<0.3)**: Your coin is decoupled from BTC → potential alpha
- **Blue line dropping**: Coin is gaining independence from BTC
- **Blue line spiking to >0.9**: Coin is a "BTC clone" with no independent movement
### Regime Change Detection
- **Blue line crossing 0.5**: Major shift in correlation behavior
- **Purple line turning negative**: Coin starting to weaken when BTC rises (warning sign)
- **Sharp correlation changes**: Market structure is shifting - adjust strategy
### Visual Zones
- **Blue background**: High correlation zone (>0.7) - coin just following BTC
- **Red background**: Inverse correlation zone (<-0.5) - coin moving opposite to BTC
### Reference Lines
- **+1.0 / -1.0**: Perfect correlation boundaries (dotted gray)
- **+0.5 / -0.5**: Moderate correlation thresholds (dotted gray)
- **0.0**: Zero correlation line (solid gray)
## Dynamic Legend
The legend table (top-right) automatically shows the actual symbol names based on your chart:
- **Example on SOLUSDT**: Shows "SOL vs BTC", "SOL/BTC vs BTC", "SOL vs SOL/BTC", etc.
- **Color boxes**: Match the plot colors for easy identification
- **Live values**: Current correlation numbers update in real-time
- **Tooltips**: Hover over labels for interpretation guidance
## Configuration
### Key Inputs
- **Correlation Lookback** (default: 100): Number of bars for rolling correlation window
- Shorter = more reactive, noisier
- Longer = smoother, slower to detect changes
- **Correlation Smoothing** (default: 5): EMA smoothing period for raw correlations
- Reduces noise while preserving trends
- **Symbol Detection**: Auto-detects symbols from your chart, or use manual overrides
- **Dominance Pairs**: Toggle USDT.D and BTC.D correlations on/off
## Usage Tips
1. **Combine with main Tri-Align indicator**: Use correlation for context, Tri-Align for entry/exit signals
2. **Watch for divergences**: Correlation changing while price moves in sync can signal upcoming shift
3. **Adjust lookback period**: Use shorter (50-70) for day trading, longer (150-200) for position trading
4. **Focus on the blue line**: It's your primary alpha indicator
## Technical Details
- **Calculation**: Pearson correlation coefficient with EMA smoothing
- **Data source**: Close prices from `request.security()` (multi-timeframe capable)
- **Update frequency**: Every bar on your selected timeframe
- **Overlay**: False (displays in separate pane)
## Quick Interpretation Guide
| Blue Line Value | Interpretation | Action |
|----------------|----------------|--------|
| > 0.9 | Coin is a BTC clone | Avoid - no alpha opportunity |
| 0.7 - 0.9 | High correlation | Standard altcoin behavior |
| 0.3 - 0.7 | Moderate correlation | Some independence emerging |
| < 0.3 | Low correlation | **Strong alpha opportunity** |
| < 0 | Inverse correlation | Rare - potential hedge asset |
| Purple Line | Interpretation |
|-------------|----------------|
| Strongly negative | Coin weakens when BTC rises - risky |
| Near zero | Coin/BTC pair moves independently of BTC |
| Positive | Coin strengthens with BTC - ideal |
## Version History
### v1.0 (Initial Release)
- Pearson correlation calculation with configurable lookback
- 5 correlation pairs: Coin vs BTC, Coin/BTC vs BTC, Coin vs Coin/BTC, USDT.D, BTC.D
- EMA smoothing to reduce noise
- Visual zones for high/inverse correlation
- Dynamic legend with symbol name extraction
- Auto-symbol detection matching main Tri-Align indicator
[AA] - Market Valuation (Mean Based) - Market Valuation (Mean Based)
What it does
This indicator estimates whether price is overvalued, undervalued, or fairly valued relative to its structural mean across multiple lookback windows. It builds a single normalized oscillator from short-, mid-, and long-term ranges so traders can quickly see when price is stretched away from equilibrium.
This is not a mashup of existing tools. It’s a custom mean-deviation model that aggregates multi-window range positioning into one score.
How it works (concepts)
For each lookback length (13, 25, 30, 50, 100, 200):
Range & midpoint:
Highest high H and lowest low L.
Structural midpoint Mid = (H + L)/2.
Normalized deviation:
Dev = (Close − Mid) / (H − L) → location of price within its own range.
Aggregation:
The oscillator z_struct is the average of the deviations from the five windows.
Result: a smoothed, dimensionless value (roughly −1 to +1 in typical markets) showing multi-horizon displacement from the mean.
Plots & levels
Oscillator (area): z_struct
Reference lines: +0.40 (OB), 0.00 (equilibrium), −0.30 (OS)
Coloring:
Red when z_struct > OB (extended above mean)
Blue when z_struct < OS (extended below mean)
White in between
Suggested use
Mean reversion context: Fade extremes in range-bound conditions; take profits into OB/OS.
Trend awareness: In strong trends, extremes can persist—use levels as exhaustion context rather than standalone entry.
Filter/confirm: Combine with your trend filter or structure tools to time pullbacks and avoid chasing extended moves.
Inputs
Lookbacks: 13, 25, 30, 50, 100, 200
Thresholds: OB = 0.40, OS = −0.30
Notes & limitations
Works on the current symbol/timeframe only; no security() calls and no repainting beyond normal bar completion.
In very tight or flat ranges (H ≈ L), normalized deviations can become sensitive; consider longer windows or higher timeframes.
This is an indicator, not a strategy. No signals are generated; use with risk management.
Originality statement
This script implements an original, multi-window mean-deviation aggregation. It does not replicate a built-in or a public indicator; its purpose is to quantify cross-horizon valuation in a single, normalized measure.
MPO4 Lines – Modal Engine█ OVERVIEW
MPO4 Lines – Modal Engine is an advanced multi-line modal oscillator for TradingView, designed to detect momentum shifts, trend strength, and reversal points through candle-based pressure analysis with multiple fast lines and a reference slow line. It features divergence detection on Fast Line A, overbought/oversold return signals, dynamic coloring modes, and layered gradient visualizations for enhanced clarity and decision-making.
█ CONCEPT
The indicator is built upon the Market Pressure Oscillator (MPO) and serves as its expanded evolution, aimed at enabling broader market analysis through multiple lines with varying parameters. It calculates modal pressure using candle body size and direction, weighted against average body size over a lookback period, then normalized and smoothed via EMA. It generates four distinct oscillator lines: a heavily smoothed Slow Line (trend reference), two Fast Lines (A & B) for momentum and support/resistance, and an optional Line 4 for additional confirmation. Divergence is calculated solely on Fast Line A, with visual gradients between lines and bands for intuitive interpretation.
█ WHY USE IT?
- Multi-Layer Momentum: Combines slow trend reference with dual fast lines for precise entry/exit timing.
- Divergence Precision: Bullish/bearish divergences on Fast Line A with labeled confirmation.
- OB/OS Return Signals: Clear buy/sell markers when Fast Line A exits oversold/overbought zones.
- Dynamic Visuals: Gradient fills, line-to-line shading, and band gradients for instant market state recognition.
- Flexible Coloring: Slow Line color by direction or zero-position; fast lines by sign.
- Full Customization: Independent lengths, smoothing, visibility, and transparency — by adjusting the lengths of different lines, you can tailor results for various strategies; for example, enabling Line 4 and tuning its length allows trading based on crossovers between different lines.
█ HOW IT WORKS?
- Candle Pressure Calculation: Body = math.abs(close - open); avgBody = ta.sma(body, len). Direction = +1 (bull), –1 (bear), 0 (neutral). Weight = body / avgBody. Contribution = direction × weight.
- Rolling Sum & Normalization: Sums contributions over lookback, normalizes to ±100 scale (÷ (len × 2) × 100).
Smoothing: Applies primary EMA (smoothLen), with extra EMA on Slow Line for stability.
Line Structure:
- Slow Line = calcCPO(len1=20, smoothLen1=5) → extra EMA (5)
- Fast Line A = calcCPO(len2=6, smoothLen2=7)
- Fast Line B = calcCPO(len3=6, smoothLen3=10)
- Line 4 = calcCPO(len4=14, smoothLen4=1)
Divergence Detection: Uses ta.pivothigh/low on price and Fast Line A (pivotLength left/right). Bullish: lower price low + higher osc low. Bearish: higher price high + lower osc high. Valid within 5–60 bar window.
Signals:
- Buy: Fast Line A crosses above oversold (–30)
- Sell: Fast Line A crosses below overbought (+30)
- Slow Line color flip (direction or zero-cross)
- Divergence labels ("Bull" / "Bear")
- Band Coloring as Momentum Signal:
When Fast Line A ≤ Fast Line B → Overbought band turns red (bearish pressure building)
When Fast Line A > Fast Line B → Oversold band turns green (bullish pressure building) This dynamic coloring serves as visual confirmation of momentum shift following fast line crossovers
Visualization:
- Gradients: Fast B → Zero (multi-layer fade), Fast A ↔ B fill, OB/OS bands
- Dynamic colors: Green/red based on sign or trend
- Zero line + dashed OB/OS thresholds
Alerts: Trigger on OB/OS returns, Slow Line changes, and divergences.
█ SETTINGS AND CUSTOMIZATION
- Line Visibility: Toggle Slow, Fast A, Fast B, Line 4 independently.
Line Lengths:
- Slow Line: Base (20), Primary EMA (5), Extra EMA (5)
- Fast A: Lookback (6), EMA (7)
- Fast B: Lookback (6), EMA (10)
- Line 4: Lookback (14), EMA (1)
- Slow Line Coloring Mode: “Direction” (trend-based) or “Position vs Zero”.
- Bands & Thresholds: Overbought (+30), Oversold (–30), step 0.1.
- Signals: Enable Fast A OB/OS return markers (default: on).
- Divergence: Enable/disable, Pivot Length (default: 2, min 1).
- Colors & Appearance: Full control over bullish/bearish hues for all lines, zero, bands, divergence, and text.
Gradients & Transparency:
- Fast B → Zero: 75 (default)
- Fast A ↔ B fill: 50
- Band gradients: 40
- Toggle each gradient independently
█ USAGE EXAMPLES
The indicator allows users to configure various strategies manually, though no built-in alerts exist for them. Entry signals can include color of fast lines, crossovers between different lines, alignment of colors across lines, or consistency in direction.
- Trend Confirmation: Slow Line above zero + green = bullish bias; below + red = bearish.
- Entry Timing: Buy on Fast A crossing above –30 (circle marker), especially if Slow Line is rising or near zero.
- Reversal Setup: Bullish divergence (“Bull” label) + Fast A in oversold + green gradient band = high-probability long.
- Scalping: Fast A vs Fast B crossover in direction of Slow Line trend.
- Noise Reduction: Increase extraSmoothLen on Slow Line
█ USER NOTES
- Best combined with volume, support/resistance, or trend channels.
- Adjust lookback and smoothing to asset volatility.
- Divergence delay = pivotLength; plan entries accordingly.
Sigma Trinity ModelAbstract
Sigma Trinity Model is an educational framework that studies how three layers of market behavior interact within the same trend: (1) structural momentum (Rasta), (2) internal strength (RSI), and (3) continuation/compounding structure (Pyramid). The model deliberately combines bar-close momentum logic with intrabar, wick-aware strength checks to help users see how reversals form, confirm, and extend. It is not a signal service or automation tool; it is a transparent learning instrument for chart study and backtesting.
Why this is not “just a mashup”
Many scripts merge indicators without explaining the purpose. Sigma Trinity is a coordinated, three-engine study designed for a specific learning goal:
Rasta (structure): defines when momentum actually flips using a dual-line EMA vs smoothed EMA. It gives the entry/exit framework on bar close for clean historical study.
RSI (energy): measures internal strength with wick-aware triggers. It uses RSI of LOW (for bottom touches/reclaims) and RSI of HIGH (for top touches/exhaustion) so users can see intrabar strength/weakness that the close can hide.
Pyramid (progression): demonstrates how continuation behaves once momentum and strength align. It shows the logic of adds (compounding) as a didactic layer, also on bar close to keep historical alignment consistent.
These three roles are complementary, not redundant: structure → strength → progression.
Architecture Overview
Execution model
Rasta & Pyramid: bar close only by default (historically stable, easy to audit).
RSI: per tick (realtime) with bar-close backup by default, using RSI of LOW for entries and RSI of HIGH for exits. This makes the module sensitive to intra-bar wicks while still giving a close-based safety net for backtests.
Stops (optional in strategy builds): wick-accurate: trail arms/ratchets on HIGH; stop hit checks with LOW (or Close if selected) with a small undershoot buffer to avoid micro-noise hits.
Visual model
Dual lines (EMA vs smoothed EMA) for Rasta + color fog to see direction and compression/expansion.
Rungs (small vertical lines) drawn between the two Rasta lines to visualize wave spacing and rhythm.
Clean labels for Entry/Exit/Pyramid Add/RSI events. Everything is state-locked to avoid spamming.
Module 1 — Rasta (Structural Momentum Layer)
Goal: Identify structural momentum reversals and maintain a consistent, replayable backbone for study.
Method:
Compute an EMA of a chosen price source (default Close), and a smoothed version (SMA/EMA/RMA/WMA/None selectable).
Flip points occur when the EMA line crosses the smoothed line.
Optional EMA 8/21 trend filter can gate entries (long-bias when EMA8 > EMA21). A small “adaptive on flip” option lets an entry fire when the filter itself flips to ON and the EMA is already above the smoothed line—useful for trend resumption.
Why bar close only?
Bar-close Rasta gives a stable, auditable timeline for the structure of the trend. It teaches users to separate “structure” (close-resolved) from “energy” (intrabar, via RSI).
Visuals:
Fog between the lines (green/red) to show regime.
Rungs between lines to show spread (compression vs expansion).
Optional plotting of EMA8/EMA21 so users can see the gating effect.
Module 2 — RSI (Internal Strength / Energy Layer)
Goal: Reveal the intrabar strength/weakness that often precedes or confirms structural flips.
Method:
Standard RSI with adjustable length and signal smoothing for the panel view.
Logic uses wick-aware sources:
Entry trigger: RSI of LOW (same RSI length) touching or below a lower band (default 15). Think of it as intraband reactivation from the bottom, using the candle’s deepest excursion.
Exit trigger: RSI of HIGH touching or above an upper band (default 85). Think of it as exhaustion at the top, using the candle’s highest excursion.
Realtime + Close Backup: fires intrabar on tick, but if the realtime event was missed, the close backup will note it at bar end.
Cooldown control: optional bars-between-signals to avoid rapid re-triggers on choppy sequences.
Why wick-aware RSI?
A close-only RSI can miss the true micro-extremes that cause reversals. Using LOW/HIGH for triggers captures the behavior that traders actually react to during the bar, while the bar-close backup preserves historical reproducibility.
Module 3 — Pyramid (Continuation / Compounding Layer)
Goal: Teach how continuation behaves once a trend is underway, and how adds can be structured.
Method:
Same dual-line logic as Rasta (EMA vs smoothed EMA), but only fires when already in a position (or after prior entry conditions).
Supports the same EMA 8/21 filter and optional adaptive-on-flip behavior.
Bar close only to maintain historical cohesion.
What it teaches:
Adds tend to cluster when momentum persists.
Students can experiment with add spacing and compare “one-shot entries” vs “laddered adds” during strong regimes.
How the Pieces Work Together
Rasta establishes the structural frame (when the wave flip is real enough to record at close).
RSI validates or challenges that structure by tracking intrabar energy at the extremes (low/high touches).
Pyramid shows what sustained continuation looks like once (1) and (2) align.
This produces a layered view: Structure → Energy → Progression. Users can see when all three line up (strongest phases) and when they diverge (riskier phases or transitions).
How to Use It (Step-by-Step)
Quick Start
Apply script to any symbol/timeframe.
In Strategy/Indicator Properties:
Enable On every tick (recommended).
If available, enable Using bar magnifier and choose a lower resolution (e.g., 1m) to simulate intrabar fills more realistically.
Keep On bar close unchecked if you want to observe realtime logic in live charts (strategies still place orders on close by platform design).
Default behavior: Rasta & Pyramid = bar close; RSI = per tick with close backup.
Reading the Chart
Watch for Rasta Entry/Exit labels: they define clean structural turns on close.
Watch RSI Entry (LOW touch at/below lower band) and RSI Exit (HIGH touch at/above upper band) to gauge internal energy extremes.
Pyramid Add labels reveal continuation phases once a move is already in progress.
Tuning
Rasta smoothing: choose SMA/EMA/RMA/WMA or None. Higher smoothing → later but cleaner flips; lower smoothing → earlier but choppier.
RSI bands: a common educational setting is 15/85 for strong extremes; 20/80 is a bit looser.
Cooldown: increase if you see too many RSI re-fires in chop.
EMA 8/21 filter: toggle ON to study “trend-gated” entries, OFF to study raw momentum flips.
Backtesting Notes (for Strategy Builds)
Stops (optional): trail is armed when price advances by a trigger (default D–F₀), ratchets only upward from HIGH, and hits from LOW (or Close if chosen) with a tiny undershoot buffer to avoid micro-wicks.
Order sequencing per bar (mirrors the script’s code comments):
Trail ratchet via HIGH
Intrabar stop hit via LOW/CLOSE → immediate close
If still in position at bar close: process exits (Rasta/RSI)
If still in position at bar close: process Pyramid Add
If flat at bar close: process entries (Rasta/RSI)
Platform reality: strategies place orders at bar close in historical testing; the intrabar logic improves realism for stops and event marking but final order timestamps are still close-resolved.
Inputs Reference (common)
Modules: enable/disable RSI and Pyramid learning layers.
Rasta: EMA length, smoothing type/length, EMA8/21 filter & adaptive flip, fog opacity, rungs on/off & limit.
RSI: RSI length, signal MA length (panel), Entry band (LOW), Exit band (HIGH), cooldown bars, labels.
Pyramid: EMA length, smoothing, EMA8/21 filter & adaptive adds.
Execution: toggle Bar Close Only for Rasta/Pyramid; toggle Realtime + Close Backup for RSI.
Stops (strategy): Fixed Stop % (first), Fixed Stop % (add), Trail Distance %, Trigger rule (auto D–F₀ or custom), undershoot buffer %, and hit source (LOW/CLOSE).
What to Study With It
Convergence: how often RSI-LOW entry touches precede the next Rasta flip.
Divergence: cases where RSI screams exhaustion (HIGH >= upper band) but Rasta hasn’t flipped yet—often transition zones.
Continuation: how Pyramid adds cluster in strong moves; how spacing changes with smoothing/filter choices.
Regime changes: use EMA8/21 filter toggles to see what happens at macro turns vs chop.
Limitations & Scope
This is a learning tool, not a trade copier. It does not provide financial advice or automated execution.
Intrabar results depend on data granularity; bar magnifier (when available) can help simulate lower-resolution ticks, but true tick-by-tick fills are a platform-level feature and not guaranteed across all symbols.
Suggested Publication Settings (Strategy)
Initial capital: 100
Order size: 100 USD (cash)
Pyramiding: 10
Commission: 0.25%
Slippage: 3 ticks
Recalculate: ✓ On every tick
Fill orders: ✓ Using bar magnifier (choose 1m or similar); leave On bar close unchecked for live viewing.
Educational License
Released under the Michael Culpepper Gratitude License (2025).
Use and modify freely for education and research with attribution. No resale. No promises of profitability. Purpose is understanding, not signals.






















