Renkli Parabolic SAR - Sade Versiyon//@version=5
indicator("Renkli Parabolic SAR - Sade Versiyon", overlay=true)
// === PSAR Ayarları ===
psarStart = input.float(0.02, "PSAR Başlangıç (Step)", step=0.01)
psarIncrement = input.float(0.02, "PSAR Artış (Increment)", step=0.01)
psarMax = input.float(0.2, "PSAR Maksimum (Max)", step=0.01)
// === PSAR Hesaplama ===
psar = ta.sar(psarStart, psarIncrement, psarMax)
// === Trend Tespiti ===
bull = close > psar
bear = close < psar
// === Renk Ayarları ===
barColor = bull ? color.new(color.green, 0) : color.new(color.red, 0)
psarColor = bull ? color.green : color.red
bgColor = bull ? color.new(color.green, 90) : color.new(color.red, 90)
// === Mum ve PSAR ===
barcolor(barColor)
plotshape(bull, title="PSAR Bull", location=location.belowbar, style=shape.circle, size=size.tiny, color=color.green)
plotshape(bear, title="PSAR Bear", location=location.abovebar, style=shape.circle, size=size.tiny, color=color.red)
// === Arka Plan ===
bgcolor(bgColor)
// === Al / Sat Sinyalleri ===
buySignal = ta.crossover(close, psar)
sellSignal = ta.crossunder(close, psar)
plotshape(buySignal, title="AL", location=location.belowbar, style=shape.triangleup, size=size.large, color=color.lime)
plotshape(sellSignal, title="SAT", location=location.abovebar, style=shape.triangledown, size=size.large, color=color.red)
// === Alarm Koşulları ===
alertcondition(buySignal, title="AL Sinyali", message="Parabolic SAR Al Sinyali")
alertcondition(sellSignal, title="SAT Sinyali", message="Parabolic SAR Sat Sinyali")
Indikatoren und Strategien
Trend Break Targets [MarkitTick]Trend Break Targets
Trend Break Targets is a technical analysis tool designed to assist traders in identifying trendline breakouts and projecting potential price targets based on market geometry. Unlike fully automated indicators that guess trendlines, this tool provides you with precise control by allowing you to manually Pivot Point the trendline to specific points in time, while automating the complex math of target projection and structure mapping.
Theoretical Basis & Concepts
This indicator is grounded in classic technical analysis principles found in foundational trading literature. It automates the following methodology:
Drawing a trend line between two key points to represent dynamic support or resistance.
Identifying a breakout when the price closes above or below this line, potentially signaling a change in trend.
Calculating a price target by measuring the vertical distance between the breakout line and the last high/low (pivot), then projecting that same distance in the direction of the breakout.
This concept is based on methods and "Measured Move" theories explained in classic books such as "Technical Analysis of Stock Trends" by Edwards & Magee, "Technical Analysis of the Financial Markets" by John Murphy, and in Thomas Bulkowski's Price Pattern Studies.
How It Works
Pivot Pointed Trendline Construction The script draws a trendline between two user-defined points in time (Start Date and End Date). It calculates the slope between these points and extends the line infinitely to the right, allowing you to define the exact structure (e.g., a resistance trendline on a wedge).
Breakout Detection The script monitors the "Price Source" (High, Low, or Close) relative to the extended trendline.
A Bullish Breakout (BC) occurs when the Close crosses above a bearish trendline.
A Bearish Breakout (BC) occurs when the Close crosses below a bullish trendline.
Dynamic Target Projection (The Math) Upon a confirmed breakout, the script automatically calculates three distinct targets by identifying the most significant "Swing Point" (Pivot) prior to the breakout.
Distance (D): The vertical distance between the Trendline and the Pivot Price at the specific bar where the pivot occurred.
Target 1 (T1): The Breakout Price +/- (Distance × 1.0). This represents a classic 1:1 measured move.
Target 2 (T2): The Breakout Price +/- (Distance × 1.618). Based on the Golden Ratio extension.
Target 3 (T3): The Breakout Price +/- (Distance × 2.618).
Market Structure (CHOCH) The script includes an optional Change of Character (CHOCH) module. This runs independently of the trendline logic, identifying local Swing Highs and Swing Lows based on the "Swing Detection Length." It plots dashed lines and labels to visualize immediate shifts in market structure.
How to Use This Tool
This is an interactive tool that requires user input to define the setup.
Identify a Setup: Locate a clear trend, wedge, or flag pattern on your chart.
Set Pivot Points: Go to the Indicator Settings. Input the exact Start Date and End Date corresponding to the two main touches of your trendline.
Monitor for Breakout: The script will extend the line. Wait for a "BC" label to appear.
Trade Management: Once "BC" prints, the T1, T2, and T3 lines will instantly render. These can be used as potential take-profit zones or areas to tighten stop-losses.
Settings & Configuration
Indicator Settings
Start/End Date: The timestamp Pivot Points for your trendline.
Price Source: Determines what price (High or Low) Pivot Points the line and triggers the breakout.
Pivot Left/Right: Adjusts the sensitivity for finding the "Pivot Before Break" used for target calculations.
Extend Target Line: How far forward the target lines are drawn.
Visual Style
Colors: Fully customizable colors for the Trendline, Breakout Labels, and each Target level (T1, T2, T3).
Gold Bullish Reversal
This analysis dissects a confirmed bullish reversal on Gold using a custom Trend Break system. The setup identifies a transition from a bearish corrective phase to bullish momentum, validated by a structural break and a geometric target projection.
Trend Identification (The Pivot Points) The descending white trendline serves as the primary dynamic resistance, defining the bearish correction.
Pivot Points: The line is drawn connecting two significant swing highs, marked by Label 1 and Label 2.
Logic: These points represent the "lower highs" characteristic of the previous downtrend. As long as price remained below this trajectory, the bearish bias was intact.
The Trigger: Breakout & Confirmation The transition occurs at the candle marked BC (Breakout Candle).
Breakout Criteria: The indicator logic dictates that a signal is only valid when the bar closes above the trendline. This filters out intraday wicks and ensures genuine buyer commitment.
CHOCH Confluence: Immediately following the breakout, a CHOCH (Change of Character) label appears. This signals a shift in market structure, indicating that the internal lower-high/lower-low sequence has been violated, adding probability to the reversal.
Target Projection: The Measured Move The vertical green lines (T1, T2) represent profit objectives derived from the depth of the prior move. The logic calculates the distance between the breakout line and the lowest pivot prior to the break.
T1 (Standard Target): This is a 1:1 projection of the pre-breakout volatility. We see price action initially stalling near this level, confirming it as a zone of interest.
T2 (Golden Ratio Extension): The second target is calculated as the initial distance multiplied by 1.618 (Fibonacci Golden Ratio). The chart shows the price rallying aggressively through T1 to tap the T2 zone, often considered an exhaustion or major take-profit level in harmonic extensions.
Conclusion Gold has successfully invalidated the 4-hour bearish trendline. The confluence of a confirmed close above resistance (BC) and a structural shift (CHOCH) provided a high-probability long setup. The price has now fulfilled the T2 (1.618) extension, suggesting traders should watch for consolidation or a reaction at this key Fibonacci resistance level.
Bearish Trendline Breakdown
The image displays a Bearish Trendline Breakdown on the Gold (XAUUSD) 4-hour chart. The indicator is actually functioning in "Low" mode here (connecting swing lows to form support), which triggers the bearish logic found in the code. Here is the step-by-step breakdown:
The Setup: Pivot Points & Trendline
Visual: The Blue Labels "1" and "2" connected by a white diagonal line.
Code Logic: These are the user-defined start and end points.
Pivot Point 1 (startDate): The starting pivot of the trendline.
Pivot Point 2 (endDate): The ending pivot.
Trendline: The code draws a line between these two points and extends it to the right (extend.right). In this specific image, the line acts as a Support Trendline.
The Trigger: Break Candle (BC)
Visual: The Red Label "BC" appearing just below the white trendline.
Code Logic: This is the execution signal. The code detects a "Down Break" (dnBreak) because the Price Source was likely set to "Low" and the candle's Close was lower than the Trendline Price at that specific bar (close < currLinePrice). This confirms the support level has been breached.
The Projection: Targets (T1 & T2)
Visual: The Green Labels "T1" and "T2" with dotted horizontal lines projected downward.
Code Logic: These are profit targets based on a "Measured Move."
Pivot Calculation: The script looks back for a recent "Pivot High" (the peak before the crash) to calculate the volatility/distance (dist) between that peak and the trendline.
T1 (Conservative): The price is projected downward by 1x that distance (currLinePrice - dist).
T2 (Extended): The price is projected downward by 1.618x that distance (Golden Ratio extension).
Market Context: CHOCH
Visual: The small Red/Orange "CHOCH" labels appearing above the price action.
Code Logic: This is a secondary confirmation system running independently of the trendline. It detects a Change of Character (structural shift). The red labels indicate a "Bearish CHOCH," meaning the price broke below a significant prior swing low (last_swing_low). This supports the bearish bias of the trendline break.
Disclaimer This tool is for educational and technical analysis purposes only. Breakouts can fail (fake-outs), and past geometric patterns do not guarantee future price action. Always manage risk and use this tool in conjunction with other forms of analysis.
Impulse %Impulse % — Liquidation Cascade Detector (BTC · 1H)
Impulse % identifies sharp impulsive price moves and liquidation cascades by measuring how much a candle’s range deviates from its historical average in percent.
How it works
Calculates the candle range (in %) relative to price and compares it to the average over N periods.
When the range exceeds the upper band, an Impulse is detected.
Inside each 1H candle, the indicator checks lower timeframes (1m / 5m) to classify the impulse phases:
PANIC — the first minutes of a violent move (forced liquidations, stop hunts).
CAUTION (Cascade) — continuation and “cleanup” phase with elevated risk.
Determines whether the impulse is against the trend using EMA 50 / EMA 200 — the most dangerous scenario.
Highlights risk zones to protect positions and filter new entries.
What it’s for
Avoid entering during liquidation cascades.
Exit at break-even or partially take profit during risky phases.
Recommended Settings — BTC (1H)
Calculation
Calculation TF: (empty = current)
Average Mode: By N bars
N (bars): 100
Range Type: High–Low
Bands
Upper Band (% of average): 130
Lower Band: Auto (same %)
Cascade (First Minutes)
Enable Cascade Filter: ON
When to trigger safety: Only against trend
PANIC (minutes): 3
CAUTION (minutes after PANIC): 15
Trend (EMA)
Use EMA Trend: ON
Fast EMA: 50
Slow EMA: 200
Lower TF Detection
Lower TF: 1m (or 5m if you prefer smoother signals)
Visualization
Style: Columns
Show Bands: ON
Show Band Lines & Mean: ON
How to read it (BTC · 1H)
Purple (PANIC): first minutes of liquidation — do not enter.
Yellow (CAUTION): cascade phase — high risk, manage/exit.
Normal color: no active cascade — strategy allowed.
Best practice:
1m/5m → real-time cascade detection
1H → decision level
4H → market context
Ultimate Adaptive RSIUltimate Adaptive RSI
RSI That Adapts to Any Market
This isn't your grandpa's RSI. It dynamically adjusts its sensitivity based on market conditions—smoother in trends, responsive in ranges.
Traditional RSI fails in strong trends and changing volatility. UA-RSI fixes both by adapting its sensitivity in real-time, giving you reliable signals whether the market is trending, ranging, or transitioning between regimes.
How It Adapts:
Smart Pre-Smoothing: Uses Efficiency Ratio to detect trend strength and automatically lengthens/shortens its smoothing window.
Dominant Cycle Detection: Matches its internal period to the market's actual rhythm.
Dynamic Bands: RMS-based overbought/oversold levels that expand/contract with volatility.
Smoothing Stack: ALMA pre-smoothing → Ultimate Smoother → Jurik filter creates the cleanest RSI you've ever seen.
Trade Signals:
Buy: RSI crosses above lower band or midline + price confirms
Sell: RSI crosses below upper band or midline + price confirms
Bands expand in high volatility → wait for deeper extremes
Bands contract in low volatility → take earlier signals
Signal line for crossover entries
Adaptive smoothing = fewer false signals in trends
Day trading: Use 1.0 band multiplier
Swing trading: Use 1.2-1.5 multiplier
Ranging markets: Lower multiplier to 0.8
Trending markets: Raise multiplier to 1.5+
Bands widen in volatility = wait for deeper extremes
Bands tighten in calm markets = take earlier signals
Never trade RSI alone - always wait for price confirmation
Golden Volume Lines📌 Golden Volume — Lines (Golden Team)
Golden Volume — Lines is an advanced volume-based indicator that detects Ultra High Volume candles using a statistical percentile model, then automatically draws and tracks key price levels derived from those candles.
The indicator highlights where real market interest and liquidity appear and shows how price reacts when those levels are broken.
🔍 How It Works
Volume Measurement
Choose between:
Units (raw volume)
Money (Volume × Average Price)
Average price can be calculated using HL2 or OHLC4.
Percentile-Based Classification
Volume is classified into:
Medium
High
Ultra High Volume
Thresholds are calculated using a rolling percentile window.
Ultra Volume candles are colored orange.
Dynamic High & Low Levels
For every Ultra Volume candle:
A High and Low dotted line is drawn.
Lines extend to the right until price breaks them.
Smart Line Break Detection (Wick-Based)
A line is considered broken when price wicks through it.
When a break occurs:
🟧 Orange line → broken by an Ultra Volume candle
⚪ White line → broken by a normal candle
The line stops exactly at the breaking candle.
🔔 Alerts
Alert on Ultra High Volume candles
Alert when a High or Low line is broken
Separate alerts for:
Break by Ultra Volume candle
Break by Normal candle
🎯 Use Cases
Breakout & continuation confirmation
Liquidity sweep detection
Volume-validated support & resistance
Market reaction after extreme participation
⚙️ Key Inputs
Volume display mode (Units / Money)
Percentile thresholds
Lookback window size
Maximum number of active Ultra levels
Optional dynamic alerts
⚠️ Disclaimer
This indicator is a volume and market structure tool, not a standalone trading system.
Always use proper risk management and additional confirmation.
AMT Structure: 80% Traverse, PD Levels & nPOCsHere is a clean, professional description formatted for the TradingView description box. It highlights the methodology (AMT/80% Rule), the specific features, and the credits.
Title: AMT Structure: 80% Traverse, PD Levels & nPOCs
Description:
This indicator is a comprehensive toolkit designed for futures traders utilizing Auction Market Theory (AMT) and Volume Profile strategies. It consolidates multiple scripts into a single, unified overlay to declutter your chart while providing essential structural references for the 80% Traverse setup, intraday context, and longer-term auction targets.
Key Features:
1. 80% Rule / Traverse Setup (Chart Champions Logic)
Automated RTH Open Detection: Hardcoded to the 08:30 AM CT Open to ensure accuracy for US Futures (ES/NQ) regardless of your chart's timezone settings.
Value Area Logic: Automatically calculates the Previous Day's Value Area High (VAH), Value Area Low (VAL), and Point of Control (POC).
Setup Detection: If the market opens outside of the previous day's value, the script highlights the Value Area in color (default: Purple), signaling that an 80% traverse (filling the value area) is structurally possible if price re-enters value.
Background Fill: Optional shading between VAH and VAL to clearly visualize the "playing field" for the traverse.
2. Auction Market Theory (AMT) Premarket Levels
Overnight High/Low: Automatically captures the highest and lowest prices traded during the overnight session (17:00 - 08:30 CT).
Breakout Alerts: Includes logic to detect and alert when these overnight levels are broken during the RTH session.
Auto-Cleanup: Lines can be set to auto-delete after a specified time (default: 60 mins into the session) to keep the chart clean after the Initial Balance (IB) period.
3. Structural Reference Levels
Previous Day Levels: Plots Previous Day High, Low, and Equilibrium (Midpoint) as standard reference lines.
Initial Balance (IB): Option to display the First Hour High and Low (08:30 - 09:30 CT) to assess day type (Neutral, Trend, Normal Variation, etc.).
RTH VWAP: An anchored VWAP that resets specifically at the RTH Open (08:30 CT), distinct from the standard 24-hour VWAP.
4. Naked Points of Control (nPOCs)
Multi-Timeframe Tracking: Tracks and plots Naked POCs for Daily, Weekly, and Monthly profiles.
Auto-Cleanup: Lines automatically delete themselves the moment price touches them, ensuring you only see untested levels.
Customization: Toggle each timeframe on/off individually.
Settings & Customization:
Global Offset: Move all text labels to the right with a single setting to prevent price action from obscuring text.
8:30 Open Offset: Independent offset for the Open label to distinguish it from other opening references.
Smart Coloring: Text labels automatically match their corresponding line colors for easy identification.
Modular Toggles: Every section (AMT, VWAP, PD Levels, CCV, nPOCs) can be turned on or off individually to suit your specific trading plan.
Usage: This tool is specifically tuned for ES and NQ futures trading but can be adapted for other instruments. It replaces the need for separate indicators for Overnight Highs/Lows, Previous Day Levels, and Volume Profile targeting.
PEAD ScreenerPEAD Screener - Post-Earnings Announcement Drift Scanner
═══════════════════════════════════════════════════════════════
WHY EARNINGS ANNOUNCEMENTS CREATE OPPORTUNITY
═══════════════════════════════════════════════════════════════
The days immediately following an earnings announcement are among the noisiest periods for any stock. Within hours, the market must digest new information about a company's profits, revenue, and future outlook. Analysts scramble to update their models. Institutions rebalance positions. Retail traders react to headlines.
This chaos creates a well-documented phenomenon called Post-Earnings Announcement Drift (PEAD): stocks that beat expectations tend to keep rising, while those that miss tend to keep falling - often for weeks after the initial announcement. Academic research has confirmed this pattern persists across decades and markets.
But not every earnings surprise is equal. A company that beats estimates by 5 cents might move very differently than one that beats by 5 cents with unusually high volume, or one where both earnings AND revenue exceeded expectations. Raw numbers alone don't tell the full story.
═══════════════════════════════════════════════════════════════
HOW "STANDARDIZED UNEXPECTED" METRICS CUT THROUGH THE NOISE
═══════════════════════════════════════════════════════════════
This screener uses a statistical technique to measure how "surprising" a result truly is - not just whether it beat or missed, but how unusual that beat or miss was compared to the company's own history.
The core idea: convert raw surprises into Z-scores.
A Z-score answers the question: "How many standard deviations away from normal is this result?"
- A Z-score of 0 means the result was exactly average
- A Z-score of +2 means the result was unusually high (better than ~95% of historical results)
- A Z-score of -2 means the result was unusually low
By standardizing surprises this way, we can compare apples to apples. A small-cap biotech's $0.02 beat might actually be more significant than a mega-cap's $0.50 beat, once we account for each company's typical variability.
This screener applies this standardization to three dimensions: earnings (SUE), revenue (SURGE), and volume (SUV).
═══════════════════════════════════════════════════════════════
THE 9 SCREENING CRITERIA
═══════════════════════════════════════════════════════════════
─────────────────────────────────────────
1. SUE (Standardized Unexpected Earnings)
─────────────────────────────────────────
WHAT IT IS:
SUE measures how surprising an earnings result was, adjusted for the company's historical forecast accuracy.
Calculation: Take the earnings surprise (actual EPS minus analyst estimate), then divide by the standard deviation of past forecast errors. This uses a rolling window of the last 8 quarters by default.
Formula: SUE = (Actual EPS - Estimated EPS) / Standard Deviation of Past Errors
HOW TO INTERPRET:
- SUE > +2.0: Strongly positive surprise - earnings beat expectations by an unusually large margin. These stocks often continue drifting higher.
- SUE between 0 and +2.0: Modest positive surprise - beat expectations, but within normal range.
- SUE between -2.0 and 0: Modest negative surprise - missed expectations, but within normal range.
- SUE < -2.0: Strongly negative surprise - significant miss. These stocks often continue drifting lower.
For long positions, look for SUE values above +2.0, ideally combined with positive SURGE.
─────────────────────────────────────────
2. SURGE (Standardized Unexpected Revenue)
─────────────────────────────────────────
WHAT IT IS:
SURGE applies the same standardization technique to revenue surprises. While earnings can be manipulated through accounting choices, revenue is harder to fake - it represents actual sales.
Calculation: Take the revenue surprise (actual revenue minus analyst estimate), then divide by the standard deviation of past revenue forecast errors.
Formula: SURGE = (Actual Revenue - Estimated Revenue) / Standard Deviation of Past Errors
HOW TO INTERPRET:
- SURGE > +1.5: Strongly positive revenue surprise - the company sold significantly more than expected.
- SURGE between 0 and +1.5: Modest positive surprise.
- SURGE < 0: Revenue missed expectations.
The most powerful signals occur when BOTH SUE and SURGE are positive and elevated (ideally SUE > 2.0 AND SURGE > 1.5). This indicates the company beat on both profitability AND top-line growth - a much stronger signal than either alone.
When SUE and SURGE diverge significantly (e.g., high SUE but negative SURGE), treat with caution - the earnings beat may have come from cost-cutting rather than genuine growth.
─────────────────────────────────────────
3. SUV (Standardized Unexpected Volume)
─────────────────────────────────────────
WHAT IT IS:
SUV detects unusual trading volume after accounting for how volatile the stock is. More volatile stocks naturally have higher volume, so raw volume comparisons can be misleading.
Calculation: This uses regression analysis to model the expected relationship between price volatility and volume. The "unexpected" volume is the residual - how much actual volume deviated from what the model predicted. This residual is then standardized into a Z-score.
In plain terms: SUV asks "Given how much this stock typically moves, is today's volume unusually high or low?"
HOW TO INTERPRET:
- SUV > +2.0: Exceptionally high volume relative to the stock's volatility. This often signals institutional activity - big players moving in or out.
- SUV between +1.0 and +2.0: Elevated volume - above normal interest.
- SUV between -1.0 and +1.0: Normal volume range.
- SUV < -1.0: Unusually quiet - less activity than expected.
High SUV combined with positive price movement suggests accumulation (buying). High SUV combined with negative price movement suggests distribution (selling).
─────────────────────────────────────────
4. % From D0 Close
─────────────────────────────────────────
WHAT IT IS:
This measures how far the current price has moved from the closing price on its initial earnings reaction day (D0). The "reaction day" is the first trading day that fully reflects the earnings news - typically the day after an after-hours announcement, or the announcement day itself for pre-market releases.
Calculation: ((Current Price - D0 Close) / D0 Close) × 100
HOW TO INTERPRET:
- Positive values: Stock has gained ground since earnings. The higher the percentage, the stronger the post-earnings drift.
- 0% to +5%: Modest positive drift - earnings were received well but momentum is limited.
- +5% to +15%: Strong drift - buyers continue accumulating.
- > +15%: Exceptional drift - significant institutional interest likely.
- Negative values: Stock has given back gains or extended losses since earnings. May indicate the initial reaction was overdone, or that sentiment is deteriorating.
This metric is most meaningful within the first 5-20 trading days after earnings. Extended drift (maintaining gains over 2+ weeks) is a stronger signal than a quick spike that fades.
─────────────────────────────────────────
5. # Pocket Pivots
─────────────────────────────────────────
WHAT IT IS:
Pocket Pivots are a volume-based pattern developed by Chris Kacher and Gil Morales. They identify days where institutional buyers are likely accumulating shares without causing obvious breakouts.
Calculation: A Pocket Pivot occurs when:
- The stock closes higher than it opened (up day)
- The stock closes higher than the previous day's close
- Today's volume exceeds the highest down-day volume of the prior 10 trading sessions
The screener counts how many Pocket Pivots have occurred since the earnings announcement.
HOW TO INTERPRET:
- 0 Pocket Pivots: No detected institutional accumulation patterns since earnings.
- 1-2 Pocket Pivots: Some institutional buying interest - worth monitoring.
- 3+ Pocket Pivots: Strong accumulation signal - institutions appear to be building positions.
Pocket Pivots are most significant when they occur:
- Immediately following earnings announcements
- Near moving average support (10-day, 21-day, or 50-day)
- On above-average volume
- After a period of price consolidation
Multiple Pocket Pivots in a short period suggest sustained institutional demand, not just a one-day event.
─────────────────────────────────────────
6. ADX/DI (Trend Strength and Direction)
─────────────────────────────────────────
WHAT IT IS:
ADX (Average Directional Index) measures trend strength regardless of direction. DI (Directional Indicator) shows whether the trend is bullish or bearish.
Calculation: ADX uses a 14-period lookback to measure how directional (trending) price movement is. Values range from 0 to 100. The +DI and -DI components compare upward and downward movement.
The screener shows:
- ADX value (trend strength)
- Direction indicator: "+" for bullish (price trending up), "-" for bearish (price trending down)
HOW TO INTERPRET:
- ADX < 20: Weak trend - the stock is moving sideways, choppy. Not ideal for momentum trading.
- ADX 20-25: Trend is emerging - potentially starting a directional move.
- ADX 25-40: Strong trend - clear directional movement. Good for momentum plays.
- ADX > 40: Very strong trend - powerful move in progress, but may be extended.
The direction indicator (+/-) tells you which way:
- "25+" means ADX of 25 with bullish direction (uptrend)
- "25-" means ADX of 25 with bearish direction (downtrend)
For post-earnings plays, ideal setups show ADX rising above 25 with positive direction, confirming the earnings reaction is developing into a sustained trend rather than a one-day spike.
─────────────────────────────────────────
7. Institutional Buying PASS
─────────────────────────────────────────
WHAT IT IS:
This proprietary composite indicator detects patterns consistent with institutional accumulation at three stages after earnings:
EARLY (Days 0-4): Looks for "large block" buying on the earnings reaction day (exceptionally high volume with a close in the upper half of the day's range) combined with follow-through buying on the next day.
MID (Days 5-9): Checks for sustained elevated volume (averaging 1.5x the 20-day average) combined with positive drift and consistent upward price movement (more up days than down days).
LATE (Days 10+): Detects either visible accumulation (positive drift with high volume) OR stealth accumulation (positive drift with unusually LOW volume - suggesting smart money is quietly building positions without attracting attention).
HOW TO INTERPRET:
- Check mark/value of '1': Institutional buying pattern detected. The stock shows characteristics consistent with large players accumulating shares.
- X mark/value of '0': No institutional buying pattern detected. This doesn't mean institutions aren't buying - just that the typical footprints aren't visible.
A passing grade here adds conviction to other bullish signals. Institutions have research teams, information advantages, and long time horizons. When their footprints appear in the data, it often precedes sustained moves.
Important: This is a pattern detection tool, not a guarantee. Always combine with other analysis.
─────────────────────────────────────────
8. Strong ATR Drift PASS
─────────────────────────────────────────
WHAT IT IS:
This measures whether the stock has drifted significantly relative to its own volatility. Instead of asking "did it move 10%?", it asks "did it move more than 1.5 ATRs?"
ATR (Average True Range) measures a stock's typical daily movement. A volatile stock might move 5% daily, while a stable stock might move 0.5%. Using ATR normalizes for this difference.
Calculation:
ATR Drift = (Current Close - D0 Close) / D0 ATR in dollars
The indicator passes when ATR Drift exceeds 1.5 AND at least 5 days have passed since earnings.
HOW TO INTERPRET:
- Check mark/value of '1': The stock has drifted more than 1.5 times its average daily range since earnings - a statistically significant move that suggests genuine momentum, not just noise.
- X mark/value of '0': The drift (if any) is within normal volatility bounds - could just be random fluctuation.
Why wait 5 days? The immediate post-earnings reaction (days 0-2) often includes gap fills and noise. By day 5, if the stock is still extended beyond 1.5 ATRs from the earnings close, it suggests real buying pressure, not just a reflexive gap.
A passing grade here helps filter out stocks that "beat earnings" but haven't actually moved meaningfully. It focuses attention on stocks where the market is voting with real capital.
─────────────────────────────────────────
9. Days Since D0
─────────────────────────────────────────
WHAT IT IS:
Simply counts the number of trading days since the earnings reaction day (D0).
HOW TO INTERPRET:
- Days 0-5 (Green): Fresh earnings - the information is new, institutional repositioning is active, and momentum trades are most potent. This is the "sweet spot" for PEAD strategies.
- Days 6-10 (Neutral): Mid-period - some edge remains but diminishing. Good for adding to winning positions, less ideal for new entries.
- Days 11+ (Red): Extended period - most of the post-earnings drift has typically played out. Higher risk that momentum fades or reverses.
Research shows PEAD effects are strongest in the first 5-10 days after earnings, then decay. Beyond 20-30 days, the informational advantage of the earnings surprise is largely priced in.
Use this to prioritize: focus on stocks with strong signals that are still in the early window, and be more selective about entries as days accumulate.
═══════════════════════════════════════════════════════════════
PUTTING IT ALL TOGETHER
═══════════════════════════════════════════════════════════════
You can use this screener in the chart view or in the Screener.
One combination of the above filters to develop a shortlist of positive drift candidates may be:
- SUE > 2.0 (significant earnings beat)
- SURGE > 1.5 (significant revenue beat)
- Positive % From D0 Close (price confirming the good news)
- Institutional Buying PASS (big players accumulating)
- Strong ATR Drift PASS (statistically significant movement)
- Days Since D0 < 10 (still in the active drift window)
No single indicator is sufficient. The power comes from convergence - when multiple independent measures all point the same direction.
═══════════════════════════════════════════════════════════════
SETTINGS
═══════════════════════════════════════════════════════════════
Key adjustable parameters:
- SUE Method: "Analyst-based" uses consensus estimates; "Time-series" uses year-over-year comparison
- Window Size: Number of quarters used for standardization (default: 8)
- ATR Drift Threshold: Minimum ATR multiple for "strong" classification (default: 1.5)
- Institutional Buying thresholds: Adjustable volume and CLV parameters
═══════════════════════════════════════════════════════════════
DISCLAIMER
═══════════════════════════════════════════════════════════════
This screener is a research tool, not financial advice. Past patterns do not guarantee future results. Always conduct your own due diligence and manage risk appropriately. Post-earnings trading involves significant uncertainty and volatility. The 'SUE' in this indicator does not represent a real person; any similarity to actual Sue's (or Susans for that matter) living or dead is quite frankly ridiculous, not to mention coincidental.
Pair Creation🙏🏻 The one and only pair construction tech you need, unlike others:
Applies one consistent operation to all the data features (not only prices). Then, the script outputs these, so you can apply other calculations on these outputs.
calculates a very fast and native volatility based hedge ratio, that also takes into account point value (think SPY vs ES) so you can easily use it in position sizing
Has built-in forward pricing aka cost of carry model , so you can de-drift pairs from cost of carry, discover spot price of oil based on futures, and ofc find arbitrage opportunities
Also allows to make a pair as a product of 2 series, useful for triangular arbitrage
This script can make a pair in 2 ways:
Ratio, by dividing leg 1 by leg 2
Product, by multiplying leg 1 by leg 2
The real mathematically right way to construct a pair is a ratio/product (Spreads are in fact = 2 legged portfolio, but I ain't told ya that ok). Why? Because a pair of 2 entities has a mathematically unique beauty, it allows direct comparisons and relationship analysis, smth you can't do directly with 3 and more components.
Multiplication (think inversions like (EURUSD -> USDEUR), and use cases for triangular arbitrage) is useful sometimes too.
...
Quickguide:
First, "Legs" are pair components: make a pair of related assets. Don’t be guided exclusively by clustering, cointegrations, mutual information etc. Common sense and exogenous info can easily made them all Forward pricing model: is useful when u work with spot vs futures pairs. Otherwise: put financing, storage and yield all on zeros, this way u will turn it off and have a pure ratio/product of 2 legs.
Look at the 2 numbers on the script’s status line: the first one would always be 1), and the second one is a variable.
First number (always 1) is multiplier for your position size on leg 1
The second number is the multiplier for your position size on leg 2 in the opposite direction.
If both legs are related, trading your sizes with these multipliers makes you do statistical arbitrage -> trading ~ volatility in risk free mode, while the relationship between the assets is still in place.
Also guys srsly, nobody ‘ever’ made a universal law that somewhy somehow for whatever secret conspiracy reason one shall only trade pairs in mean reverting style xd. You can do whatever you want:
Tilt hedge ratio significantly based on relative strength of legs
Trade the pair in momentum style
Ignore hedge ratio all together
And more and more, the limit is your imagination, e.g.:
Anticipate hedge ratio changes based on exogenous info and act accordingly
Scalp a pair just like any other asset
Make a pair out of 2 pairs
Like I mean it, whatever you desire
About forward pricing model:
It’s applied only to leg 2;
Direct: takes spot price and finds out implied futures price
Inverse: takes futures price and finds out implied spot price (try on oil)
Pls read online how to choose parameters, it’s open access reliable info
About the hedge ratio I use:
You prolly noticed the way I prefer to use inferred volumes vs the “real” ones. In pairs it’s especially meaningful, because real volumes lose sense in pair creation. And while volumes are closely tied to volatility, the inferred volumes ‘Are’ volatility irl (and later can be converted to currency space by using point value, allowing direct comparisons symbol vs symbol).
This hedge ratio is a good example of how discovering the real nature of entities beats making 100s of inventions, why domain knowledge and proper feature engineering beats difficult bulky models, neural networks etc. How simple data understanding & operations on it is all you need.
This script simply does this:
Takes inferred volume delta of both assets, makes a ratio, normalizes it by tick sizes and points values of both legs, calculates a typical value of this series.
That’s it, no step 2, we’re done. No Kalman filters, no TLS regression, no vine copulas, or whatever new fancy keywords you can come up with etc.
...
^^ comparing real ES prices vs theoretical ones by forward-pricing model. Financing: 0.04, yield 0.0175
^^ EURUSD, 6E futures with theoretical futures price calculated with interest rate differential 0.02 (4% USD - 2% EUR interest rates)
^^4 different pairs (RTY/ES, YM/ES, NQ/ES, ES/ZN) each with different plot style (pick one you like in script's Style settings)
^^ YM/RTY pair, each plot represents ratio of different features: ratio of prices, ratio of inferred volume deltas, ratio of inferred volumes, ratio of inferred tick counts (also can be turned on/off in Style settings)
...
How can u upgrade it and make a step forward yourself:
On tradingview missing values are automatically fixed by backfilling, and this never becomes a thing until you hit high frequency data. You can do better and use Kalman filter for filling missing values.
Script contains the functions I use everywhere to calculate inferred volume delta, inferred volume, and inferred tick count.
...
∞
ATR Trailing StopATR Trailing Stop (Dynamic Volatility Regimes)
==============================================
This indicator implements an adaptive ATR-based trailing stop for long positions. The stop automatically adjusts based on stock volatility, tightening during fast movements and widening during calm periods. It is designed as a trade management tool to help protect profits while staying aligned with strong trends.
How It Works
------------
* Tracks the highest high over a configurable lookback window and ensures this “top” never moves downward.
* Computes the trailing stop as:**Top – ATR × Dynamic Multiplier**
* The ATR multiplier changes depending on volatility:
* Low volatility → Wide stop (slower trailing)
* Medium volatility → Standard trailing
* High volatility → Tight stop (faster trailing)
* The trailing stop only moves upward; it never decreases.
* If price falls significantly below the stop (default: 5%), the system resets and begins trailing from a new top.
* An optional price-scale label displays:
* Current stop value
* Volatility regime (LOW / MID / HIGH)
* ATR percentage and active multiplier
Alerts
------
Two alert conditions are included:
### Trailing Stop – Near
Triggers when price moves within a user-defined percentage above the stop.
### Trailing Stop – Hit
Triggers when price touches or closes below the stop.
How to Use
----------
1. Add the indicator to any chart (daily timeframe recommended).
2. Configure:
* ATR length
* Lookback bars
* Volatility thresholds
* ATR multipliers
3. Set alerts for early warnings or stop-hit events.
4. Use the stop line as a dynamic risk-management tool to guide exit decisions and protect profits.
Notes
-----
* Designed for long-only trailing logic.
* This indicator does not generate entry signals; it is intended for stop management.
EMA COLOR BUY SELL
indicator("EMA Tabanlı Renkli İndikatör", overlay=true)
emaLength = input.int(21, "EMA Periyodu")
fastEMA = ta.ema(close, emaLength)
slowEMA = ta.ema(close, emaLength * 2)
trendUp = fastEMA > slowEMA
trendDown = fastEMA < slowEMA
barcolor(trendUp ? color.new(color.green, 0) : trendDown ? color.new(color.red, 0) : color.gray)
plot(fastEMA, color=trendUp ? color.green : color.red, title="Fast EMA", linewidth=2)
plot(slowEMA, color=color.blue, title="Slow EMA", linewidth=2)
ZLSMA//@version=5
indicator("T3 Al-Sat Sinyalli", overlay=true, shorttitle="T3 Signal")
// Kullanıcı ayarları
length = input.int(14, minval=1, title="Periyot")
vFactor = input.float(0.7, minval=0.0, maxval=1.0, title="Volatility Factor (0-1)")
// EMA hesaplamaları
ema1 = ta.ema(close, length)
ema2 = ta.ema(ema1, length)
ema3 = ta.ema(ema2, length)
// T3 hesaplaması
c1 = -vFactor * vFactor * vFactor
c2 = 3 * vFactor * vFactor + 3 * vFactor * vFactor * vFactor
c3 = -6 * vFactor * vFactor - 3 * vFactor - 3 * vFactor * vFactor * vFactor
c4 = 1 + 3 * vFactor + vFactor * vFactor * vFactor + 3 * vFactor * vFactor
t3 = c1 * ema3 + c2 * ema2 + c3 * ema1 + c4 * close
// T3 çizimi
plot(t3, color=color.new(color.blue, 0), linewidth=2, title="T3")
// Mum renkleri
barcolor(close > t3 ? color.new(color.green, 0) : color.new(color.red, 0))
// Al-Sat sinyalleri
buySignal = ta.crossover(close, t3)
sellSignal = ta.crossunder(close, t3)
// Okları çiz
plotshape(buySignal, title="Al", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(sellSignal, title="Sat", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
AlgoZ Smart Divergence [Trend Filtered]AlgoZ Smart Divergence is a precision entry tool designed to catch market reversals by analyzing Volume Divergence combined with Multi-Timeframe Trend Filtering. Unlike standard divergence indicators that signal on every minor price fluctuation, this script uses a strict set of filters to only present high-probability trade setups that align with the broader market trend.
This is the Free Edition of the AlgoZ Suite, focused on providing clean, non-repainting Buy and Sell signals based on institutional volume flow.
How It Works The script operates on a 3-step validation process:
Volume Divergence:
It detects anomalies where volume spikes relative to price action (e.g., Price makes a Lower Low, but Volume hits a Higher High).
HTF Trend Painting:
It analyzes a Higher Timeframe (Default: 3 Hours) to determine the macro trend. If the 3H trend is Bullish, the candles turn Green. If Bearish, they turn Red.
Color Match Filtering:
The script includes a smart filter that blocks signals that go against the trend. You will only see BUY signals when the candles are Green (Uptrend) and SELL signals when the candles are Red (Downtrend).
Key Features
Volume Divergence Engine:
Identifies hidden accumulation and distribution zones.
HTF Trend Coloring:
Automatically paints your chart based on Higher Timeframe breakouts (Default: 3-Hour Trend).
Smart Signal Filtering:
Toggles are available to "Only Show Signals Matching Candle Color," ensuring you never trade against the momentum.
EMA Trend Filter:
Includes a built-in 10-period EMA filter to further refine entries.
Volatility Filters:
Optional RSI and ADX filters are included to avoid trading during low-volatility "chop."
How to Use
For Longs (Buys):
Wait for the candles to turn Green (indicating the 3-Hour trend is up) and look for a BUY label. The price must also be above the 10 EMA (if enabled).
For Shorts (Sells):
Wait for the candles to turn Red (indicating the 3-Hour trend is down) and look for a SELL label.
Risk Management:
This script is designed to catch reversals. Always place your Stop Loss below the recent swing low (for buys) or above the swing high (for sells).
Settings
Higher Timeframe:
Default is set to 3 Hours (180 minutes). You can adjust this to 1 Day or 4 Hours depending on your trading style.
EMA Length:
Default is 10.
Color Match Filter:
On by default.
T3 MA Basit ve Stabil//@version=5
indicator("T3 MA Basit ve Stabil", overlay=true)
length = input.int(14, "T3 Length")
vFactor = input.float(0.7, "vFactor")
lineWidth = input.int(3, "Çizgi Kalınlığı")
ema1 = ta.ema(close, length)
ema2 = ta.ema(ema1, length)
ema3 = ta.ema(ema2, length)
ema4 = ta.ema(ema3, length)
ema5 = ta.ema(ema4, length)
ema6 = ta.ema(ema5, length)
c1 = -vFactor * vFactor * vFactor
c2 = 3 * vFactor * vFactor + 3 * vFactor * vFactor * vFactor
c3 = -6 * vFactor * vFactor - 3 * vFactor - 3 * vFactor * vFactor * vFactor
c4 = 1 + 3 * vFactor + vFactor * vFactor * vFactor + 3 * vFactor * vFactor
t3 = c1*ema6 + c2*ema5 + c3*ema4 + c4*ema3
colorUp = color.green
colorDown = color.red
col = t3 > t3 ? colorUp : colorDown
plot(t3, color=col, linewidth=lineWidth)
barcolor(col)
plotshape(t3 > t3 and t3 <= t3 , location=location.belowbar, color=colorUp, style=shape.triangleup, size=size.small)
plotshape(t3 < t3 and t3 >= t3 , location=location.abovebar, color=colorDown, style=shape.triangledown, size=size.small)
Neosha Concept V4 (NY Time)
Imagine the financial market as a huge ocean. Millions of traders throw orders into it every second. But beneath all the noise, there is a powerful current that quietly controls where the waves move. That current is not a person, not a trader, and not random—it is an algorithm.
This algorithm is called the Interbank Price Delivery Algorithm (IPDA).
Think of it as the “navigation system” that guides price through the market.
IPDA has one job:
to move prices in a way that keeps the market efficient and liquid.
To do this, it constantly looks for two things:
1. Where liquidity is hiding
Liquidity is usually found above highs and below lows—where traders place stop losses. The algorithm moves price there first to collect that liquidity.
2. Where price became unbalanced
Sometimes price moves too fast and creates gaps or imbalances. IPDA returns to those areas later to “fix” the missing orders.
Once you start looking at the charts with this idea in mind, everything makes more sense:
Why price suddenly spikes above a high and crashes down
Why big moves leave gaps that price later fills
Why the market reverses right after taking stops
Why trends begin only after certain levels are hit
These are not accidents.
They are the algorithm doing its job.
Price moves in a repeating cycle:
Gather liquidity
Make a strong move (displacement)
Return to fix inefficiency
Deliver to the next target
Most beginners only see the candles.
But once you understand IPDA, you see the intention behind the candles.
Instead of guessing where price might go, you begin to understand why it moves there.
And once you understand the “why,” your trading becomes clearer, calmer, and far more accurate.
Density Zones (GM Crossing Clusters) + QHO Spin FlipsINDICATOR NAME
Density Zones (GM Crossing Clusters) + QHO Spin Flips
OVERVIEW
This indicator combines two complementary ideas into a single overlay: *this combines my earlier Geometric Mean Indicator with the Quantum Harmonic Oscillator (Overlay) with additional enhancements*
1) Density Zones (GM Crossing Clusters)
A “Density Zone” is detected when price repeatedly crosses a Geometric Mean equilibrium line (GM) within a rolling lookback window. Conceptually, this identifies regions where the market is repeatedly “snapping” across an equilibrium boundary—high churn, high decision pressure, and repeated re-selection of direction.
2) QHO Spin Flips (Regression-Residual σ Breaches)
A “Spin Flip” is detected when price deviates beyond a configurable σ-threshold (κ) from a regression-based equilibrium, using normalized residuals. Conceptually, this marks excursions into extreme states (decoherence / expansion), which often precede a reversion toward equilibrium and/or a regime re-scaling.
These two systems are related but not identical:
- Density Zones identify where equilibrium crossings cluster (a “singularity”/anchor behavior around GM).
- Spin Flips identify when price exceeds statistically extreme displacement from the regression equilibrium (LSR), indicating expansion beyond typical variance.
CORE CONCEPTS AND FORMULAS
SECTION A — GEOMETRIC MEAN EQUILIBRIUM (GM)
We define two moving averages:
(1) MA1_t = SMA(close_t, L1)
(2) MA2_t = SMA(close_t, L2)
We define the equilibrium anchor as the geometric mean of MA1 and MA2:
(3) GM_t = sqrt( MA1_t * MA2_t )
This GM line acts as an equilibrium boundary. Repeated crossings are interpreted as high “equilibrium churn.”
SECTION B — CROSS EVENTS (UP/DOWN)
A “cross event” is registered when the sign of (close - GM) changes:
Define a sign function s_t:
(4) s_t =
+1 if close_t > GM_t
-1 if close_t < GM_t
s_{t-1} if close_t == GM_t (tie-breaker to avoid false flips)
Then define the crossing event indicator:
(5) crossEvent_t = 1 if s_t != s_{t-1}
0 otherwise
Additionally, the indicator plots explicit cross markers:
- Cross Above GM: crossover(close, GM)
- Cross Below GM: crossunder(close, GM)
These provide directional visual cues and match the original Geometric Mean Indicator behavior.
SECTION C — DENSITY MEASURE (CROSSING CLUSTER COUNT)
A Density Zone is based on the number of cross events occurring in the last W bars:
(6) D_t = Σ_{i=0..W-1} crossEvent_{t-i}
This is a “crossing density” score: how many times price has toggled across GM recently.
The script implements this efficiently using a cumulative sum identity:
Let x_t = crossEvent_t.
(7) cumX_t = Σ_{j=0..t} x_j
Then:
(8) D_t = cumX_t - cumX_{t-W} (for t >= W)
cumX_t (for t < W)
SECTION D — DENSITY ZONE TRIGGER
We define a Density Zone state:
(9) isDZ_t = ( D_t >= θ )
where:
- θ (theta) is the user-selected crossing threshold.
Zone edges:
(10) dzStart_t = isDZ_t AND NOT isDZ_{t-1}
(11) dzEnd_t = NOT isDZ_t AND isDZ_{t-1}
SECTION E — DENSITY ZONE BOUNDS
While inside a Density Zone, we track the running high/low to display zone bounds:
(12) dzHi_t = max(dzHi_{t-1}, high_t) if isDZ_t
(13) dzLo_t = min(dzLo_{t-1}, low_t) if isDZ_t
On dzStart:
(14) dzHi_t := high_t
(15) dzLo_t := low_t
Outside zones, bounds are reset to NA.
These bounds visually bracket the “singularity span” (the churn envelope) during each density episode.
SECTION F — QHO EQUILIBRIUM (REGRESSION CENTERLINE)
Define the regression equilibrium (LSR):
(16) m_t = linreg(close_t, L, 0)
This is the “centerline” the QHO system uses as equilibrium.
SECTION G — RESIDUAL AND σ (FIELD WIDTH)
Residual:
(17) r_t = close_t - m_t
Rolling standard deviation of residuals:
(18) σ_t = stdev(r_t, L)
This σ_t is the local volatility/width of the residual field around the regression equilibrium.
SECTION H — NORMALIZED DISPLACEMENT AND SPIN FLIP
Define the standardized displacement:
(19) Y_t = (close_t - m_t) / σ_t
(If σ_t = 0, the script safely treats Y_t = 0.)
Spin Flip trigger uses a user threshold κ:
(20) spinFlip_t = ( |Y_t| > κ )
Directional spin flips:
(21) spinUp_t = ( Y_t > +κ )
(22) spinDn_t = ( Y_t < -κ )
The default κ=3.0 corresponds to “3σ excursions,” which are statistically extreme under a normal residual assumption (even though real markets are not perfectly normal).
SECTION I — QHO BANDS (OPTIONAL VISUALIZATION)
The indicator optionally draws the standard σ-bands around the regression equilibrium:
(23) 1σ bands: m_t ± 1·σ_t
(24) 2σ bands: m_t ± 2·σ_t
(25) 3σ bands: m_t ± 3·σ_t
These provide immediate context for the Spin Flip events.
WHAT YOU SEE ON THE CHART
1) MA1 / MA2 / GM lines (optional)
- MA1 (blue), MA2 (red), GM (green).
- GM is the equilibrium anchor for Density Zones and cross markers.
2) GM Cross Markers (optional)
- “GM↑” label markers appear on bars where close crosses above GM.
- “GM↓” label markers appear on bars where close crosses below GM.
3) Density Zone Shading (optional)
- Background shading appears while isDZ_t = true.
- This is the period where the crossing density D_t is above θ.
4) Density Zone High/Low Bounds (optional)
- Two lines (dzHi / dzLo) are drawn only while in-zone.
- These bounds bracket the full churn envelope during the density episode.
5) QHO Bands (optional)
- 1σ, 2σ, 3σ shaded zones around regression equilibrium.
- These visualize the current variance field.
6) Regression Equilibrium (LSR Centerline)
- The white centerline is the regression equilibrium m_t.
7) Spin Flip Markers
- A circle is plotted when |Y_t| > κ (beyond your chosen σ-threshold).
- Marker size is user-controlled (tiny → huge).
HOW TO USE IT
Step 1 — Pick the equilibrium anchor (GM)
- L1 and L2 define MA1 and MA2.
- GM = sqrt(MA1 * MA2) becomes your equilibrium boundary.
Typical choices:
- Faster equilibrium: L1=20, L2=50 (default-like).
- Slower equilibrium: L1=50, L2=200 (macro anchor).
Interpretation:
- GM acts like a “center of mass” between two moving averages.
- Crosses show when price flips from one side of equilibrium to the other.
Step 2 — Tune Density Zones (W and θ)
- W controls the time window measured (how far back you count crossings).
- θ controls how many crossings qualify as a “density/singularity episode.”
Guideline:
- Larger W = slower, broader density detection.
- Higher θ = only the most intense churn is labeled as a Density Zone.
Interpretation:
- A Density Zone is not “bullish” or “bearish” by itself.
- It is a condition: repeated equilibrium toggling (high churn / high compression).
- These often precede expansions, but direction is not implied by the zone alone.
Step 3 — Tune the QHO spin flip sensitivity (L and κ)
- L controls regression memory and σ estimation length.
- κ controls how extreme the displacement must be to trigger a spin flip.
Guideline:
- Smaller L = more reactive centerline and σ.
- Larger L = smoother, slower “field” definition.
- κ=3.0 = strong extreme filter.
- κ=2.0 = more frequent flips.
Interpretation:
- Spin flips mark when price exits the “normal” residual field.
- In your model language: a moment of decoherence/expansion that is statistically extreme relative to recent equilibrium.
Step 4 — Read the combined behavior (your key thesis)
A) Density Zone forms (GM churn clusters):
- Market repeatedly crosses equilibrium (GM), compressing into a bounded churn envelope.
- dzHi/dzLo show the envelope range.
B) Expansion occurs:
- Price can release away from the density envelope (up or down).
- If it expands far enough relative to regression equilibrium, a Spin Flip triggers (|Y| > κ).
C) Re-coherence:
- After a spin flip, price often returns toward equilibrium structures:
- toward the regression centerline m_t
- and/or back toward the density envelope (dzHi/dzLo) depending on regime behavior.
- The indicator does not guarantee return, but it highlights the condition where return-to-field is statistically likely in many regimes.
IMPORTANT NOTES / DISCLAIMERS
- This indicator is an analytical overlay. It does not provide financial advice.
- Density Zones are condition states derived from GM crossing frequency; they do not predict direction.
- Spin Flips are statistical excursions based on regression residuals and rolling σ; markets have fat tails and non-stationarity, so σ-based thresholds are contextual, not absolute.
- All parameters (L1, L2, W, θ, L, κ) should be tuned per asset, timeframe, and volatility regime.
PARAMETER SUMMARY
Geometric Mean / Density Zones:
- L1: MA1 length
- L2: MA2 length
- GM_t = sqrt(SMA(L1)*SMA(L2))
- W: crossing-count lookback window
- θ: crossing density threshold
- D_t = Σ crossEvent_{t-i} over W
- isDZ_t = (D_t >= θ)
- dzHi/dzLo track envelope bounds while isDZ is true
QHO / Spin Flips:
- L: regression + residual σ length
- m_t = linreg(close, L, 0)
- r_t = close_t - m_t
- σ_t = stdev(r_t, L)
- Y_t = r_t / σ_t
- spinFlip_t = (|Y_t| > κ)
Visual Controls:
- toggles for GM lines, cross markers, zone shading, bounds, QHO bands
- marker size options for GM crosses and spin flips
ALERTS INCLUDED
- Density Zone START / END
- Spin Flip UP / DOWN
- Cross Above GM / Cross Below GM
SUMMARY
This indicator treats the Geometric Mean as an equilibrium boundary and identifies “Density Zones” when price repeatedly crosses that equilibrium within a rolling window, forming a bounded churn envelope (dzHi/dzLo). It also models a regression-based equilibrium field and triggers “Spin Flips” when price makes statistically extreme σ-excursions from that field. Used together, Density Zones highlight compression/decision regions (equilibrium churn), while Spin Flips highlight extreme expansion states (σ-breaches), allowing the user to visualize how price compresses around equilibrium, releases outward, and often re-stabilizes around equilibrium structures over time.
Daily Levels [cryptalent]Daily High / Low / Mid / Open Levels is a session-based reference indicator designed to visualize key daily price levels directly on the chart.
This indicator automatically plots the Daily High, Daily Low, Daily Midpoint (High + Low / 2), and Daily Open as horizontal lines for each trading day. These levels help traders quickly identify important structural prices where liquidity, reactions, or acceptance often occur.
Key Features
Automatic Daily Levels
Plots Daily High (H), Low (L), Mid (M), and Open (O) using higher-timeframe daily data.
Levels update in real time as the current day develops.
Multi-Day History
Displays daily levels for a configurable number of past days.
Older levels are automatically removed to keep the chart clean.
Line Extension
Current day levels can be extended forward by a user-defined number of bars.
Useful for projecting intraday reaction zones and liquidity targets.
Visual Customization
Independent line width and color settings for each level.
Mid level is shown as a dashed line for quick visual distinction.
Labels & Price Tags
Optional letter labels (H / L / M / O) displayed near the extended levels.
Optional price labels showing the exact level values on the right side of the chart.
Labels update dynamically and only display for the active trading day.
Performance-Oriented Design
Efficient line and label management using arrays.
Automatically cleans up unused objects to stay within TradingView limits.
Use Cases
Identifying intraday support and resistance
Tracking daily range behavior
Monitoring mean reversion vs. range expansion
Aligning intraday execution with higher-timeframe structure
This indicator is particularly useful for traders who rely on market structure, session behavior, and objective price references rather than subjective trend lines.
Pro trade by Amit// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0) creativecommons.org
//@version=5
import HeWhoMustNotBeNamed/utils/1 as ut
import Trendoscope/ohlc/1 as o
import Trendoscope/LineWrapper/1 as wr
import Trendoscope/ZigzagLite/2 as zg
import Trendoscope/abstractchartpatterns/5 as p
import Trendoscope/basechartpatterns/6 as bp
indicator("Installing Wait....", "Automatic Chart Pattern", overlay = true, max_lines_count=500, max_labels_count=500, max_polylines_count = 100)
openSource = input.source(open, '', inline='cs', group='Source', display = display.none)
highSource = input.source(high, '', inline='cs', group='Source', display = display.none)
lowSource = input.source(low, '', inline='cs', group='Source', display = display.none)
closeSource = input.source(close, '', inline='cs', group='Source', display = display.none, tooltip = 'Source on which the zigzag and pattern calculation is done')
useZigzag1 = input.bool(true, '', group = 'Zigzag', inline='z1', display = display.none)
zigzagLength1 = input.int(8, step=5, minval=1, title='', group='Zigzag', inline='z1', display=display.none)
depth1 = input.int(55, "", step=25, maxval=500, group='Zigzag', inline='z1', display=display.none, tooltip = 'Enable and set Length and Dept of Zigzag 1')
useZigzag2 = input.bool(false, '', group = 'Zigzag', inline='z2', display = display.none)
zigzagLength2 = input.int(13, step=5, minval=1, title='', group='Zigzag', inline='z2', display=display.none)
depth2 = input.int(34, "", step=25, maxval=500, group='Zigzag', inline='z2', display=display.none, tooltip = 'Enable and set Length and Dept of Zigzag 2')
useZigzag3 = input.bool(false, '', group = 'Zigzag', inline='z3', display = display.none)
zigzagLength3 = input.int(21, step=5, minval=1, title='', group='Zigzag', inline='z3', display=display.none)
depth3 = input.int(21, "", step=25, maxval=500, group='Zigzag', inline='z3', display=display.none, tooltip = 'Enable and set Length and Dept of Zigzag 3')
useZigzag4 = input.bool(false, '', group = 'Zigzag', inline='z4', display = display.none)
zigzagLength4 = input.int(34, step=5, minval=1, title='', group='Zigzag', inline='z4', display=display.none)
depth4 = input.int(13, "", step=25, maxval=500, group='Zigzag', inline='z4', display=display.none, tooltip = 'Enable and set Length and Dept of Zigzag 4')
numberOfPivots = input.int(5, "Number of Pivots", , 'Number of pivots used for pattern identification.', group='Scanning', display = display.none)
errorThresold = input.float(20.0, 'Error Threshold', 0.0, 100, 5, 'Error Threshold for trend line validation', group='Scanning', display = display.none)
flatThreshold = input.float(20.0, 'Flat Threshold', 0.0, 30, 5, 'Ratio threshold to identify the slope of trend lines', group='Scanning', display = display.none)
lastPivotDirection = input.string('both', 'Last Pivot Direction', , 'Filter pattern based on the last pivot direction. '+
'This option is useful while backtesting individual patterns. When custom is selected, then the individual pattern last pivot direction setting is used',
group='Scanning', display=display.none)
checkBarRatio = input.bool(true, 'Verify Bar Ratio ', 'Along with checking the price, also verify if the bars are proportionately placed.', group='Scanning', inline = 'br', display = display.none)
barRatioLimit = input.float(0.382, '', group='Scanning', display = display.none, inline='br')
avoidOverlap = input.bool(true, 'Avoid Overlap', group='Scanning', inline='a', display = display.none)
repaint = input.bool(false, 'Repaint', 'Avoid Overlap - Will not consider the pattern if it starts before the end of an existing pattern '+
'Repaint - Uses real time bars to search for patterns. If unselected, then only use confirmed bars.',
group='Scanning', inline='a', display = display.none)
allowChannels = input.bool(true, 'Channels', group='Pattern Groups - Geometric Shapes', display = display.none, inline='g')
allowWedges = input.bool(true, 'Wedge', group='Pattern Groups - Geometric Shapes', display = display.none, inline='g')
allowTriangles = input.bool(true, 'Triangle', group='Pattern Groups - Geometric Shapes', display = display.none, inline='g',
tooltip = 'Channels - Trend Lines are parralel to each other creating equidistance price channels'+
' \t- Ascending Channel \t- Descending Channel \t- Ranging Channel'+
' Wedges - Trend lines are either converging or diverging from each other and both the trend lines are moving in the same direction'+
' \t- Rising Wedge (Expanding) \t- Rising Wedge (Contracting) \t- Falling Wedge (Expanding) \t- Falling Wedge (Contracting)'+
' Triangles - Trend lines are either converging or diverging from each other and both trend lines are moving in different directions'+
' \t- Converging Triangle \t- Diverging Triangle \t- Ascending Triangle (Contracting) \t- Ascending Triangle (Expanding) \t- Descending Triangle(Contracting) \t- Descending Triangle(Expanding)')
allowRisingPatterns = input.bool(true, 'Rising', group='Pattern Groups - Direction', display = display.none, inline = 'd')
allowFallingPatterns = input.bool(true, 'Falling', group='Pattern Groups - Direction', display = display.none, inline = 'd')
allowNonDirectionalPatterns = input.bool(true, 'Flat/Bi-Directional', group='Pattern Groups - Direction', display = display.none, inline = 'd',
tooltip = 'Rising - Either both trend lines are moving up or one trend line is flat and the other one is moving up.'+
' \t- Ascending Channel \t- Rising Wedge (Expanding) \t- Rising Wedge (Contracting) \t- Ascending Triangle (Expanding) \t- Ascending Triangle (Contracting)'+
' Falling - Either both trend lines are moving down or one trend line is flat and the other one is moving down.'+
' \t- Descending Channel \t- Falling Wedge (Expanding) \t- Falling Wedge (Contracting) \t- Descending Triangle (Expanding) \t- Descending Triangle (Contracting)'+
' Flat/Bi-Directional - Trend Lines move in different directions or both flat.'+
' \t- Ranging Channel \t- Converging Triangle \t- Diverging Triangle')
allowExpandingPatterns = input.bool(true, 'Expanding', group='Pattern Groups - Formation Dynamics', display = display.none, inline = 'f')
allowContractingPatterns = input.bool(true, 'Contracting', group='Pattern Groups - Formation Dynamics', display = display.none, inline='f')
allowParallelChannels = input.bool(true, 'Parallel', group = 'Pattern Groups - Formation Dynamics', display = display.none, inline = 'f',
tooltip = 'Expanding - Trend Lines are diverging from each other.'+
' \t- Rising Wedge (Expanding) \t- Falling Wedge (Expanding) \t- Ascending Triangle (Expanding) \t- Descending Triangle (Expanding) \t- Diverging Triangle'+
' Contracting - Trend Lines are converging towards each other.'+
' \t- Rising Wedge (Contracting) \t- Falling Wedge (Contracting) \t- Ascending Triangle (Contracting) \t- Descending Triangle (Contracting) \t- Converging Triangle'+
' Parallel - Trend Lines are almost parallel to each other.'+
' \t- Ascending Channel \t- Descending Channel \t- Ranging Channel')
allowUptrendChannel = input.bool(true, 'Ascending ', group = 'Price Channels', inline='uc', display = display.none)
upTrendChannelLastPivotDirection = input.string('both', '', , inline='uc', group='Price Channels', display = display.none,
tooltip='Enable Ascending Channel and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowDowntrendChannel = input.bool(true, 'Descending', group = 'Price Channels', inline='dc', display = display.none)
downTrendChannelLastPivotDirection = input.string('both', '', , inline='dc', group='Price Channels', display = display.none,
tooltip='Enable Descending Channel and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowRangingChannel = input.bool(true, 'Ranging ', group = 'Price Channels', inline='rc', display = display.none)
rangingChannelLastPivotDirection = input.string('both', '', , inline='rc', group='Price Channels', display = display.none,
tooltip='Enable Ranging Channel and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowRisingWedgeExpanding = input.bool(true, 'Rising ', inline='rwe', group = 'Expanding Wedges', display = display.none)
risingWedgeExpandingLastPivotDirection = input.string('down', '', , inline='rwe', group='Expanding Wedges', display = display.none,
tooltip='Enable Rising Wedge (Expanding) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowFallingWedgeExpanding = input.bool(true, 'Falling ', inline='fwe', group = 'Expanding Wedges', display = display.none)
fallingWedgeExpandingLastPivotDirection = input.string('up', '', , inline='fwe', group='Expanding Wedges', display = display.none,
tooltip='Enable Falling Wedge (Expanding) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowRisingWedgeContracting = input.bool(true, 'Rising ', inline='rwc', group = 'Contracting Wedges', display = display.none)
risingWedgeContractingLastPivotDirection = input.string('down', '', , inline='rwc', group='Contracting Wedges', display = display.none,
tooltip='Enable Rising Wedge (Contracting) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowFallingWedgeContracting = input.bool(true, 'Falling ', inline='fwc', group = 'Contracting Wedges', display = display.none)
fallingWedgeContractingLastPivotDirection = input.string('up', '', , inline='fwc', group='Contracting Wedges', display = display.none,
tooltip='Enable Falling Wedge (Contracting) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowRisingTriangleExpanding = input.bool(true, 'Ascending ', inline='rte', group = 'Expanding Triangles', display = display.none)
risingTriangleExpandingLastPivotDirection = input.string('up', '', , inline='rte', group='Expanding Triangles', display = display.none,
tooltip='Enable Ascending Triangle (Expanding) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowFallingTriangleExpanding = input.bool(true, 'Descending', inline='fte', group = 'Expanding Triangles', display = display.none)
fallingTriangleExpandingLastPivotDirection = input.string('down', '', , inline='fte', group='Expanding Triangles', display = display.none,
tooltip='Enable Descending Triangle (Expanding) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowExpandingTriangle = input.bool(true, 'Diverging ', inline='dt', group = 'Expanding Triangles', display = display.none)
divergineTriangleLastPivotDirection = input.string('both', '', , inline='dt', group='Expanding Triangles', display = display.none,
tooltip='Enable Diverging Triangle and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowRisingTriangleConverging= input.bool(true, 'Ascending ', inline='rtc', group = 'Contracting Triangles', display = display.none)
risingTriangleContractingLastPivotDirection = input.string('up', '', , inline='rtc', group='Contracting Triangles', display = display.none,
tooltip='Enable Ascending Triangle (Contracting) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowFallingTriangleConverging = input.bool(true, 'Descending', inline='ftc', group = 'Contracting Triangles', display = display.none)
fallingTriangleContractingLastPivotDirection = input.string('down', '', , inline='ftc', group='Contracting Triangles', display = display.none,
tooltip='Enable Descending Triangle (Contracting) and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowConvergingTriangle = input.bool(true, 'Converging ', inline='ct', group = 'Contracting Triangles', display = display.none)
convergingTriangleLastPivotDirection = input.string('both', '', , inline='ct', group='Contracting Triangles', display = display.none,
tooltip='Enable Converging Triangle and select the last pivot direction filter. Last pivot direction will only be used if the Generic Last Pivot Direction parameter is set to Custom')
allowedPatterns = array.from(
false,
allowUptrendChannel and allowRisingPatterns and allowParallelChannels and allowChannels,
allowDowntrendChannel and allowFallingPatterns and allowParallelChannels and allowChannels,
allowRangingChannel and allowNonDirectionalPatterns and allowParallelChannels and allowChannels,
allowRisingWedgeExpanding and allowRisingPatterns and allowExpandingPatterns and allowWedges,
allowFallingWedgeExpanding and allowFallingPatterns and allowExpandingPatterns and allowWedges,
allowExpandingTriangle and allowNonDirectionalPatterns and allowExpandingPatterns and allowTriangles,
allowRisingTriangleExpanding and allowRisingPatterns and allowExpandingPatterns and allowTriangles,
allowFallingTriangleExpanding and allowFallingPatterns and allowExpandingPatterns and allowTriangles,
allowRisingWedgeContracting and allowRisingPatterns and allowContractingPatterns and allowWedges,
allowFallingWedgeContracting and allowFallingPatterns and allowContractingPatterns and allowWedges,
allowConvergingTriangle and allowNonDirectionalPatterns and allowContractingPatterns and allowTriangles,
allowFallingTriangleConverging and allowFallingPatterns and allowContractingPatterns and allowTriangles,
allowRisingTriangleConverging and allowRisingPatterns and allowContractingPatterns and allowTriangles
)
getLastPivotDirectionInt(lastPivotDirection)=>lastPivotDirection == 'up'? 1 : lastPivotDirection == 'down'? -1 : 0
allowedLastPivotDirections = array.from(
0,
lastPivotDirection == 'custom'? getLastPivotDirectionInt(upTrendChannelLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(downTrendChannelLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(rangingChannelLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(risingWedgeExpandingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(fallingWedgeExpandingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(divergineTriangleLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(risingTriangleExpandingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(fallingTriangleExpandingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(risingWedgeContractingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(fallingWedgeContractingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(convergingTriangleLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(fallingTriangleContractingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection),
lastPivotDirection == 'custom'? getLastPivotDirectionInt(risingTriangleContractingLastPivotDirection) : getLastPivotDirectionInt(lastPivotDirection)
)
theme = input.string('Dark', title='Theme', options= , group='Display', inline='pc',
tooltip='Chart theme settings. Line and label colors are generted based on the theme settings. If dark theme is selected, '+
'lighter colors are used and if light theme is selected, darker colors are used. '+
'Pattern Line width - to be used for drawing pattern lines', display=display.none)
patternLineWidth = input.int(2, '', minval=1, inline='pc', group = 'Display', display = display.none)
showPatternLabel = input.bool(true, 'Pattern Label', inline='pl1', group = 'Display', display = display.none)
patternLabelSize = input.string(size.normal, '', , inline='pl1', group = 'Display', display = display.none,
tooltip = 'Option to display Pattern Label and select the size')
showPivotLabels = input.bool(true, 'Pivot Labels ', inline='pl2', group = 'Display', display = display.none, tooltip = 'Option to display pivot labels and select the size')
pivotLabelSize = input.string(size.normal, '', , inline='pl2', group = 'Display', display = display.none)
showZigzag = input.bool(true, 'Zigzag', inline='z', group = 'Display', display = display.none)
zigzagColor = input.color(color.blue, '', inline='z', group = 'Display', display = display.none, tooltip = 'Option to display zigzag within pattern and the default zigzag line color')
deleteOldPatterns = input.bool(true, 'Max Patterns', inline='do', group = 'Display', display = display.none)
maxPatterns = input.int(20, '', minval=1, step=5, inline = 'do', group = 'Display', display = display.none, tooltip = 'If selected, only last N patterns will be preserved on the chart.')
errorRatio = errorThresold/100
flatRatio = flatThreshold/100
showLabel = true
offset = 0
type Scanner
bool enabled
string ticker
string timeframe
p.ScanProperties sProperties
p.DrawingProperties dProperties
array patterns
array zigzags
method getZigzagAndPattern(Scanner this, int length, int depth, array ohlcArray, int offset=0)=>
var zg.Zigzag zigzag = zg.Zigzag.new(length, depth, 0)
var map lastDBar = map.new()
zigzag.calculate(array.from(highSource, lowSource))
var validPatterns = 0
mlzigzag = zigzag
if(zigzag.flags.newPivot)
while(mlzigzag.zigzagPivots.size() >= 6+offset)
lastBar = mlzigzag.zigzagPivots.first().point.index
lastDir = int(math.sign(mlzigzag.zigzagPivots.first().dir))
if(lastDBar.contains(mlzigzag.level)? lastDBar.get(mlzigzag.level) < lastBar : true)
lastDBar.put(mlzigzag.level, lastBar)
= mlzigzag.find(this.sProperties, this.dProperties, this.patterns, ohlcArray)
if(valid)
validPatterns+=1
currentPattern.draw()
this.patterns.push(currentPattern, maxPatterns)
alert('New Pattern Alert')
else
break
mlzigzag := mlzigzag.nextlevel()
true
method scan(Scanner this)=>
var array ohlcArray = array.new()
var array patterns = array.new()
ohlcArray.push(o.OHLC.new(openSource, highSource, lowSource, closeSource))
if(useZigzag1)
this.getZigzagAndPattern(zigzagLength1, depth1, ohlcArray)
if(useZigzag2)
this.getZigzagAndPattern(zigzagLength2, depth2, ohlcArray)
if(useZigzag3)
this.getZigzagAndPattern(zigzagLength3, depth3, ohlcArray)
if(useZigzag4)
this.getZigzagAndPattern(zigzagLength4, depth4, ohlcArray)
var scanner = Scanner.new(true, "", "",
p.ScanProperties.new(offset, numberOfPivots, errorRatio, flatRatio, checkBarRatio, barRatioLimit, avoidOverlap, allowedPatterns=allowedPatterns, allowedLastPivotDirections= allowedLastPivotDirections, themeColors = ut.getColors(theme)),
p.DrawingProperties.new(patternLineWidth, showZigzag, 1, zigzagColor, showPatternLabel, patternLabelSize, showPivotLabels, pivotLabelSize, deleteOnPop = deleteOldPatterns),
array.new())
if(barstate.isconfirmed or repaint)
scanner.scan()
NQ BB+PS StrategyBollinger Band and ProScalper combined strategy/indicators. Designed to take quick 1:1 Risk to Reward trades. Entry on close of signal bar, set auto SL and TP levels to 50 ticks. If a signal in the opposing direction populates, close open trade and follow current signal or simply reverse positions. There is a "+" Sign above signals that fire in the direction of the current EMA trend signaling an A+ set up. Recommended following the first 4-6 signals of the day prior to 11am before the mid day "chop".
Basit BUY SELL//@version=5
indicator("Basit Yeşil Al - Kırmızı Sat", overlay=true)
// Mum renkleri
yesil = close > open
kirmizi = close < open
// Yeşil mumda AL oku
plotshape(yesil, title="AL", location=location.belowbar, color=color.lime, style=shape.triangleup, size=size.large, text="AL")
// Kırmızı mumda SAT oku
plotshape(kirmizi, title="SAT", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large, text="SAT")
Smart Money Bot [MTF Confluence Edition]Uses multi-time frame analysis and supply and demand strategy.
Best used when swing trading.
Initial Balance with AlertsThis indicator is a comprehensive tool for Auction Market Theory (AMT) practitioners who rely on the Initial Balance (IB) to determine the day's likely structure. It automatically plots the High and Low of the opening session (user-definable) and extends those levels to provide key support and resistance zones for the remainder of the trading day.
Unlike standard IB indicators, this script features Smart Alerts that are time-filtered. You can define a specific "Active Alert Window" (e.g., RTH only) to ensure you are notified of breakouts during key hours, while avoiding spam notifications during overnight or low-volume sessions.
Key Features:
1. Customizable Initial Balance
Flexible Session: Define the exact start and end time for your IB calculation (Default: 08:30–09:30).
Visual Clarity: Plots IB High, IB Low, and the 50% Midpoint with fully customizable line styles, colors, and widths.
2. Smart Time-Filtered Alerts
Breakout Detection: Triggers an alert when price crosses above the IB High or below the IB Low.
Session Filter: Includes a unique "Allowed Alert Time" input. Alerts will only fire if the breakout happens within this window (Default: 08:30–15:00), preventing unwanted notifications during overnight chop.
3. Advanced Extensions & Targets
Extensions: Option to display multiples of the IB range (2x, 3x) to serve as statistical targets for trend days.
Intermediate Levels: Option to display half-step extensions (e.g., 1.5x) for tighter scalping targets.
4. IB Delta Analytics Dashboard
Context is Key: An optional on-screen dashboard tracks the size of the Initial Balance over the last 20 days.
Sentiment: Automatically categorizes today's IB as "Huge," "Medium," or "Small" compared to the 20-day average. This helps you anticipate if the day is likely to be a "Range Day" (Large IB) or a "Trend Day" (Small IB).
Settings Overview:
Calculation Period: The time used to measure the high and low (e.g., first 60 mins).
Allowed Alert Time: The window during which alerts are active.
Show Extra Levels: Toggles the 2x and 3x extensions.
Fill IB Areas: Adds a background color to the opening range for better visibility.
Delta Analytics: Toggles the statistics table on/off.
Author's Instructions
How to Configure the Time Settings: This script uses two distinct time inputs to give you maximum control:
"Calculation period": This is when the script measures the High and Low.
Example: 0830-0930 (The first hour of the NYSE session).
"Allowed Alert Time (RTH)": This is when the script is allowed to send you alerts.
Example: 0830-1500 (The full trading day).
Why this matters: If price breaks the IB High at 18:00 (during the overnight session), the script will ignore it if your alert time ends at 15:00. This saves you from waking up to low-probability signals.
Setting Up Alerts: To activate the alerts, add the indicator to your chart, click the "Alerts" button (clock icon) in the top toolbar, select this indicator from the "Condition" list, and choose "Any alert() function call".
Disclaimer: This tool is for informational purposes only. Past performance does not guarantee future results.
T3 Al-Sat Sinyalli//@version=5
indicator("T3 Al-Sat Sinyalli", overlay=true, shorttitle="T3 Signal")
// Kullanıcı ayarları
length = input.int(14, minval=1, title="Periyot")
vFactor = input.float(0.7, minval=0.0, maxval=1.0, title="Volatility Factor (0-1)")
// EMA hesaplamaları
ema1 = ta.ema(close, length)
ema2 = ta.ema(ema1, length)
ema3 = ta.ema(ema2, length)
// T3 hesaplaması
c1 = -vFactor * vFactor * vFactor
c2 = 3 * vFactor * vFactor + 3 * vFactor * vFactor * vFactor
c3 = -6 * vFactor * vFactor - 3 * vFactor - 3 * vFactor * vFactor * vFactor
c4 = 1 + 3 * vFactor + vFactor * vFactor * vFactor + 3 * vFactor * vFactor
t3 = c1 * ema3 + c2 * ema2 + c3 * ema1 + c4 * close
// T3 çizimi
plot(t3, color=color.new(color.blue, 0), linewidth=2, title="T3")
// Mum renkleri
barcolor(close > t3 ? color.new(color.green, 0) : color.new(color.red, 0))
// Al-Sat sinyalleri
buySignal = ta.crossover(close, t3)
sellSignal = ta.crossunder(close, t3)
// Okları çiz
plotshape(buySignal, title="Al", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(sellSignal, title="Sat", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
Buy-Dip / Sell-Pullback Buy the Dip / Sell the Pullback – Trend-Following Strategy (EOD → Next Day Execution)
Overview
This is a trend-following futures strategy designed to participate in pullbacks within established trends, not to predict reversals.
It works on End-of-Day (EOD) confirmation and executes trades on the next trading session, making it suitable for positional and swing traders.
The strategy combines momentum, trend direction, volatility, and price location to filter for high-quality setups while avoiding overtrading.
🔍 Core Philosophy
Trade only in the direction of the prevailing trend
Buy dips in uptrends
Sell pullbacks in downtrends
Avoid chasing price after extended gaps
Use volatility-adjusted risk management (ATR-based SL & targets)
📊 Indicators Used
RSI (20)
Measures underlying momentum strength
Stochastic Oscillator (55, 34, 21)
Confirms pullback exhaustion within a trend
Supertrend (10, 2)
Defines primary trend direction
Bollinger Bands (20, 2)
Provides structural trend bias
ATR (5)
Used for:
Entry gap filter
Stop-loss
Profit target
Supertrend buffer
✅ Long (Buy) Setup – Evaluated at EOD
A long setup is generated when all of the following conditions are satisfied at the close of the trading day:
RSI(20) is above the bullish threshold (default: 48)
Stochastic %K is above %D (confirming pullback momentum)
Supertrend direction is bullish
Price is near or above Supertrend, allowing a volatility-adjusted buffer (ATR-based)
Price is above the Bollinger Band middle line
This combination ensures:
The market is trending up
Momentum supports continuation
The pullback is controlled, not a breakdown
❌ Short (Sell) Setup – Evaluated at EOD
A short setup is generated when:
RSI(20) is below the bearish threshold (default: 52)
Stochastic %K is below %D
Supertrend direction is bearish
Price is near or below Supertrend, with an ATR buffer
Price is below the Bollinger Band middle line
This filters for pullbacks within sustained downtrends.
⏰ Trade Execution Logic (Next Day Rule)
Once a setup is confirmed at EOD, a trade is attempted on the next trading session
To avoid chasing gaps:
Long trades are allowed only if price does not move more than a defined multiple of the previous day’s True Range
Short trades follow the same logic in reverse
This is implemented via limit orders, ensuring realistic backtesting and execution behavior
🛑 Risk Management
All exits are volatility-adjusted using ATR:
Stop-Loss:
1.1 × ATR(5) from entry price
Target:
2.2 × ATR(5) from entry price
This results in a risk–reward ratio of approximately 1:2
ATR is frozen at entry to avoid forward-looking bias.
🧠 Why This Strategy Works
Avoids low-quality trades during consolidation
Participates only when trend + momentum align
Prevents emotional gap-chasing
Adapts automatically to changing volatility
Suitable for index futures and liquid stocks
📌 Recommended Usage
Timeframe: Daily
Instruments:
Index Futures (e.g. NIFTY, BANKNIFTY)
Highly liquid stocks
Market Type: Trending markets
Not ideal for: Sideways or low-volatility environments
⚙️ Customization Tips
You can control trade frequency and aggressiveness by adjusting:
RSI thresholds
Supertrend buffer (ATR multiple)
Gap filter multiplier
Stochastic edge parameter
Looser settings → more trades
Stricter settings → higher selectivity
⚠️ Disclaimer
This strategy is for educational and research purposes only.
Backtest results do not guarantee future performance.
Always validate with paper trading before deploying real capital.






















