Differenza Close - SMA200 con MM9 dinamicaDifferenza Close - SMA200 con MM9 dinamica
distanza tra i prezzi e la sua media di lungo periodo.
지표 및 전략
KCP Support & Resistance [Dr.K.C.PRAKASH]ChatGPT said:
This indicator “KCP Support & Resistance ” (Pine Script v5) is a multi-featured support & resistance tool that combines pivots, slope-based channels, Fibonacci options, and SMA200 trend reference.
🔎 Core Concept
The script identifies pivot highs and lows and uses them to draw support and resistance levels on the chart.
It allows you to visualize them in two ways:
Horizontal lines (flat support/resistance at pivot values).
Parallel slope-based lines (trend-adjusted, drawn with slope factor).
⚙️ Settings & Options
Theme
useDark: Switches to a dark-color palette with bright neon-style lines for better visibility on dark charts.
Basic Settings
length: Pivot length (bars used to detect swing high/low).
lookback: How many past pivot points to use for plotting lines.
Slope: Multiplier applied to slope calculations (for slanted trendline-style S/R).
Extend Horizontal Lines Left?: Option to extend horizontal lines to both sides.
Extend Parallel Lines Left?: Same for slope-based lines.
Show/Hide Controls
Show Parallel Lines?: Toggle diagonal support/resistance.
Show Horizontal Lines?: Toggle flat levels.
Show SMA 200 Line?: Toggle long-term SMA(200) reference.
Hide Fibonacci Lines? / Show Fib Trend Line? / Show All Fibonacci Lines?: (reserved for Fib functionality).
Line Colors
Customizable line colors for parallel & horizontal high/low lines.
If Dark Theme is enabled → Uses preset colors:
Electric Blue (Resistance - Parallel Highs)
Neon Green (Support - Parallel Lows)
Deep Red/Pink (Horizontal Highs)
Warm Yellow (Horizontal Lows)
📐 Logic & Calculations
Pivot Detection
Uses ta.pivothigh & ta.pivotlow with length to mark swing points.
Stores them in arrays for drawing multiple levels.
Slope Calculation
Uses covariance/variance of price vs. time (bar_index) to estimate slope.
Multiplied by Slope factor.
Makes trend-following parallel support/resistance lines possible.
Line Drawing
Parallel lines: Slanted, based on pivot highs/lows + slope.
Horizontal lines: Flat support & resistance levels extended across the chart.
SMA200 Plot
Plots SMA(200) for long-term trend direction.
Colored white if EMA(200) > SMA(200), else yellow (trend bias visual).
📊 What You See on Chart
Support & Resistance drawn dynamically from pivots.
Choice of horizontal (classic S/R) or sloped (trend-following) lines.
Dark theme colors → Electric blue, neon green, deep pink, warm yellow (if enabled).
SMA200 reference line → Helps identify bullish/bearish long-term bias.
Optional Fibonacci lines (future expansion).
Momentum Variance OscillatorWhat MVO measures:
-PV (Price-Volume) Oscillator – how far price is from a volatility-scaled basis, then weighted by relative volume.
- > 0 = bullish pressure; < 0 = bearish pressure.
-|PV| larger ⇒ stronger momentum.
-Signal line (EMA of PV) – a smoother track of PV; crossings flag momentum shifts.
-Zero line gradient – instantly shows direction (greenish bull / reddish bear) and strength (paler → stronger).
-Extreme bands (±obLevel) – “hot zone” thresholds; being beyond them = exceptional push.
-Variance histogram – MACD-like view (PV minus slower PV-EMA) to see thrust building vs. fading.
-(Optional) Bar coloring & background tint – paints price bars and/or the panel on key events so you can read the regime at a glance.
-Auto-Tune – searches a grid of (obLevel, weakLvl) pairs and (optionally) auto-applies the best, ranked by CAGR vs. drawdown.
Core signals & how to trade them:
1) Define the regime:
-Bullish regime: PV above 0 and/or PV above Signal; zero line is in bull gradient.
-Bearish regime: PV below 0 and/or PV below Signal; zero line is in bear gradient.
-Action: Prefer trades with the regime (avoid fading strong color/strength unless you have a clear reversal setup).
2) Entries:
Momentum entry:
-Long: PV crosses above Signal while PV > 0.
-Short: PV crosses below Signal while PV < 0.
Breakout/acceleration:
-Long add-on: PV crosses above +obLevel (extreme top) and holds.
-Short add-on: PV crosses below −obLevel (extreme bottom) and holds.
-Histogram confirm: Growing bars in your direction = thrust improving; shrinking/flip = thrust stalling.
3) Exits / risk:
-Soft exit / tighten stops: PV loses the extreme and re-enters inside, or histogram fades/turns against you.
-Hard exit / reverse: Opposite PV↔Signal crossover and PV crosses the zero line.
-Weak zone filter: If |PV| < weakLvl, treat signals as lower quality (smaller size or skip).
4) Practical setup - Suggested defaults (good starting point):
-Signal length: 26
-Volume power: 0.50
-obLevel (extreme): 2.00
-weakLvl: 0.75
-Show histogram & dots: On
-Auto-Tune (recommended)
-Turn Auto-Select Best ON. MVO will scan obLevel 1.50→3.00 (step 0.05) and weakLvl 0.50→1.00 (step 0.05), then use the top-ranked pair (CAGR/(1+MDD)).
-If you want to see the top combos, enable the Optimizer Table (Top-3).
5) Visual options
-Bar Colors: Regime+Strength – bars follow the zero-line gradient (great for quick read).
-Extremes – paint only when beyond ±obLevel.
-Cross Signals – paint only on the bar that crosses an extreme.
-Background on breach: A one-bar tint when PV crosses an extreme.
6) Example playbook:
Long setup:
-Zero line shows bull gradient and PV > 0.
-PV crosses above Signal (entry).
-If PV drives above +obLevel, consider add-on; trail under the last minor swing or use ATR.
-Exit/trim on PV crossing below Signal or histogram turning negative; flatten on a drop through 0.
Short setup mirrors the above on the bear side.
7) Tips to avoid common traps:
-Don’t fade strong extremes without clear confirmation (e.g., PV re-entering inside + histogram flip).
-Respect the weak zone: if |PV| < weakLvl, signals are fragile—size down or wait.
-Align with structure: higher-timeframe trend and SR improve expectancy.
-Instrument personality matters: use Auto-Tune or re-calibrate obLevel/weakLvl across assets/timeframes.
8) Alerts you can set:
-Bull Signal X – PV crossed above Signal
-Bear Signal X – PV crossed below Signal
-Bull Baseline X – PV crossed above 0
-Bear Baseline X – PV crossed below 0
Просто и ясноThis indicator is a comprehensive trading tool that combines multiple moving averages (MA) and volume profile analysis. Here’s a brief overview of its main components:
Moving Averages System
The indicator displays several types of moving averages with customizable parameters:
Primary MA System:
Two main MAs (MA1 and MA2) with selectable types (SMA, EMA, WMA, VWMA, RMA, HMA)
Customizable lengths for both MAs
MA1 is plotted in blue, MA2 in red
Global Trend MA:
A long-term MA (green line) for trend identification
An additional multiplier line (purple) for support/resistance levels
Additional EMAs:
Multiple EMAs with different periods (from 5 to 150 periods)
Dynamic color coding (green/red) based on direction
Two key EMAs (35 and 90 periods) plotted in yellow
Volume Profile Analysis
The indicator includes a volume profile component that:
Analyzes price distribution over a specified number of bars
Displays volume-based histograms showing:
Buy volume (blue bars)
Sell volume (red bars)
Point of Control (PoC) area
Plots top and bottom range lines
Key Features
Customizable Parameters:
MA types and lengths
Volume profile settings
Visual appearance
Overlays:
All elements are plotted on the price chart
Multiple MA lines for trend analysis
Volume histograms for market depth analysis
Practical Use:
Trend identification using MA crossovers
Support/resistance levels from MA lines
Volume analysis for market sentiment
Potential reversal zones based on volume distribution
The indicator is designed for both trend following and reversal trading strategies, providing a combination of trend analysis tools and volume-based market structure insights.
Это комплексный индикатор для технического анализа, который объединяет несколько инструментов:
Скользящие средние (MA) разных типов (SMA, EMA, WMA, VWMA, RMA, HMA) с настраиваемыми периодами
Основная система из двух MA (синяя и красная линии) для определения трендов
Глобальная MA (зелёная линия) для анализа долгосрочного тренда
Дополнительные EMA с динамической раскраской (зелёный/красный)
Профиль объёма с гистограммами покупок (синие) и продаж (красные)
Индикатор помогает:
Определять тренды через пересечения MA
Находить уровни поддержки/сопротивления
Анализировать рыночный объём
Оценивать настроения участников рынка
Инструмент подходит как для внутридневной торговли, так и для долгосрочного анализа. Все элементы отображаются прямо на графике цены.
GBB_lib_fiboLibrary "GBB_lib_fibo"
l_fibonacci_calc(price_786, price_100)
fibonacci_calc
Parameters:
price_786 (float)
price_100 (float)
l_fibonacci_calc_inverse(price_0, price_1)
fibonacci_calc_inverse
Parameters:
price_0 (float)
price_1 (float)
draw_fibo(high_point, low_point)
draw_fibo
Parameters:
high_point (float)
low_point (float)
GBB_lib_utilsLibrary "GBB_lib_utils"
gbb_moving_average_source(_source, _length, _ma_type)
gbb_moving_average_source
@description Calculates the moving average of a source series.
Parameters:
_source (float) : (series float)
_length (simple int) : (int)
_ma_type (string) : (string)
Returns: (series) Moving average series
gbb_tf_to_display(tf_minutes, tf_string)
gbb_tf_to_display
@description Converts minutes and TF string into a short standard label.
Parameters:
tf_minutes (float) : (float)
tf_string (string) : (string)
Returns: (string) Timeframe label (M1,H1,D1,...)
gbb_convert_bars(_bars)
gbb_convert_bars
@description Formats a number of bars into a duration (days, hours, minutes + bar count).
Parameters:
_bars (int) : (int)
Returns: (string)
gbb_goldorak_init(_tf5Levels_input)
gbb_goldorak_init
@description Builds a contextual message about the current timeframe and optional 5-level TF.
Parameters:
_tf5Levels_input (string) : (string) Alternative timeframe ("" = current timeframe).
Returns: (string, string, float)
조건 검색식//@version=5
indicator("조건 검색식", overlay=true)
// ----------------------
// 기본 입력
// ----------------------
shortEmaLen = input.int(112, "단기 EMA")
midEmaLen = input.int(224, "중기 EMA")
longEmaLen = input.int(448, "장기 EMA")
ema5Len = input.int(5, "EMA 5")
ema20Len = input.int(20, "EMA 20")
bbLen = input.int(20, "볼린저 기간")
bbMult = input.float(2.0, "볼린저 배수")
// ----------------------
// 이동평균선
// ----------------------
emaShort = ta.ema(close, shortEmaLen)
emaMid = ta.ema(close, midEmaLen)
emaLong = ta.ema(close, longEmaLen)
ema5 = ta.ema(close, ema5Len)
ema20 = ta.ema(close, ema20Len)
// ----------------------
// 거래량 / 거래대금
// ----------------------
avgVol = ta.sma(volume, 5)
cond_vol = (volume >= 50000 and volume <= 99999999)
cond_val = (avgVol * close >= 50000 and avgVol * close <= 9999999)
// ----------------------
// 캔들 비교
// ----------------------
cond_price = (close < close) // 1봉전 종가 < 현재 종가
// ----------------------
// 이평 조건
// ----------------------
cond_ma_reverse = (emaShort < emaMid and emaMid < emaLong) // 역배열
cond_ma_short = (ema5 > ema20 and ema5 > ema20 ) // 1봉 이상 지속
// ----------------------
// 체결강도 (추정치, 거래량 기준)
// ----------------------
// 체결강도 공식은 증권사마다 다르므로 근사치로 가정: (상승 거래량 비중/총거래량)
// TradingView에서 직접적인 "체결강도"는 제공하지 않음 → 임시로 100% 충족으로 세팅
cond_strength = true // 혹은 커스텀 계산 가능
// ----------------------
// 볼린저밴드 조건
// ----------------------
basis = ta.sma(close, bbLen)
dev = ta.stdev(close, bbLen)
bbUpper = basis + bbMult * dev
// 종가가 상단선 -5% ~ +5% 이내
cond_bb = (close >= bbUpper * 0.95 and close <= bbUpper * 1.05)
// ----------------------
// 일목균형표 (9,26,52)
// ----------------------
conversion = (ta.highest(high,9) + ta.lowest(low,9)) / 2
base = (ta.highest(high,26) + ta.lowest(low,26)) / 2
span1 = (conversion + base) / 2
span2 = (ta.highest(high,52) + ta.lowest(low,52)) / 2
cond_ichimoku = (close > span1 and close > span2)
// ----------------------
// 최종 조건
// ----------------------
condition = cond_vol and cond_val and cond_price and cond_ma_reverse and cond_ma_short and cond_strength and cond_bb and cond_ichimoku
plotshape(condition, title="조건 충족", style=shape.labelup, color=color.green, size=size.small, text="조건OK")
Cnagda Pure Price ActionCnagda Pure Price Action (CPPA) indicator is a pure price action-based system designed to provide traders with real-time, dynamic analysis of the market. It automatically identifies key candles, support and resistance zones, and potential buy/sell signals by combining price, volume, and multiple popular trend indicators.
How Price Action & Volume Analysis Works
Silver Zone – Logic, Reason, and Trade Planning
Logic & Visualization:
The Silver Zone is created when the closing price is the lowest in the chosen window and volume is the highest in that window.
Visually, a large silver-colored box/rectangle appears on the chart.
Thick horizontal lines (top and bottom) are drawn at the high and low of that candle/bar, extending to the right.
Reasoning:
This combination typically occurs at strong “accumulation” or support areas:
Sellers push the price down to the lowest point, but aggressive buyers step in with high volume, absorbing supply.
Indicates potential exhaustion of selling and likely shift in market control to buyers.
How to Plan Trades Using Silver Zone:
Watch if price returns to the Silver Zone in the future: It often acts as powerful support.
Bullish entries (buys) can be planned when price tests or slightly pierces this zone, especially if new buy signals occur (like yellow/green candle labels).
Place your stop-loss below the bottom line of the Silver Zone.
Target: Look for the nearest resistance or opposing zone, or use indicator’s bullish label as confirmation.
Extra Tip:
Multiple touches of the Silver Zone reinforce its importance, but if price closes deeply below it with high volume, that’s a caution signal—support may be breaking.
Black Zone – Logic, Reason, and Trade Planning (as CPPA):
Logic & Visualization:
The Black Zone is created when the closing price is the highest in the chosen window and volume is the lowest in that window.
Visually, a large black-colored box/rectangle appears on the chart, along with thick horizontal lines at the top (high) and bottom (low) of the candle, extending to the right.
Reasoning:
This combination signals a strong “distribution” or resistance area:
Buyers push the price up to a local high, but low volume means there is not much follow-through or conviction in the move.
Often marks exhaustion where uptrend may pause or reverse, as sellers can soon step in.
How to Plan Trades Using Black Zone:
If price revisits the Black Zone in the future, it often acts as major resistance.
Bearish entries (sells) are considered when price is near, testing, or slightly above the Black Zone—especially if new sell signals appear (like blue/red candle labels).
Place your stop-loss just above the top line of the Black Zone.
Target: Nearest support zone (such as a Silver Zone) or next indicator’s bearish label.
Extra Tip:
Multiple touches of the Black Zone make it stronger, but if price closes far above with rising volume, be cautious—resistance might be breaking.
Support Line – Logic, Reason, and Trade Planning (as Cppa):
Logic & Visualization:
The Support Line is a dynamically drawn dashed line (usually blue) that marks key price levels where the market has previously shown significant buying interest.
The line is generated whenever a candle forms a high price with high volume (orange logic).
The script checks for historical pivot lows, past support zones, and even higher timeframe (HTF) supports, and then extends a blue dashed line from that price level to the right, labeling it (sometimes as “Prev Support Orange, HTF”).
Reasoning:
This line helps you visually identify where demand has been strong enough to hold price from falling further—essentially a floor in the market used by professional traders.
If price approaches or re-tests this line, there’s a good chance buyers will defend it again.
How to Plan Trades Using Support Line:
Watch for price to approach the Support Line during down moves. If you see a bullish candlestick pattern, buy labels (yellow/green), or other indicators aligning, this can be a high-probability entry zone.
Great for planning stop-loss for long trades: place stops just below this line.
Target: Next resistance zone, Black Zone, or the top of the last swing.
Extra Tip:
Multiple confirmations (support line + Silver Zone + bullish label) provide powerful entry signals.
If price closes strongly below the Support Line with volume, be cautious—support may be breaking, and a trend reversal or deeper correction could follow.
Resistance Line – Logic, Reason, and Trade Planning (from CPPA):
Logic & Visualization:
The Resistance Line is a dynamically drawn dashed line (usually purple or red) that identifies price levels where the market has previously faced significant selling pressure.
This line is created when a candle reaches a high price combined with high volume (orange logic), or from a historical pivot high/resistance,
The script also tracks higher timeframe (HTF) resistance lines, labeled as “Prev Resistance Orange, HTF,” and extends these dashed lines to the right across the chart.
Reasoning:
Resistance Lines are visual markers of “supply zones,” where buyers previously failed, and sellers took control.
If the price returns to this line later, sellers may get active again to defend this level, halting the uptrend.
How to Plan Trades Using Resistance Line:
Watch for price to approach the Resistance Line during up moves. If you see bearish candlestick patterns, sell labels (blue/red), or bearish indicator confirmation, this becomes a strong shorting opportunity.
Perfect for placing stop-loss in short trades—put your stop just above the Resistance Line.
Target: Next support zone (Silver Zone) or bottom of the last swing.
If the price breaks above with high volume, avoid shorting—resistance may be failing.
Extra Tip:
Multiple resistances (Resistance Line + Black Zone + bearish label) make short signals stronger.
Choppy movement around this line often signals indecision; wait for a clear rejection before entering trades.
Bullish / Bearish Label – Logic, Reason, and Trade Planning:
Logic & Visualization:
The indicator constantly calculates a "Bull Score" and a "Bear Score" based on several factors:
Trend direction from price slope
Confirmation by popular indicators (RSI, ADX, SAR, CMF, OBV, CCI, Bollinger Bands, TWAP)
Adaptive scoring (higher score for each bullish/bearish condition met)
If Bull Score > Bear Score, the chart displays a green "BULLISH" label (usually below the bar).
If Bear Score > Bull Score, the chart displays a red "BEARISH" label (usually above the bar).
If neither dominates, a "NEUTRAL" label appears.
Reasoning:
The labels summarize complex price action and indicator analysis into a simple, actionable sentiment cue:
Bullish: Majority of conditions indicate buying strength; trend is up.
Bearish: Majority signals show selling pressure; trend is down.
How to Use in Trade Planning:
Use the Bullish label as confirmation to enter or hold long (buy) positions, especially if near support/Silver Zone.
Use the Bearish label to enter/hold short (sell) positions, especially if near resistance/Black Zone.
For best results, combine with candle color, volume analysis, or other labels (yellow/green for buys, blue/red for sells).
Avoid trading against these labels unless you have strong confluence from zones/support levels.
Yellow Label (Buy Signal) – Logic, Reason & Trade Planning:
Logic & Visualization:
The yellow label appears below a candle (label.style_label_up, yloc.belowbar) and marks a potential buy signal.
Script conditions:
The candle must be a “yellow candle” (which means it’s at the local lowest close, not a high, with normal volume).
Volume is decreasing for 2 consecutive candles (current volume < previous volume, previous volume < second previous).
When these conditions are met, a yellow label is plotted below the candle.
Reasoning:
This scenario often marks the end of selling pressure and start of possible accumulation—buyers may be stepping in as sellers exhaust.
Decreasing volume during a local price low means selling is slowing, possibly hinting at a reversal.
How to Trade Using Yellow Label:
Entry: Consider buying at/just above the yellow-labeled candle’s close.
Stop-loss: A bit below the candle’s low (or Silver Zone line, if present).
Target: Next resistance level, Black Zone, or chart’s bullish label.
Extra Tip:
If the yellow label is found at/near a Silver Zone or Support Line, and trend is “Bullish,” the setup gets even stronger.
Avoid trading if overall indicator shows “Bearish.”
Green Label (Buy with Increasing Volume) – Logic, Reason & Trade Planning:
Logic & Visualization:
The green label is plotted below a candle (label.style_label_up, yloc.belowbar) and marks a strong buy signal.
Script conditions:
The candle must be a “yellow candle” (at the local lowest close, normal volume).
Volume is increasing for 2 consecutive candles (current volume > previous volume, previous volume > second previous).
When these conditions are met, a green label is plotted below the candle.
Reasoning:
This scenario signals that buyers are stepping in aggressively at a local price low—the end of a downtrend with strong, rising activity.
Increasing volume at a price low is a classic sign of accumulation, where institutions or large players may be buying.
How to Trade Using Green Label:
Entry: Consider buying at/just above the green-labeled candle’s close for a momentum-based reversal.
Stop-loss: Slightly below the candle’s low, or the Silver Zone/support line if present.
Target: Nearest resistance zone/Black Zone, indicator’s bullish label, or next swing high.
Extra Tip:
If the green label is near other supports (Silver Zone, Support Line), the setup is extra strong.
Use confirmation from Bullish labels or trend signals for best results.
Green label setups are suitable for quick, high momentum trades due to increasing volume
Blue Label (Sell Signal on Decreasing Volume) – Logic, Reason & Trade Planning:
Logic & Visualization:
The blue label is plotted above a candle (label.style_label_down, yloc.abovebar) as a potential sell signal.
Script conditions:
The candle is a “blue candle” (local highest close, but not also lowest, and volume is neither highest nor lowest).
Volume is decreasing over 2 consecutive candles (current volume < previous, previous < two ago).
When these match, a blue label appears above the candle.
Reasoning:
This typically signals buyer exhaustion at a local high: price has gone up, but volume is dropping, suggesting big players may not be buying any more at these levels.
The trend is losing strength, and a reversal or pullback is likely.
How to Trade Using Blue Label:
Entry: Look to sell at/just below the candle with the blue label.
Stop-loss: Just above the candle’s high (or above the Black Zone/resistance if present).
Target: Nearest support, Silver Zone, or a swing low.
Extra Tip:
Blue label signals are stronger if they appear near Black Zones or Resistance Lines, or when the general market label is "Bearish."
As with buy setups, always check for confirmation from trend or volume before trading aggressively.
Blue Label (Sell Signal on Decreasing Volume) – Logic, Reason & Trade Planning:
Logic & Visualization:
The blue label is plotted above a candle (label.style_label_down, yloc.abovebar) as a potential sell signal.
Script conditions:
The candle is a “blue candle” (local highest close, but not also lowest, and volume is neither highest nor lowest).
Volume is decreasing over 2 consecutive candles (current volume < previous, previous < two ago).
When these match, a blue label appears above the candle.
Reasoning:
This typically signals buyer exhaustion at a local high: price has gone up, but volume is dropping, suggesting big players may not be buying any more at these levels.
The trend is losing strength, and a reversal or pullback is likely.
How to Trade Using Blue Label:
Entry: Look to sell at/just below the candle with the blue label.
Stop-loss: Just above the candle’s high (or above the Black Zone/resistance if present).
Target: Nearest support, Silver Zone, or a swing low.
Extra Tip:
Blue label signals are stronger if they appear near Black Zones or Resistance Lines, or when the general market label is "Bearish."
As with buy setups, always check for confirmation from trend or volume before trading aggressively.
Here’s a summary of all key chart labels, zones, and trading logic of your Price Action script:
Silver Zone: Powerful support zone. Created at lowest close + highest volume. Best for buy entries near its lines.
Black Zone: Strong resistance zone. Created at highest close + lowest volume. Ideal for short trades near its levels.
Support Line: Blue dashed line at historical demand; buyers defend here. Look for bullish setups when price approaches.
Resistance Line: Purple/red dashed line at supply; sellers defend here. Great for bearish setups when price nears.
Bullish/Bearish Labels: Summarize trend direction using price action + multiple indicator confirmations. Plan buys, holds on bullish; sells, shorts on bearish.
Yellow Label: Buy signal on decreasing volume and local price low. Entry above candle, stop below, target next resistance.
Green Label: Strong buy on increasing volume at a price low. Entry for momentum trade, stop below, target next zone.
Blue Label: Sell signal on dropping volume and local price high. Entry below candle, stop above, target next support.
Best Practices:
Always combine zone/label signals for higher probability trades.
Use stop-loss near zones/lines for risk management.
Prefer trading in the trend direction (bullish/bearish label agrees with your entry).
if Any Question, Suggestion Feel free to ask
Disclaimer:
All information provided by this indicator is for educational and analysis purposes only, and should not be considered financial advice.
First Passage Time - Distribution AnalysisThe First Passage Time (FPT) Distribution Analysis indicator is a sophisticated probabilistic tool that answers one of the most critical questions in trading: "How long will it take for price to reach my target, and what are the odds of getting there first?"
Unlike traditional technical indicators that focus on what might happen, this indicator tells you when it's likely to happen.
Mathematical Foundation: First Passage Time Theory
What is First Passage Time?
First Passage Time (FPT) is a concept in stochastic processes that measures the time it takes for a random process to reach a specific threshold for the first time. Originally developed in physics and mathematics, FPT has applications in:
Quantitative Finance: Option pricing, risk management, and algorithmic trading
Neuroscience: Modeling neural firing patterns
Biology: Population dynamics and disease spread
Engineering: Reliability analysis and failure prediction
The Mathematics Behind It
This indicator uses Geometric Brownian Motion (GBM), the same stochastic model used in the Black-Scholes option pricing formula:
dS = μS dt + σS dW
Where:
S = Asset price
μ = Drift (trend component)
σ = Volatility (uncertainty component)
dW = Wiener process (random walk)
Through Monte Carlo simulation, the indicator runs 1,000+ price path simulations to statistically determine:
When each threshold (+X% or -X%) is likely to be hit
Which threshold is hit first (directional bias)
How often each scenario occurs (probability distribution)
🎯 How This Indicator Works
Core Algorithm Workflow:
Calculate Historical Statistics
Measures recent price volatility (standard deviation of log returns)
Calculates drift (average directional movement)
Annualizes these metrics for meaningful comparison
Run Monte Carlo Simulations
Generates 1,000+ random price paths based on historical behavior
Tracks when each path hits the upside (+X%) or downside (-X%) threshold
Records which threshold was hit first in each simulation
Aggregate Statistical Results
Calculates percentile distributions (10th, 25th, 50th, 75th, 90th)
Computes "first hit" probabilities (upside vs downside)
Determines average and median time-to-target
Visual Representation
Displays thresholds as horizontal lines
Shows gradient risk zones (purple-to-blue)
Provides comprehensive statistics table
📈 Use Cases
1. Options Trading
Selling Options: Determine if your strike price is likely to be hit before expiration
Buying Options: Estimate probability of reaching profit targets within your time window
Time Decay Management: Compare expected time-to-target vs theta decay
Example: You're considering selling a 30-day call option 5% out of the money. The indicator shows there's a 72% chance price hits +5% within 12 days. This tells you the trade has high assignment risk.
2. Swing Trading
Entry Timing: Wait for higher probability setups when directional bias is strong
Target Setting: Use median time-to-target to set realistic profit expectations
Stop Loss Placement: Understand probability of hitting your stop before target
Example: The indicator shows 85% upside probability with median time of 3.2 days. You can confidently enter long positions with appropriate position sizing.
3. Risk Management
Position Sizing: Larger positions when probability heavily favors one direction
Portfolio Allocation: Reduce exposure when probabilities are near 50/50 (high uncertainty)
Hedge Timing: Know when to add protective positions based on downside probability
Example: Indicator shows 55% upside vs 45% downside—nearly neutral. This signals high uncertainty, suggesting reduced position size or wait for better setup.
4. Market Regime Detection
Trending Markets: High directional bias (70%+ one direction)
Range-bound Markets: Balanced probabilities (45-55% both directions)
Volatility Regimes: Compare actual vs theoretical minimum time
Example: Consistent 90%+ bullish bias across multiple timeframes confirms strong uptrend—stay long and avoid counter-trend trades.
First Hit Rate (Most Important!)
Shows which threshold is likely to be hit FIRST:
Upside %: Probability of hitting upside target before downside
Downside %: Probability of hitting downside target before upside
These always sum to 100%
⚠️ Warning: If you see "Low Hit Rate" warning, increase this parameter!
Advanced Parameters
Drift Mode
Allows you to explore different scenarios:
Historical: Uses actual recent trend (default—most realistic)
Zero (Neutral): Assumes no trend, only volatility (symmetric probabilities)
50% Reduced: Dampens trend effect (conservative scenario)
Use Case: Switch to "Zero (Neutral)" to see what happens in a pure volatility environment, useful for range-bound markets.
Distribution Type
Percentile: Shows 10%, 25%, 50%, 75%, 90% levels (recommended for most users)
Sigma: Shows standard deviation levels (1σ, 2σ)—useful for statistical analysis
⚠️ Important Limitations & Best Practices
Limitations
Assumes GBM: Real markets have fat tails, jumps, and regime changes not captured by GBM
Historical Parameters: Uses recent volatility/drift—may not predict regime shifts
No Fundamental Events: Cannot predict earnings, news, or macro shocks
Computational: Runs only on last bar—doesn't give historical signals
Remember: Probabilities are not certainties. Use this indicator as part of a comprehensive trading plan with proper risk management.
Created by: Henrique Centieiro. feedback is more than welcome!
Bearish Pin Bar Detector - BANN DONGLINGPin bars are among the most reliable single-candlestick patterns, signaling strong price rejection. Our precise detector identifies Bearish Pin Bars (or Shooting Stars) based on strict, customizable geometric rules (long upper wick, small body).
Precision: Customize the body-to-wick ratio to filter out weak signals.
Confidence: Spot strong selling pressure and potential swing highs.
Renko Reversal Alert -BANN DONGLINGRenko charts eliminate market noise, making trend changes crystal clear. This feature alerts you the instant the Renko bricks change color (e.g., from red to green), providing a clean, confirmed signal of a potential trend reversal.
Clarity: Get alerted only when a full brick confirms a direction change.
Speed: Catch the reversal as it happens, without waiting for complex patterns.
Nithin's LQ Sweep//@version=6
indicator("Liquidity Sweep Zones (HTF -> LTF)", overlay=true, max_boxes_count=200, max_labels_count=500)
// ----------------- Inputs -----------------
htf_tf = input.timeframe("240", "Structure Timeframe (HTF) - example: 240=4H")
pivot_left = input.int(3, "Pivot Left", minval=1)
pivot_right = input.int(1, "Pivot Right", minval=1)
min_wick_pts = input.float(0.0, "Min sweep wick size (points)", step=0.1)
zone_width = input.int(80, "Zone width (bars to the right)", minval=1)
show_struct = input.bool(true, "Show HTF structure level")
show_labels = input.bool(true, "Show sweep labels")
alpha_fill = input.int(78, "Zone fill transparency (0-255)", minval=0, maxval=255)
// ----------------- HTF Pivot (structure) -----------------
// request HTF pivots (these return series aligned to LTF bars)
htf_pH = request.security(syminfo.tickerid, htf_tf, ta.pivothigh(high, pivot_left, pivot_right), barmerge.gaps_off, barmerge.lookahead_off)
htf_pL = request.security(syminfo.tickerid, htf_tf, ta.pivotlow(low, pivot_left, pivot_right), barmerge.gaps_off, barmerge.lookahead_off)
// Keep latest non-na HTF pivot levels
var float lastHTFHigh = na
var float lastHTFLow = na
if not na(htf_pH)
lastHTFHigh := htf_pH
if not na(htf_pL)
lastHTFLow := htf_pL
// Optional: draw HTF levels as lines
var line htfHighLine = na
var line htfLowLine = na
if show_struct
if not na(lastHTFHigh)
if not na(htfHighLine)
line.set_xy1(htfHighLine, bar_index - 500, lastHTFHigh)
line.set_xy2(htfHighLine, bar_index + 1, lastHTFHigh)
else
htfHighLine := line.new(bar_index - 500, lastHTFHigh, bar_index + 1, lastHTFHigh, xloc=xloc.bar_index, extend=extend.none, color=color.new(color.red, 60), width=1)
if not na(lastHTFLow)
if not na(htfLowLine)
line.set_xy1(htfLowLine, bar_index - 500, lastHTFLow)
line.set_xy2(htfLowLine, bar_index + 1, lastHTFLow)
else
htfLowLine := line.new(bar_index - 500, lastHTFLow, bar_index + 1, lastHTFLow, xloc=xloc.bar_index, extend=extend.none, color=color.new(color.green, 70), width=1)
// ----------------- Sweep detection (on current timeframe) -----------------
high_sweep = false
low_sweep = false
// High sweep: price makes a wick above last HTF high, but closes back below that HTF level
if not na(lastHTFHigh)
high_sweep := (high > lastHTFHigh) and (close < lastHTFHigh) and (high - lastHTFHigh >= min_wick_pts)
// Low sweep: price makes a wick below last HTF low, but closes back above that HTF level
if not na(lastHTFLow)
low_sweep := (low < lastHTFLow) and (close > lastHTFLow) and (lastHTFLow - low >= min_wick_pts)
// ----------------- Create red zone rectangles -----------------
var array boxes = array.new()
// Function to create a box and push to array; removes oldest if > max
f_newBox(_x1, _y1, _x2, _y2, _fillColor, _borderColor) =>
b = box.new(_x1, _y1, _x2, _y2, xloc=xloc.bar_index, border_width=1, bgcolor=_fillColor, border_color=_borderColor)
array.push(boxes, b)
// keep reasonable number of boxes
maxBoxes = 200
if array.size(boxes) > maxBoxes
old = array.shift(boxes)
box.delete(old)
b
if high_sweep
topY = math.max(high, lastHTFHigh)
bottomY = lastHTFHigh
// create box from the HTF level to the wick high
col = color.new(color.red, alpha_fill)
bord = color.new(color.red, 40)
f_newBox(bar_index - 0, topY, bar_index + zone_width, bottomY, col, bord)
if show_labels
label.new(bar_index, high, "High Sweep", style=label.style_label_down, textcolor=color.white, color=color.new(color.red, 0), size=size.tiny)
if low_sweep
bottomY = math.min(low, lastHTFLow)
topY = lastHTFLow
col = color.new(color.red, alpha_fill) // same red fill as screenshot-red zones
bord = color.new(color.red, 40)
f_newBox(bar_index - 0, topY, bar_index + zone_width, bottomY, col, bord)
if show_labels
label.new(bar_index, low, "Low Sweep", style=label.style_label_up, textcolor=color.white, color=color.new(color.red, 0), size=size.tiny)
// Visual sweep markers (optional small shapes)
plotshape(high_sweep, title="High Sweep marker", style=shape.triangledown, location=location.abovebar, size=size.tiny, color=color.red)
plotshape(low_sweep, title="Low Sweep marker", style=shape.triangleup, location=location.belowbar, size=size.tiny, color=color.red)
// ----------------- Info panel -----------------
var table info = table.new(position.top_right, 1, 1)
if barstate.islast
table.cell(info, 0, 0, "HTF: " + htf_tf + " | Pivot L/R: " + str.tostring(pivot_left) + "/" + str.tostring(pivot_right), text_color=color.white, bgcolor=color.new(color.blue, 85))
Nithin Liquidity Sweep//@version=6
indicator("Liquidity Sweep Finder", overlay=true, max_labels_count=500)
// Input settings
lookback = input.int(10, "Lookback Bars for High/Low", minval=2)
showHighSweep = input.bool(true, "Show High Sweeps")
showLowSweep = input.bool(true, "Show Low Sweeps")
// Identify recent swing high/low
recentHigh = ta.highest(high, lookback)
recentLow = ta.lowest(low, lookback)
// Sweep conditions
highSweep = showHighSweep and high > recentHigh and close < recentHigh
lowSweep = showLowSweep and low < recentLow and close > recentLow
// Plot signals
plotshape(highSweep, title="High Liquidity Sweep", style=shape.labeldown,
text="Sweep ⬇", location=location.abovebar, color=color.red, size=size.tiny)
plotshape(lowSweep, title="Low Liquidity Sweep", style=shape.labelup,
text="Sweep ⬆", location=location.belowbar, color=color.green, size=size.tiny)
// Highlight background when sweep occurs
bgcolor(highSweep ? color.new(color.red, 85) : na)
bgcolor(lowSweep ? color.new(color.green, 85) : na)
orderflow, moneyflow, confluence, divergence, momentumorderflow, moneyflow, confluence, divergence, momentum
geminiNiftyhi it gives buy sell signal this is using price action with cpr indicator
works well on trending day
WHANG EMA-MACD🔥 Smart EMA14 x EMA70 + MACD Trend Alert System
Description:
Tired of chasing false signals?
This simple but powerful indicator helps you catch real trend moves — not the noise.
When EMA14 crosses EMA70 with MACD confirmation, and both EMAs point the same way, you’ll get a clean Buy or Sell alert right on your chart.
No messy settings, no guessing — just clear signals in strong trends.
✨ Features:
🔔 Real-time alerts via “Any alert() function call”
🟢 Buy when EMA14 crosses above EMA70 + MACD > 0
🔴 Sell when EMA14 crosses below EMA70 + MACD < 0
📈 Trades only when both EMAs slope in the same direction
⚙️ Customizable inputs for any market or timeframe
How to use:
Add the indicator to your chart
Create an alert → choose Any alert() function call
Relax and wait for your signals — no need to watch every candle!
Perfect for traders who want to follow the trend, avoid sideways traps, and get early alerts when momentum kicks in 🚀
Elipli5648This indicator displays two moving averages on the same chart — the 9-period and 200-period simple moving averages (SMA).
Both lines are customizable in color and line width directly from the settings menu.
Useful for identifying short-term vs long-term trend direction.
Fib Retrace + Extensions (v6– safe version) v 1🌀 Fib Extension Plus Retracement Strategy: Complete Overview
📊 Purpose and Core Idea
The Fib Extension Plus Retracement Strategy is a hybrid price-action methodology that blends Fibonacci Retracement and Fibonacci Extension tools to map high-probability entry, exit, and target zones within trending markets.
It is designed for precision timing, measured risk exposure, and trend-continuation trading.
By uniting both retracement and extension logic, traders can capture the entire lifecycle of a move — from the pullback phase to the breakout and projected expansion wave.
HTF Candles - DolphinTradeBot1️⃣ Overview
The "HTF Candles - DolphinTradeBot" indicator displays higher timeframe (HTF) candlesticks and their OHLC (Open, High, Low, Close) levels on any lower timeframe chart.
While staying on lower timeframes this helps confirm entries or reversals and visualize major market structure, trend bias, and key price zone
2️⃣ How to Use It ?
Use these levels to identify major support/resistance or trend structure.
Observe higher timeframe candle formations (e.g., engulfing, pin bar, doji)
3️⃣ ⚙️Settings
TimeFrame → Select the higher timeframe to display.
Show OHLC Levels → Toggle lines for Open, High, Low, Close.
Line Colors → Customize the color for each level.
elipli5648 , MA 9 & 200 (Combined) — clean versionThis indicator displays two moving averages on the same chart — the 9-period and 200-period simple moving averages (SMA).
Both lines are customizable in color and line width directly from the settings menu.
Useful for identifying short-term vs long-term trend direction.
NS ND - EVR - Daily Bias - TRFxVolume & Price Action Signals
What It Does
Combines three proven trading methodologies: Effort vs Result (EVR), No Supply/No Demand (NS/ND), and Daily Bias tracking for intraday traders.
Features
Effort vs Result (EVR)
- **Bullish**: Green triangle below bar when price sweeps previous low with high volume and significant wick
- **Bearish**: Red triangle above bar when price sweeps previous high with high volume and significant wick
- Identifies potential reversals where volume doesn't match price movement
No Supply / No Demand (NS/ND)
- **No Demand (Red dot)**: Up-candle with declining volume - buyers weakening
- **No Supply (Green dot)**: Down-candle with declining volume - sellers weakening
- Grey dots = unconfirmed, colored dots = confirmed within lookahead period
- Based on Volume Spread Analysis (VSA) principles
Daily Bias Label
Top-right corner shows market direction:
- **BULLISH ↑** - Closed above Previous Day High
- **BEARISH ↓** - Closed below Previous Day Low
- **BULLISH/BEARISH REV** - Swept level but closed back inside
- **RANGE ↔** - Trading between PDH/PDL
## Settings
- **EVR**: Toggle on/off, volume multiplier, wick %, inside bars, transparency
- **NS/ND**: Toggle on/off, lookahead bars (default: 10)
- **Daily Bias**: Toggle label display
## Best For
✓ Intraday trading (1m-1h timeframes)
✓ Reversal setups
✓ Volume analysis
✓ Confluence trading (all signals align)
How to Use
1. Enable components you want (all can be toggled independently)
2. Trade EVR signals in direction of Daily Bias
3. Look for NS/ND confirmation at key levels
4. Wait for colored dots (confirmed signals) over grey (unconfirmed)
**Note**: Works on intraday timeframes only. NS/ND signals may repaint during confirmation period.