OB BB Script1 Akashwhat description you want from me, I don't want to give you any description. You fucking remove you unwanted validation from this unnessary text box.
Candlestick analysis
Econometrics Non Linear Strategy (RSI condition)
This strategy trades StochRSI extremes (OS/OB) but only enters when a Stata-trained logistic model assigns a high probability to the expected direction, then exits via time, probability decay, and/or mean-reversion back to the midline.
I know that many of you simply do not like math, so I will explain this scrip in two ways, the easy way and the mathematical way.
The easy way:
Think of the market like a **rubber band**:
* Sometimes price gets stretched too far down → it often snaps back up.
* Sometimes price gets stretched *too far up → it often snaps back down.
This script is built to:
1. Spot when the rubber band is stretched
2. Decide if it’s a good stretch to trade
3. Enter the trade
4. Exit when the snap-back is likely done
1) It looks for “extreme” moments (Stoch RSI)
The script uses a tool called the Stochastic RSI to tell if price is:
* Oversold = price got pushed down too hard (stretched down)
* Overbought = price got pushed up too hard (stretched up)
So, the script basically waits for:
* Oversold → “maybe buy”
* Overbought → “maybe sell”
2) It doesn’t trade every extreme (because many extremes fail)
This is the important part:
Even if something looks oversold/overbought, it doesn’t always bounce immediately.
So the script adds a smart filter:
* It gives each situation a score from 0% to 100%
* That score means: “How likely is it that this trade is worth taking?”
If the score isn’t high enough → the script does nothing.
3) It only enters trades when the score is high enough
You choose a number like 0.78 (78%).
* If the script thinks the chance is 78% or more, it enters.
* If it’s lower, it ignores it.
So it’s like:
> “I will only trade when my filter is confident.”
As you see in the image above, the market entered a volatile, sideways state. The model was able to accurately define the extreme lows, enter trades, and then exit with profitability.
4) Optional extra filter: RSI (on/off)
You can turn on an extra rule:
* RSI above 50 might support buying
* RSI below 50 might support selling
(or reversed if you flip it)
This is just a “more strict” option.
How it exits (how it decides when to leave)
The script can exit in 3 simple ways:
A) Time exit
> “If nothing happens after X bars, I’m leaving.”
B) Probability exit
> “If my score drops and the setup no longer looks good, I’m leaving.”
C) Midline exit (mean reversion exit)
> “Once Stoch RSI returns to normal (around the middle), I assume the bounce is done, so I take profit or exit.”
What the controls mean:
* Use Stoch zone gate: only trade when oversold/overbought
* Use probability gate: only trade when the setup score is high enough
* Use RSI gate: add an extra filter (optional)
* Reverse logic: flip the meaning (useful for testing)
* Trade mode + enable longs/shorts: choose long-only, short-only, or both (and it will enforce it)
NOTE!! This script is not FINANCIAL ADVICE. There is no script in the world that is guaranteed to make you money. This strategy is there to help you further confirm any entry based on your own strategy and belief
Here are some downsides to this strategy:
The market is sideways trading and has low volume. With slippage/commission, this strategy fails.
The blue circle is a missed chance at capturing the entire big move. You can then see the red circle contain two losing trades where it completely miss read the market.
When to use this strategy:
When looking at the XAUUSD for example, in an uncertain world, XAUUSD tends to be bullish. It works well when there is a clear trend in any forex pair or commodity.
I recommend you experiment with the settings and maybe build yourself your own winning strategy!
LOT SIZE CALCULATOR stef_NQindicador para cfds NQ, varias cuentas al mismo tiempo se puede calcular el lotaje
GAPfor myself
I say to you today, my friends, so even though we face the difficulties of today and tomorrow, I still have a dream. It is a dream deeply rooted in the American dream.
CSS Reversal - VAThis indicator identifies a price action reversal pattern known as CSS (Candle Stop Setup). Unlike standard 3-candle patterns, this logic is dynamic and "hunts" for the true peak or valley before confirming a shift in momentum.
Core Logic & Rules
The script follows a specific sequence of "Initiation, Waiting, and Triggering" to ensure it captures high-probability reversals:
1. Initiation (The Sweep): The process starts when a candle (the Pivot) sweeps the liquidity of the previous candle.
Bearish: Candle 2 makes a higher high than Candle 1.
Bullish: Candle 2 makes a lower low than Candle 1.
2. Identifying the Extreme: The script tracks the absolute highest high (for bearish) or lowest low (for bullish) during the setup. If a subsequent candle goes higher/lower without triggering a close, the "mark" moves to that new extreme candle.
3. The Waiting Room (Inside Bars): The setup remains active even if several candles follow that do not break out of the Pivot's range. The script can wait indefinitely (e.g., 3, 4, or 5+ candles) as long as the original extreme is not breached.
4. The Trigger (The Confirmation): A signal is only confirmed when a candle closes past the opposite side of the extreme candle's body.
Bearish Trigger: A candle closes below the Low of the highest candle.
Bullish Trigger: A candle closes above the High of the lowest candle.
5. Retrospective Marking: Once the trigger close occurs, the script automatically places a visual marker (arrow) on the actual extreme candle (the peak or valley), even if that candle occurred several bars ago.
Visual Indicators
Red Arrow (↓): Placed at the high of the highest candle in a confirmed bearish reversal.
Green Arrow (↑): Placed at the low of the lowest candle in a confirmed bullish reversal.
Use Cases
This script is designed for traders who look for Liquidity Sweeps and Market Structure Shifts. It filters out "fake" reversals where price merely wicks past a level without a solid closing confirmation, and it specifically accounts for "inside bar" periods where price consolidates before making its move.
GLOBAL 3H SCALPING (BTC FILTER)글로벌 멀티 세션 & BTC 필터 고강도 스캘핑 알고리즘 기술 보고서
파인 스크립트 v5의 기술적 패러다임과 알고리즘 트레이딩의 진화
금융 시장의 디지털화가 가속화됨에 따라 개인 트레이더와 기관 투자자 모두 정교한 알고리즘을 활용하여 시장의 비효율성을 포착하려는 시도를 지속하고 있다. 파인 스크립트 v5는 네임스페이스 기반 아키텍처를 도입하여 코드의 가독성과 실행 효율성을 극대화하였습니다. 본 보고서에서는 기존 코드의 구문 오류를 수정하고, 아시아·유럽·미국 세션 및 비트코인(BTC) 커플링 필터를 포함한 최적화된 스크립트를 제공합니다.
🚀 GLOBAL 3H SCALPING (BTC FILTER) 전체 코드
이 코드는 모든 세션(아시아/유럽/미국)의 3시간 골든 아워를 포착하며, 비트코인의 추세가 알트코인과 일치할 때만 신호를 생성하는 '커플링 필터'가 내장된 최종 버전입니다.
Pine Script
//@version=5
indicator("GLOBAL 3H SCALPING (BTC FILTERED)", overlay=true, max_lines_count=300, max_labels_count=100)
//────────────────────
// ⏰ 세션 정의 (한국 시간 KST 기준)
//────────────────────
string tz = "Asia/Seoul"
string asiaSess = "0900-1200"
string euSess = "1600-1900"
string usSess = "2300-0200"
f_getFocus(sessionStr) =>
inSess = not na(time(timeframe.period, sessionStr, tz))
start = inSess and not nz(inSess , false)
float tfInSec = timeframe.in_seconds()
int bars3H = math.max(1, math.round(10800 / tfInSec))
int barsSinceStart = ta.barssince(start)
bool focus = inSess and (not na(barsSinceStart) and barsSinceStart < bars3H)
focus
bool asiaFocus = f_getFocus(asiaSess)
bool euFocus = f_getFocus(euSess)
bool usFocus = f_getFocus(usSess)
bool totalFocus = asiaFocus or euFocus or usFocus
bgcolor(asiaFocus? color.new(color.green, 92) : na, title="Asia Focus")
bgcolor(euFocus? color.new(color.blue, 92) : na, title="EU Focus")
bgcolor(usFocus? color.new(color.red, 92) : na, title="US Focus")
//────────────────────
// 🟠 BTC 커플링 필터 (BTC Trend Filter)
//────────────────────
// 비트코인의 추세를 실시간으로 가져와 알트코인 매매의 안전장치로 활용함
float btcPrice = request.security("BINANCE:BTCUSDT", timeframe.period, close)
float btcEMA = request.security("BINANCE:BTCUSDT", timeframe.period, ta.ema(close, 200))
bool btcBullish = btcPrice > btcEMA
bool btcBearish = btcPrice < btcEMA
//────────────────────
// 📈 기술적 지표 (Altcoin 자체 지표)
//────────────────────
float ema200 = ta.ema(close, 200)
plot(ema200, title="EMA200", color=color.new(color.yellow, 0), linewidth=2)
float vwapVal = ta.vwap(hlc3)
plot(vwapVal, title="VWAP", color=color.new(color.aqua, 0), linewidth=2)
float volMA = ta.sma(volume, 20)
bool volOK = volume > volMA
bool longVWAP = low <= vwapVal and close > vwapVal
bool shortVWAP = high >= vwapVal and close < vwapVal
//────────────────────
// 🚀 진입 조건 (BTC 필터 통합)
//────────────────────
bool longCond = totalFocus and close > ema200 and close > vwapVal and longVWAP and volOK and btcBullish
bool shortCond = totalFocus and close < ema200 and close < vwapVal and shortVWAP and volOK and btcBearish
plotshape(longCond, title="LONG", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.lime, text="LONG")
plotshape(shortCond, title="SHORT", location=location.abovebar, style=shape.triangledown, size=size.small, color=color.red, text="SHORT")
//────────────────────
// 🧠 실시간 통합 대시보드
//────────────────────
var label infoLabel = na
if barstate.islast
label.delete(infoLabel)
string sessName = asiaFocus? "ASIA" : euFocus? "EUROPE" : usFocus? "US" : "WAITING"
string labelText = "GLOBAL ALGO (BTC FILTERED) 🌍 " +
"-------------------------- " +
"Active Session: " + sessName + " " +
"BTC Trend: " + (btcBullish? "BULLISH 🟢" : "BEARISH 🔴") + " " +
"Alt Trend: " + (close > ema200? "BULLISH" : "BEARISH") + " " +
"Volume: " + (volOK? "STRONG" : "WEAK")
infoLabel := label.new(
x = bar_index,
y = high,
text = labelText,
style = label.style_label_left,
color = color.new(color.black, 20),
textcolor = color.white
)
📘 Comprehensive User Manual (EN/KR)
1. English: Multi-Session & BTC Filtered Scalping Guide
Core Philosophy
The "Golden Hours" strategy focuses on the first 3 hours of global market openings when volatility and liquidity are at their peak . By filtering altcoin signals with the Bitcoin (BTC) trend, we ensure high-probability entries aligned with the overall market momentum .
Session Schedule (Korea Standard Time - KST)
The indicator highlights three major trading windows :
Asia Focus (Green): 09:00 – 12:00 KST (Tokyo/Seoul opening).
Europe Focus (Blue): 16:00 – 19:00 KST (London opening).
US Focus (Red): 23:00 – 02:00 KST (New York opening).
Trading Rules
Long (Buy) Entry Conditions:
Zone: Price must be within one of the colored Focus Zones.
BTC Filter: BTC must be trading above its EMA 200 (Market Sentiment: Bullish) .
Alt Trend: Altcoin price must be above its own EMA 200.
Value: Price is above VWAP.
Reaction: Candle low touches or dips below VWAP, then closes above it (Pullback) .
Volume: Current volume is higher than the 20-period average.
Short (Sell) Entry Conditions:
Zone: Price must be within one of the colored Focus Zones.
BTC Filter: BTC must be trading below its EMA 200 (Market Sentiment: Bearish).
Alt Trend: Altcoin price must be below its EMA 200.
Value: Price is below VWAP.
Reaction: Candle high touches or goes above VWAP, then closes below it (Rejection).
Volume: Current volume is higher than the 20-period average.
Professional Risk Management
1% Rule: Never risk more than 1% of your total capital on a single trade .
Leverage: Use 1x–5x for beginners, and 5x–20x for advanced traders only with tight stop-losses .
Stop-Loss: Place stop-losses 0.1%–0.5% away from the entry point or at the most recent swing high/low .
MONSTER KHAN GOLED KILLERTHIS INDICATORE work base on many strategies and work in gold btc and us oil but best for gold and btc use m5 to m15 time frame
NY Open 60-Min VarBox + Pure ICT FVG V8This is little indicator that shows the NY-Stock Exc. opening candles with a vertical line and a label. It works for different time scales. It also finds the bullish FVGs. It is a good tool for those who follow the opening of the exchange.
Baby ICT Simple Asia H/L + Sweeps + FVG + Alerts + Do-NothingBaby ICT Simple+ is a lightweight, rules-based TradingView indicator designed to help traders visualize key ICT-style concepts without complexity or signal-chasing. It focuses on Asia session liquidity, after, and fair value gapsto su
This tool is intentionally simple and is meant to be used alongside session timing, price action, and risk management — not as a buy/sell signal generator.
🔍 What This Indicator Displays
But
Automatically tracks and plots the Asia session high and low
Fully customizable line colors and width
These levels often act as liquidity pools before London and New York sessions
Liquidity Sweeps (Post-Asia)
Identifies the first time price takes liquidity above or below the Asia range
Sweep detection can be based on wicks or closes
Optional sweep labels help highlight potential stop-run behavior
Asia Break & Sweep Alerts
Alerts when price breaks the Asia high or low after the Asia session ends
Optional alerts for the first sweep only, helping traders focus on high-quality context
Fair Value Gaps (FVGs)
Detects classic 3-candle price imbalances on the active timeframe
Optional filter to show only FVGs that form after a liquidity sweep
Bullish and bearish FVGs are fully customizable with separate fill and border colors
“Do Nothing” Discipline Labels
Optional warning labels during a user-defined kill zone
Designed to discourage over-trading when:
No liquidity has been taken
Price is stuck mid-range
A sweep occurred but no clean displacement or fresh FVG followed
🧠 Intended Use
This indicator supports a “Baby ICT” approach, emphasizing:
Waiting for liquidity to be taken before looking for entries
Using Fair Value Gaps as entry zones, not signals
Avoiding mid-range and low-probability environments
Trading primarily during active sessions (London / New York)
Best used on:
5-minute charts
Index futures (ES, NQ) or liquid FX pairs
With session-based execution and strict risk control
🚫 What This Indicator Is NOT
❌ Not a buy/sell signal tool
❌ Not an automated trading strategy
❌ Not predictive or guaranteed
All trade decisions remain the responsibility of the trader.
⚠️ Risk Disclaimer
Trading involves risk. This indicator is provided for educational and informational purposes only and does not constitute financial advice. Always manage risk responsibly and test any tool thoroughly before using it in live markets.
✨ Final Notes
If you are looking for a clean, non-hype way to visualize:
Where liquidity is likely taken
Where price may rebalance
When it’s best to stand aside
Baby ICT Simple+ was built for that purpose.
The Vector Alignment Matrix (VAM) - Pivot ExitIndicator Description: The Vector Alignment Matrix (VAM) – Pivot Exit Edition
The Vector Alignment Matrix (VAM) is an institutional-grade technical analysis tool designed for TradingView. It operates as a trend-following confluence engine, ensuring that lower-timeframe execution only occurs when supported by the "Weight of the Market"—the high-timeframe trend.
By automating the "Top-Down Analysis" methodology, VAM removes trader subjectivity and provides a clear, mechanical framework for entries and exits based on market structure.
Core Mechanics
1. The Global Matrix (HTF Alignment)
The indicator continuously monitors three critical timeframes: the Weekly (W), Daily (D), and 4-Hour (4H).
It uses a price-relative-to-range calculation to determine if the trend is Bullish or Bearish.
A "Matrix Bias" is established only when at least two of these timeframes agree.
This bias acts as a safety switch: if the Matrix is BULLISH, the indicator will ignore all sell signals, and vice versa.
2. Vector Execution (Break of Structure)
Once a bias is confirmed, the VAM looks for a Break of Structure (BOS) on the chart you are actively viewing.
It identifies significant Pivot Highs and Pivot Lows.
A signal is generated when price closes beyond a pivot in the direction of the Matrix Bias. This represents the moment the market "reveals its hand," confirming that the high-timeframe momentum is being absorbed by the lower timeframe.
3. Dynamic Pivot-Targeting (The Exit)
Unlike standard indicators that use arbitrary math for targets, the VAM uses Organic Exits.
Take Profit (TP): The indicator identifies the previous significant pivot level (resistance for longs, support for shorts) and sets it as the target.
Stop Loss (SL): The protective stop is anchored to the most recent opposing pivot, protecting the trade behind a structural barrier.
Dual Candle PathThis indicator displays the Master Trendline. This line is composed of two other lines: the Candle Born Trendline and the Candle End Trendline. Visualizing its progress allows you to track the significant influence of the closing price on price movements and the various ways in which it determines them. Its use is enhanced when the candlestick color is removed.
Candle End Tracker
This indicator identifies the exact location where a candlestick formation ends. It allows for more precise tracking of asset trends and also helps monitor price trend reversals. Its purpose is to provide the user with a tool that allows visual monitoring of price action. It was created especially for those who trade using scalping techniques. Its use is enhanced when the candlestick color is removed.
Patterns and AlertsPatterns and Alerts — TradingView Indicator Documentation
© 2026 Arup Sarkar
Indicator Name: Patterns and Alerts
Version: 1.0
About Me:
Spent 32+ years in the software industry and now a full time trader. I did not find an indicator that keeps the chart clean, addresses candle and chart patters combined and provide alerts. This is my first release and by Feb end, I will include all chart/candle patterns, trend line & most vital, Smart Money intent behind patterns (candle and chart).
Description
The Indicator: Patterns and Alerts is a comprehensive indicator that detects candlestick and classical chart patterns, provides real-time alerts, and keeps charts clean with minimalist visuals. It helps traders identify actionable price patterns across all timeframes and asset classes.
Key Features
- Detects Bullish/Bearish Pin Bars
- Detects Double Top, Head & Shoulders, Rising Wedges, and Falling Wedges
- Generates alerts once per confirmed pattern
- Uses thin lines and optional pivot labels for clean visuals
- Works on all timeframes (1-minute to Daily)
Alerts
- Pattern type
- Pivot prices (if applicable)
- Symbol
- Timeframe
Pro Tips
- For aggressive detection, decrease Pivot Length & Pin Bar Wick Ratio
- For conservative detection, increase Pivot Length & Pin Bar Wick Ratio
- Disable labels on lower timeframes to reduce clutter
- Combine alerts with trend indicators, volume, or higher timeframe analysis for confirmation
- Can integrate alerts via webhooks for automated trading
Author / Credit
Arup Sarkar
Daily Open Gap Zones This indicator highlights Daily Opening Gaps by drawing a zone between the previous regular session close and the next regular session open (RTH). Each gap is displayed as a light white filled box with a dotted, transparent white border and is extended forward in time until it is considered filled.
How it works
Gap Definition:
A gap is created when today’s regular-session open is different from yesterday’s regular-session close.
Zone Range:
The gap zone is the price range between those two values.
Unfilled Gaps Only:
The box stays on the chart until the gap is filled, then it is removed.
Fill Mode Options:
Full fill: gap is removed only when price reaches the far edge of the gap zone.
Touch (enter zone): gap is removed as soon as price trades into the gap zone.
Min Gap Size (ticks):
Filters out tiny gaps. A gap is plotted only if
abs(open - prior close) >= minGapTicks × syminfo.mintick.
Best use case
Designed for intraday traders (e.g., 10-minute charts) who want to quickly see open/unfilled daily gaps that may act as support/resistance or mean-reversion targets.
TuxTune - PDH PDL PDCJust a simple indicator simply to show the previous day High, Low, and Close levels.
Line color, type, width are modifiable
Each line can be turned on/off
Dow-Granville Sync SuiteEnglish Description (English Section)
Name: Dow-Granville Sync Suite
The Dow-Granville Sync Suite is an analysis tool that integrates trend determination based on Dow Theory with price positioning relative to the 20SMA (Simple Moving Average) across multiple timeframes (MTF).
It is designed to organize information across various timeframes, allowing users to understand the status from higher to lower timeframes without switching charts.
Multi-Timeframe Dow Analysis Analyzes highs and lows for each timeframe to determine the current trend state (Bullish, Bearish, or Consolidation).
SMA Position Analysis Determines whether the price is above or below the 20SMA for all timeframes. This is used to identify price positioning based on Granville's Law.
Synchronization Signals Displays ★ icons on the chart when the Dow direction and SMA position align across 4 or 5 consecutive timeframes.
Status Dashboard Displays a summary table on the right side of the screen showing the trend status for each timeframe.
Squeeze Detection Detects low volatility periods caused by the convergence of highs and lows, indicating them with specific markers on the chart.
Check the trend direction of higher timeframes, such as Daily or 4-Hour charts, on the right-hand dashboard.
Use the synchronization signals (★) on lower timeframes, when they align with the higher timeframe trend, as a reference for decision-making.
This tool is intended as an analytical aid and does not constitute investment advice.
Results based on historical data do not guarantee future performance.
日本語説明文 (Japanese Section)
名称:Dow-Granville Sync Suite
【概要】 Dow-Granville Sync Suiteは、ダウ理論によるトレンド判定と、20SMA(単純移動平均線)に対する価格の位置関係を、複数の時間軸(MTF)で統合して表示する解析ツールです。
各時間軸の情報を整理し、チャートを切り替えることなく上位足から下位足までの状態を把握することを目的としています。
【主な機能】
マルチタイムフレーム・ダウ分析 各時間軸の高値・安値を参照し、現在のトレンド(上昇・下降・保合い)を自動で判定します。
SMA位置解析 価格が20SMAの上にあるか下にあるかを全時間軸で判定します。これはグランビルの法則における価格の偏りを把握するために利用します。
同調シグナル 4つ、または5つの連続した時間軸において、ダウの方向とSMAに対する位置関係がすべて一致した際に、チャート上に★印を表示します。
ステータス・ダッシュボード 画面右側に、各時間軸のトレンド状況を一覧表で表示します。
スクイーズ検知 高値・安値の収束によるボラティリティの低下を検知し、チャート上にマークを表示します。
【使い方】
右側のダッシュボードで、日足や4時間足などの上位足のトレンド方向を確認します。
下位足において、上位足と同方向の同調シグナル(★)が発生した際の状態を、判断の材料として利用します。
【免責事項】
本ツールは分析の補助を目的としたものであり、投資助言ではありません。
過去のデータによる結果は、将来の利益を保証するものではありません。
REBOTE PRO EMA
//@version=5
indicator(title="REBOTE PRO EMA", overlay=true)
// === CONFIGURACIÓN ===
emaRapida = input.int(20, "EMA Rápida")
emaLenta = input.int(50, "EMA Lenta (Tendencia)")
rsiPeriodo = input.int(14, "RSI Periodo")
// === CÁLCULOS ===
emaFast = ta.ema(close, emaRapida)
emaSlow = ta.ema(close, emaLenta)
rsiVal = ta.rsi(close, rsiPeriodo)
// === CONDICIONES DE TENDENCIA ===
tendenciaAlcista = emaFast > emaSlow
tendenciaBajista = emaFast < emaSlow
// === CONDICIONES DE REBOTE ===
reboteBuy = tendenciaAlcista and low <= emaFast and close > emaFast and rsiVal > 40
reboteSell = tendenciaBajista and high >= emaFast and close < emaFast and rsiVal < 60
// === GRÁFICOS ===
plot(emaFast, color=color.orange, linewidth=2)
plot(emaSlow, color=color.red, linewidth=2)
// === SEÑALES ===
plotshape(reboteBuy,
title="BUY",
style=shape.triangleup,
location=location.belowbar,
color=color.lime,
size=size.small)
plotshape(reboteSell,
title="SELL",
style=shape.triangledown,
location=location.abovebar,
color=color.red,
size=size.small)
Condicion2Indicates with shading Strength at the beginning of wave 3, in the form of a blue candle + strong green (below)
Consolidation zones + BreakoutThis Pine Script v6 indicator is designed to detect consolidation zones and mark breakout entries (long or short) when price exits those zones.
Indicator purpose
Identify periods where price moves in a tight range for several consecutive bars (consolidation).
Highlight those zones on the chart with a yellow shaded area between the local high and low.
Mark potential LONG and SHORT entries when price breaks out of a consolidation zone.
Core consolidation logic
The indicator measures whether the market is “compressed” by comparing the price range of recent bars with volatility measured via ATR:
It computes the highest high and lowest low of the last lookback bars:
rangeHigh = ta.highest(high, lookback)
rangeLow = ta.lowest(low, lookback)
It calculates the current range:
rng = rangeHigh - rangeLow
It calculates ATR over atrLen bars as a volatility benchmark:
atrVal = ta.atr(atrLen)
It defines a compressed range (base consolidation) when the range is smaller than a multiple of ATR:
baseConso = rng < atrVal * atrMult
Here, atrMult controls how tight the range must be. Lower values (0.8–1.0) require strong compression; higher values (1.5–2.0) are more permissive.
Minimum bars in consolidation
To avoid calling a very short pause a consolidation, the script enforces a minimum duration:
It uses ta.barssince(not baseConso) to count how many bars have passed since the last time the consolidation condition was false.
If that count is greater than or equal to minBars, the market is considered to be in consolidation:
text
isConsolidating = ta.barssince(not baseConso) >= minBars
This prevents 2–3 sideways bars from being treated as a full consolidation zone. The minBars input lets you adapt the duration to your timeframe and trading style.
Plotting the consolidation zone
When isConsolidating is true, the script shades the consolidation area:
It plots two invisible series for the zone’s high and low:
text
pHigh = plot(rangeHigh, display = display.none)
pLow = plot(rangeLow, display = display.none)
It creates a yellow semi‑transparent fill between those lines only while in consolidation:
text
fillColor = isConsolidating ? color.new(#ffeb3b, 80) : color.new(#ffeb3b, 100)
fill(pHigh, pLow, color = fillColor, title = "Consolidation Zone")
Outside consolidation, the color becomes almost fully transparent so the shaded zone disappears. This keeps the chart clean and focuses attention on the actual ranges.
Breakout detection (LONG / SHORT)
The script then looks for breakouts when price leaves a consolidation zone:
It checks if the previous bar was inside consolidation:
wasConso = isConsolidating
A bullish breakout (LONG) occurs when:
The current bar is no longer in consolidation (not isConsolidating).
The previous bar was in consolidation (wasConso).
The close breaks above the previous consolidation high (close > rangeHigh ):
text
breakLong = not isConsolidating and wasConso and close > rangeHigh
A bearish breakout (SHORT) occurs when:
The current bar is no longer in consolidation.
The previous bar was in consolidation.
The close breaks below the previous consolidation low (close < rangeLow ):
text
breakShort = not isConsolidating and wasConso and close < rangeLow
On each breakout, a label is drawn at the breakout bar:
text
if breakLong
label.new(bar_index, low, "LONG",
style = label.style_label_up,
textcolor = color.white,
color = color.new(color.teal, 0),
size = size.tiny)
if breakShort
label.new(bar_index, high, "SHORT",
style = label.style_label_down,
textcolor = color.white,
color = color.new(color.red, 0),
size = size.tiny)
These labels highlight where price transitions from sideways action to a potential directional move.
User inputs and tuning
lookback (Bars for range)
Number of bars used to compute the consolidation high/low. Higher values produce wider, less frequent zones; lower values detect shorter consolidations.
minBars (Minimum bars in consolidation)
Minimum number of consecutive bars that must meet the compression condition. On 15‑minute charts, values between 6 and 12 often work, but this depends on the asset.
atrLen and atrMult
Control how strict the compression rule is.
atrLen: ATR period.
atrMult: maximum allowed range as a multiple of ATR.
Increasing atrMult finds more zones; decreasing it makes the filter stricter.
showText
Optional helper label with a short description, useful when sharing the script with other users on the TradingView community.
Practical usage
Apply the indicator to your preferred timeframe (for example, 15‑minute crypto charts).
Tweak lookback, minBars, and atrMult until the yellow zones match the consolidations you would mark manually.
Use the LONG and SHORT labels as areas of interest for studying range breakouts and building your own entry/exit rules, always combining them with risk management and a complete trading strategy.
This way, the script turns a visual concept—sideways consolidation followed by breakout—into a systematic, testable signal in Pine Script v6.
Sequential 9(Setup Count)- KoRCThis indicator is a simplified Sequential 9-count (Setup 9) tool inspired by widely known “sequential counting” concepts. It detects potential exhaustion points by counting consecutive closes relative to the close 4 bars earlier:
Buy Setup (DIP): close < close for 9 consecutive bars (optional strict mode: <=)
Sell Setup (TOP): close > close for 9 consecutive bars (optional strict mode: >=)
Enhancements / Filters (optional):
Trend filter (default ON): uses EMA(200) as a macro trend filter and EMA(20) as a fast context filter.
Volatility filter (optional): ignores signals in low-volatility regimes using ATR% threshold.
Dedupe (default ON): prevents repeated signals within a short window (one-shot per swing concept).
Perfected highlight:
Signals are visually emphasized when a simple “perfected” condition is met (bar 8 or 9 extends beyond recent reference highs/lows), displayed with brighter colors.
How to use:
Use DIP/TOP labels as potential exhaustion alerts, not standalone trade signals. Combine with your own risk management and confirmation tools.
Disclaimer:
Not affiliated with or endorsed by any third-party. This script is provided for educational/visualization purposes only and does not constitute financial advice.
Pradip's MACD Divergence ProThis is where the "magic" happens, Pradip. MACD Divergence is one of the most powerful concepts because it acts like an early-warning system. It tells you when the market is "lying"—when the price is moving up or down, but the energy (momentum) behind it is dying.






















