Institutional VWAP Bands [JOAT]Institutional VWAP Bands
An anchored VWAP with standard-deviation bands that classifies price as cheap, fair or expensive and offers two complementary playbooks: mean reversion and trend pullback.
What it is
VWAP is the benchmark institutions measure their own fills against — the market's running notion of fair value. Standard-deviation bands around it map where price is stretched relative to that benchmark. This indicator runs an anchored VWAP with three band pairs and turns them into a structured, non-repainting decision tool rather than a plain VWAP line.
How it works
• Anchored VWAP — volume-weighted average price accumulated from a chosen anchor (session, week or month) with a controlled reset, so the reference restarts cleanly each period.
• Sigma bands — three pairs of bands at one, two and three standard deviations of price around VWAP, computed from the same volume-weighted variance. These define the stretch zones.
• Value state — every bar is classified with a z-score into cheap, fair or expensive relative to VWAP. This drives the colour system and the dashboard.
• Mean-reversion fades — when price is stretched to the outer bands against the higher-timeframe trend and then reclaims back inside, a fade toward VWAP is signalled. The reclaim requirement is deliberate, so you are not blindly catching a falling knife.
• Trend-pullback entries — in a trend, a retracement to VWAP or the first band that holds is a discount entry in the trend direction. Both playbooks are labelled by type, and Buy/Sell are mutually exclusive with a minimum-gap control.
Trade levels
Each signal draws a red risk box to the ATR stop and a green reward box to the third target, with inner dividers and right-edge labels for entry, stop and each take-profit. For reversion signals the first target is clamped toward VWAP so it always sits on the profit side of entry.
The dashboard
An adjustable value-ladder panel shows the value state, the z-score, the trend bias, the active playbook and signal, a conviction estimate, and a live first-target-before-stop tally from closed bars only.
How to use it
• Choose the anchor that matches your style: session for intraday, week or month for swing context.
• Fade the outer bands only against the trend and with a reclaim; take pullbacks to VWAP with the trend.
• Works across assets and timeframes, though the anchor should suit the timeframe you trade.
Settings
Anchor period, VWAP source, three band multipliers, trend filter length, reversion trigger, ATR risk multiple and target R multiples, plus visual and dashboard controls.
Originality and usefulness
VWAP and deviation bands are standard building blocks; the contribution here is the explicit two-playbook logic (reclaim-based reversion versus trend pullback), the value-state classification that ties colour, dashboard and signals together, and the reversion target clamp — combined into one coherent, non-repainting framework and fully explained.
Notes and limitations
• VWAP is most meaningful on instruments with reliable volume; on symbols without real volume the bands lose accuracy, which is stated here honestly.
• Reversion trades against a strong trend carry inherent risk even with the reclaim filter.
• The tally reflects only past bars on the current chart and is not a forecast.
• Educational and analytical tool, not financial advice.
— made with passion by officialjackofalltrades
Indicator

Indicator

Indicator

Equal Highs and Lows [D4A]Overview
This indicator identifies and displays **Relative Equal High (EQH)** and **Equal Low (EQL)** zones, highlighting price levels where the market has stalled or reversed from before. These areas are considered liquidity zones because they mark locations where price has previously paused, reversed, or encountered significant buying or selling activity, and as a result there is a concentration of buy-stops or sell-stops in these zones. In trading approaches such as Smart Money Concepts (SMC/ICT), equal highs and lows are considered important liquidity targets that may influence future market movement, as larger participants are thought to seek the liquidity concentrated around these levels.
How this script is different from other similar tools
- It marks two pivots as Equal Highs only if the second pivot is lower (within the threshold) than the 1st one and likewise, two pivots are marked as Equal Lows only if the second pivot is situated higher (within the threshold) than the 1st pivot. In other words the price has still a reason to re-visit this area
- It provides three different, user configurable pivot lengths that the script scans at the same type in search of EQHL. Most scripts use only one pivot length thus missing on many potential targets
- Apart from main labels, it draws also side labels at defined location which can be convenient to see all EQHL target levels at glance
How It Works
The indicator analyses **pivot highs** and **pivot lows** to locate meaningful swing points on the chart. When two consecutive pivots form within a user-defined price threshold, they are recognized as an Equal Highs or Equal Lows. A line is then drawn between the matching pivots, and the zone is labelled for easy identification.
Since market prices rarely align at exactly the same value, the indicator includes a **ATR Threshold** setting. This parameter specifies the maximum percentage difference allowed between two pivot levels for them to qualify as equal, giving traders the flexibility to adjust the detection based on market volatility and their preferred level of precision.
How to Use
(EQH/EQL) are strong liquidity targets: Use the marked levels as potential targets for take-profits, as price often seeks out these "equal" levels to sweep liquidity.
SETTINGS
- Show EQHL - show labels and drawings
- # of bars to use - limits the number of bars used to find EQHL
- Threshold / ATR Length - are used to establish difference between two levels being considered "equal high" or "equal low"
- Show Labels - define labels shown
- Show Side Labels - enables additional labels on the side of the chart
- Right Coordinate - how many bars to the right the side labels are displayed at
- Pivot Length - there are three different lengths to configure to cover large distance difference between two pivots
- Remove All Drawings After Sweep - when EQH or EQL levels are swept, the corresponding drawings are removed from memory
-----------------
Disclaimer
The content provided in this script is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs. Indicator

Volume Profile and Indicator by DGTCreating a custom Volume Profile in Pine Script that allows for selectable timeframes is a powerful way to visualize market structure exactly how you want it.TradingView provides built-in "Session Volume Profile" and "Fixed Range Volume Profile" tools, but if you are building your own in Pine Script, you will need to handle the data aggregation manually.How to Approach Custom Volume ProfileTo build this, you are essentially creating a script that buckets volume based on price levels within a defined time window. Here is the architectural logic you should follow:1. Define Your Timeframe InputYou can allow users to select their timeframe directly in the script settings using input.timeframe().Pine Script// Example input for timeframe selection
tf = input.timeframe("D", "Select Timeframe")
2. Fetch Data Across TimeframesTo get volume data from a specific timeframe, you use the request.security() function. This ensures that even if you are looking at a 1-minute chart, your script can pull the high, low, close, and volume data from the higher timeframe (e.g., daily or weekly) to build the profile.3. Bucket the DataSince Pine Script doesn't have a native "Volume Profile" drawing object, most custom scripts use the box.new() or line.new() functions to draw the histogram.Divide the range: Calculate the total price range (High - Low) for the selected timeframe.Create rows: Determine a "Row Size" (either in ticks or a percentage of the total range). Aggregate volume: Iterate through the bars in the selected timeframe and add the volume of each bar to the corresponding price "bucket."Recommended Implementation StrategyRather than building a complex math engine from scratch, I recommend looking at these two paths to save development time:The "Study" Approach: Use the request.security function to get the High, Low, and Volume for the selected timeframe. Store these values in an array to perform your volume-at-price calculations.Use Existing Community Scripts: Because Volume Profile is mathematically intensive, many developers have already optimized the "binning" logic. You can search for "Volume Profile" in the Pine Editor or Community Scripts and look for open-source code to see how they handle the box.new() rendering, which is the most resource-heavy part of the script.Key Considerations for Your CodePerformance: TradingView limits the number of drawing objects (boxes/lines) a script can create. If you set your "Row Size" too small, your script will hit the limit and stop drawing. Always add a "Resolution" or "Row Count" setting for users to adjust.Repainting: When using request.security, ensure you use barmerge.lookahead_off to avoid "peeking" into the future, which leads to backtesting inaccuracies.Mitigation: If you are building this to track "Naked POCs" or "Value Areas," use var to store historical levels so they persist on your chart as new profiles are created. Indicator

Indicator

Indicator

Indicator

Indicator

Ryno V4 - 24HR High AccuracyRyno V4 – 24HR High Accuracy is a pullback-confirmation indicator designed for MNQ futures on the 15-minute chart.
Unlike breakout systems that may alert after price is already extended, Ryno V4 waits for an established trend, a controlled pullback, and confirmed momentum before producing an entry signal.
Core features:
• 24-hour market scanning
• Long and short signals
• 15-minute trend structure
• 60-minute trend confirmation
• EMA 9, 21, and 50 alignment
• VWAP direction filter
• RSI, volume, and volatility confirmation
• Pullback-first entry logic
• Maximum-extension protection
• Structural stops with ATR limits
• Trim and runner targets
• WATCH, ENTER, CANCELLED, STOPPED, and TARGET alerts
• Signals confirmed at candle close to reduce repainting
Alert meanings:
WATCH — A potential setup has formed. Wait for confirmation.
ENTER BUY/SELL — The pullback and momentum requirements have been confirmed.
CANCELLED — The setup became invalid before entry.
STOPPED — The tracked stop level was reached.
RUNNER TARGET — The tracked runner target was reached.
Designed primarily for scalp-to-short-runner trades. This indicator does not place or manage brokerage orders. Users remain responsible for execution, position sizing, risk management, and verifying signals through paper trading before risking capital.
No indicator can guarantee future results. Historical or simulated performance does not ensure live profitability.
Indicator

Calendar Performance DashboardCalendar Performance Dashboard
Overview
Calendar Performance Dashboard is a professional performance analysis tool that measures an asset's price performance across the current calendar year using meaningful time periods instead of arbitrary lookback windows.
Rather than showing only today's price change or the last 24 hours, this indicator helps investors understand how an asset has performed during the current trading day, week, month, year, and each individual calendar quarter.
It is designed for investors, swing traders, portfolio managers, and anyone who wants a quick overview of an asset's performance without changing chart timeframes.
Features
📅 Today Performance
Measures the percentage change from today's opening price to the current price.
Formula
Current Price vs Today's Open
📅 Week Performance
Measures performance from the opening of the current trading week.
📅 Month Performance
Measures performance from the first trading day of the current month.
📈 Year To Date (YTD)
Shows the total return since the first trading day of the current calendar year.
This allows you to quickly determine whether an asset is outperforming or underperforming during the year.
📊 Calendar Quarter Performance
The indicator automatically divides the current year into four calendar quarters.
Q1
January 1 → March 31
Q2
April 1 → June 30
Q3
July 1 → September 30
Q4
October 1 → December 31
Completed quarters display their final performance, while the current quarter updates in real time.
Future quarters are marked as Not Started.
Status System
Each period has its own status.
🟢 Completed
The period has finished and its performance is fixed.
🟡 Current
The period is still active and updates every bar.
⚪ Not Started
The period has not begun yet.
Dashboard Information
The dashboard displays:
Period
Start Price
End Price / Current Price
Percentage Change
Status
All information is updated automatically without changing chart timeframes.
Why use Calendar Performance instead of Rolling Performance?
Most indicators use rolling periods such as:
Last 30 Days
Last 90 Days
Last 365 Days
While useful, these periods make it difficult to compare true calendar performance.
This indicator instead uses calendar periods, making it ideal for:
Annual performance analysis
Quarterly performance comparison
Portfolio reviews
Institutional-style reporting
Long-term investment monitoring
Suitable Markets
Cryptocurrency
Stocks
ETFs
Forex
Commodities
Indices
Ideal For
Long-term Investors
Swing Traders
Portfolio Managers
Market Analysts
Financial Reporting
Performance Comparison
Notes
Performance calculations are based on calendar periods rather than rolling lookback windows.
Completed quarters remain fixed after they end.
The current quarter updates continuously until the quarter closes.
YTD always measures performance from the first trading day of the current year.
Calendar Performance Dashboard provides a clean, intuitive way to understand an asset's performance across the most meaningful calendar periods—all in a single dashboard. Indicator

Indicator

LWTG MITS Indicator**Title:** LWTG MITS Indicator
**Description:**
LWTG MITS (Multi-Indicator Trading System) is a rules-based mean-reversion and trend-following scoring engine designed for micro futures trading on prop firm accounts. It evaluates nine independent market conditions simultaneously and only enters a trade when a configurable minimum number of those conditions align — creating a high-confluence filter that reduces noise and improves signal quality.
**How the scoring system works**
Each bar, the script evaluates nine confluence factors across both long and short directions. Each factor that aligns with the potential trade direction adds one point to the score. A trade signal fires only when the score meets or exceeds the minimum threshold set in the inputs. The nine factors are:
1. **EMA Alignment** — Price relationship to short and long exponential moving averages confirms the directional bias
2. **VWAP Position** — Price position relative to the Volume Weighted Average Price filters entries against the intraday mean
3. **Momentum** — A custom momentum calculation confirms the strength of the current directional move
4. **Volume Confirmation** — Current bar volume relative to a rolling average confirms institutional participation
5. **Candlestick Pattern** — Engulfing and reversal patterns at key levels add a price action confirmation layer
6. **Volatility Filter** — ATR-based volatility measurement ensures entries occur in tradeable market conditions, not during dead zones
7. **RSI Filter** — Relative Strength Index prevents entries in overbought or oversold extremes where mean-reversion risk is highest
8. **ADX Filter** — Average Directional Index confirms sufficient trend strength before entry
9. **Market Regime** — A composite regime score (-6 to +6) derived from multiple timeframe analysis gates entries against the broader market direction. Counter-regime trades are blocked entirely
**Additional filters**
Beyond the nine confluence factors, the system includes:
- **Session time filter** — restricts trading to configurable intraday windows, avoiding low-liquidity periods
- **EOD cutoff** — automatically stops new entries before the end of the regular trading session
- **Session loss policy** — after a configurable number of consecutive losses, the system pauses entries for the remainder of the session
- **Daily loss limit** — blocks all new entries when cumulative session realized P&L drops below a configurable threshold
- **Trade direction control** — configurable to Long Only, Short Only, or Both
**Instruments**
Optimized and validated for micro futures: MES (Micro S&P 500), MNQ (Micro Nasdaq-100), M2K (Micro Russell 2000), and MGC (Micro Gold Futures). Each instrument has independently optimized default parameters.
**How to use this script**
This is the indicator version (v4.x). Unlike the strategy version, this script uses Pine Script's alert() function to fire signals intrabar — before the bar closes. This results in earlier signal detection and tighter entry prices compared to bar-close execution.
This script is the live execution path for automated trading. It fires two alerts per chart: one for order execution via webhook to an automated broker integration, and one for trade logging to a Google Apps Script backend. It is designed to run alongside the companion strategy version (LWTG MITS Strategy) on the same chart — the strategy version handles paper trading and backtesting while this indicator handles live execution.
Add the script to your chart, select the appropriate preset for your instrument, and configure your minimum confluence score. The diagnostic panel displays real-time scoring, regime status, filter states, session P&L, and daily loss limit gate status.
Alert message format is JSON and integrates with automated order execution systems via webhook. Full webhook payload specification and GAS logging integration are documented in the companion GitHub repository.
For full setup documentation, visit the companion GitHub repository linked in the author profile.
**Important:** This script is provided for educational purposes. All trading involves risk. Past performance does not guarantee future results. Always validate any trading system thoroughly before deploying with real capital. Indicator

WSTM.io - Kangaroo TailWSTM.io Kangaroo Tail
═══════════════════════════════════════════
OVERVIEW
This indicator detects a single, specific reversal event: a liquidity-sweep candle at a meaningful level — the Kangaroo Tail. Price runs an extreme, sweeps through a level where liquidity rests, and is rejected hard within one candle, closing back on the other side.
It is deliberately quiet. Most sessions it prints nothing. It speaks only when ALL of the following align on one closed candle: a genuine sweep of untouched territory, textbook rejection anatomy, and a nameable level inside the sweep wick. The KT is not a candle pattern that happens to be near a level — it is a level rejection whose evidence is a candle.
───────────────────────────────────────────
THE CANDLE (KT Short shown — KT Long is the exact mirror)
1. THE SWEEP — the candle's high prints a new high versus the prior N bars (default 78 ≈ 6.5 hours on the 5m). Room to the left, measured in time: price must not have been at this extreme for most of a session. This single condition excludes chop, congestion, and ordinary trend bars.
2. REJECTION ANATOMY — the entire candle body sits in the bottom third of the range (body position is the filter; body color is reported, not required — a green body closing near the low is a valid rejection). The opposite wick is capped at 5% of the range, and the sweep wick itself must be significant: at least 1.5% of the daily ATR, with a tick floor, so the threshold scales across instruments and volatility regimes.
3. CONTEXT — the body sits inside the previous candle's range (toggleable), and a large prior same-direction candle raises a ⚠mom caution tag on the signal rather than suppressing it: the thrust into a level is often strong, and that thrust-sweep-reject sequence is the pattern at its best.
───────────────────────────────────────────
THE LEVEL — REQUIRED, AND MEASURED CORRECTLY
No level, no signal. The confluence set:
• Session levels: PMH/PML, YH/YL, PDC, WH/WL — computed internally, non-repainting, with calendar-derived session boundaries that survive holiday weeks.
• Camarilla pivots: R3/R4 for shorts, S3/S4 for longs, from yesterday's RTH high/low/close (classic 1.1 multipliers).
• Up to three CUSTOM levels — type in your own hand-drawn HTF lines and they join the set, tagged "HTF".
Two details most level tools get wrong:
LEVEL-IN-WICK GEOMETRY: the level must lie within the sweep wick's span — tip to body edge, padded by a proximity band. A deep sweep THROUGH the level is the pattern at its strongest, not a disqualification.
LIVE-LEVEL MATURITY: a running level (WH/WL always; PMH/PML while the premarket window is open) must rest untouched for a configurable number of bars before it counts. A sweep candle's own extreme IS the newborn premarket high — a level seconds old is not structure.
YESTERDAY ROLLS AT 18:00 ET by default — CME's own trading-day boundary — so evening and overnight KTs test the session that just completed, not the day before it. A legacy next-RTH-open roll is available in settings.
───────────────────────────────────────────
SIGNALS, TAGS, AND ALERTS
A qualifying candle prints one label — "KT ▼" or "KT ▲" — carrying its context: the level swept (@ YL, @ R4, @ HTF…), "in FVG" when the wick lands inside an unfilled qualified Fair Value Gap (volatility-scaled: >= 2% of daily ATR), and ⚠mom when the prior-candle caution tripped.
The alert message includes everything needed to assess without opening the chart: sweep depth in points, level, FVG confluence, body color, and reference trade geometry — trigger one tick beyond the KT extreme, stop one tick beyond the wick, and the 1:1 target.
Alert setup: add the indicator, create ONE alert with condition "Any alert() function call", expiration Open-ended. Direction is controlled inside the indicator settings. Note: TradingView alerts snapshot settings at creation — after changing settings, recreate the alert.
A near-miss diagnostics mode (default OFF) is available for investigation: candles at a level that fail exactly one anatomy check print a tiny marker naming it.
───────────────────────────────────────────
HOW TO USE IT
The KT marks a completed liquidity event at structure. Traders who study these typically look for entry on a break of the KT candle's extreme in the rejection direction, with the stop beyond the sweep wick — the geometry the alert pre-computes. Keep your own hand-marked HTF levels current in the three custom slots: the level set is the heart of the tool.
This indicator identifies a candle pattern at a level. It does not generate buy/sell recommendations, does not place trades, and does not replace your own analysis and risk management.
───────────────────────────────────────────
TECHNICAL NOTES
• Non-repainting: all detection confirms on bar close; ATR uses completed daily bars; levels are built from session windows with no lookahead.
• Intraday timeframes only. Built for CME micro futures (MES, MNQ, M2K, MGC, MCL) but works on any liquid symbol; all size thresholds are % of daily ATR with tick floors, so they travel across instruments.
• Sweep lookback, anatomy thresholds, proximity band, maturity, and session times are fully configurable.
───────────────────────────────────────────
DISCLAIMER
This script is for informational and educational purposes only. It does not constitute financial, investment, or trading advice. A rejection candle at a level is a pattern, not a guarantee of future price behavior. All trading decisions made using this tool are solely the responsibility of the user. Indicator

Indicator

Custom Built IndicatorCustom Built Indicator | MisinkoMaster
Trading is often viewed as a purely mathematical or technical discipline, but the truth is that successful trading requires immense creativity. There are thousands of brilliant traders who have incredible, unique structural concepts in their minds but feel held back because they do not know how to write code. The Custom Built Indicator (CBI) was created to bridge that gap.
This indicator acts as a blank, programmable canvas designed to unlock your inner quantitative designer. It is a fully modular trading framework that allows you to build, test, and personalize your own technical systems without touching a single line of code. By giving you absolute control over the baseline foundation, the volatility wrapper, the smoothing layer, and the conditional trend logic, CBI makes algorithmic design accessible to everyone. Think of it as trading art—a sandbox where you can bring your most detailed visual concepts to life, spark your curiosity, and perhaps even inspire you to take your first steps into learning Pine Script development.
How It Works: The Modular Sandbox
Instead of trapping you inside a single, rigid formula, CBI breaks down technical analysis into five independent, hot-swapping algorithmic layers:
Baseline Settings: This establishes the gravitational core of your asset's price action. You can set this baseline using standard moving averages, advanced low-lag options, mathematical centerpoints like the median or statistical mode, or even a pure historical price offset.
Volatility Settings: This dictates how your system measures market expansion and compression. You can wrap your baseline using standard range tools, pure standard deviation, or robust absolute deviation models to map out precise market extremes.
Smoothing Settings: A unique layer that allows you to smooth out the upper and lower boundary bands independently of the central baseline. Applying secondary smoothing allows you to create highly tailored, fluid bands that conform uniquely to market noise.
Trend Logic Settings: The brain of your strategy. Here, you decide exactly what constitutes a market regime shift. You can define trend conditions based on price breaking the outer channels, crossing the baseline, or even pure momentum acceleration.
Confirmation Filters: To minimize false signals, you can apply secondary algorithmic checks—such as volume verification, rate of change agreement, or candle validation—before any structural trend shift is confirmed.
An Ocean of Creative Possibilities
To understand just how massive this sandbox is, we can calculate the exact number of unique logical setups available. If we completely ignore all numerical values (like lookback periods or band multipliers) and only look at the dropdown menus, the sheer volume of structural combinations is staggering:
Baseline Type: 11 options
Volatility Type: 5 options
Upper Band Smoothing Type: 11 options
Lower Band Smoothing Type: 11 options
Long Signal Logic: 3 options
Short Signal Logic: 3 options
Confirmation Type: 4 options
The Custom Built Indicator provides exactly 239,580 unique, without numerical inputs, meaning everyone will have a completely unique layout that fits them and their style.
When you factor in that the crossover and crossunder source inputs can also be independently assigned to any price data point, the mathematical possibilities soar into the millions. Every single trader can find, name, and perfect a structural footprint that is entirely their own.
Key System Features
On-Chart Canvas Synchronization: The system automatically tracks your custom logical state and dynamically projects it back onto the screen, shifting candle colors and painting custom visual envelopes to represent your unique market regime.
Asymmetric Modeling: Because the upper and lower multipliers and smoothing options are completely separated, you can build asymmetric strategies—such as tight, highly sensitive upper boundaries for fast momentum breakouts combined with wide, volatile lower boundaries to catch major macroscopic market drops.
Forward-Looking Integration: The conditional logic allows you to experiment with advanced structural confirmations, such as requiring two consecutive breakout bars or demanding expanding volume before confirming a trend pivot.
Input Parameters Layout
General & Baseline Settings
Source: The primary price feed running into your system core.
Baseline Type & Lookback: Chooses the foundational trend line, offering options ranging from traditional SMA, EMA, and WMA, to advanced zero-lag options like TEMA, HMA, ALMA, or statistical Mode and Median.
Volatility & Smoothing Settings
Volatility Type & Lookback: Defines the range measurement matrix (Average True Range, Median True Range, Standard Deviation, Mean Absolute Deviation, or Median Absolute Deviation).
Upper & Lower Multipliers: Independently scales the distance of the bands from the baseline.
Additional Smoothing Type & Lookback: Provides an extra filtering pass specifically for the outer bands to eliminate jagged lines and smooth out execution zones.
Trend Logic Settings
Crossover/Crossunder Source: Selects the specific price sources required to breach the upper and lower boundaries.
Long/Short Signal Logic: Sets the core activation condition (breaking bands, crossing the baseline, or tracking positive/negative rate of change).
Confirmation Type: Applies an optional secondary validation layer (Volume, Baseline ROC, or Extra Bar validation).
Embrace the Art of Strategy Design
The ultimate goal of the Custom Built Indicator is to prove that technical analysis doesn't have to be rigid or intimidating. It is a playground for your ideas. Load it onto your chart, test out your most unconventional theories, mix architectures that traditional packages keep separate, and discover what works for your unique visual style. If you find a combination that speaks to you, use that spark to look under the hood—because the journey from clicking options to writing your own custom scripts is much shorter than you think.
Disclaimer: Trading financial markets involves high risk. This technical script is designed as an educational and informational tool to support your rule-based mechanical execution system and does not constitute financial advice.
Final Note: If you find any bugs, errors, contact me either through DMs or in the comments, and I will fix them and update the script. Indicator

Chart Patterns Auto Detection, Measured Targets & Entry SignalsCHART PATTERNS — AUTO DETECTION, MEASURED TARGETS & ENTRY SIGNALS
OVERVIEW
Chart patterns are the oldest idea in technical analysis and the least tested. "Head and shoulders works." "The measured move is the target." Everyone repeats it. Nobody checks.
This tool detects seventeen classical patterns using a published, peer-reviewed algorithm — and then forward-tests every one of them separately, on your instrument, and tells you which ones actually carry an edge and which do not.
The panel ends up saying things like:
Double bottom +0.31R n=44 PROVEN
Head & shoulders -0.08R n=19 (not proven)
Symmetric triangle -0.15R n=13 (thin)
That table does not exist anywhere else. It is the entire point of this script.
It is a research and framing tool. It is not a strategy, not a signal service, and not a validated edge.
THE ENGINE (Lo, Mamaysky & Wang, Journal of Finance, 2000)
The problem with pattern detection is stated best by the authors themselves: the presence of geometric shapes in price charts is often in the eyes of the beholder. Their solution, and the one used here:
1. Smooth the price with nonparametric kernel regression (Nadaraya-Watson, Gaussian kernel). This is the crucial step. Raw pivots are noise; the smoothed series is the shape. Every other pattern script hunts pivots on raw price and then argues about the pivot length.
2. Take the local extrema of the smoothed series.
3. Define each pattern as inequality conditions on five consecutive extrema.
Every tolerance is ATR-normalised so the same rule travels across instruments and timeframes. The original paper used fixed percentages tuned to US equities.
THE TAXONOMY IS A PARTITION, NOT A PILE OF RULES
The peaks and the troughs are each classified FLAT / RISING / FALLING — three states, mutually exclusive and exhaustive — and the resulting 3x3 grid names every shape exactly once.
troughs FLAT troughs RISING troughs FALLING
peaks FLAT Rectangle * Ascending triangle R-A broadening, desc *
(or Triple top)
peaks RISING R-A broadening, Rising wedge / Broadening formation *
asc * Asc broadening wedge
peaks FALLING Descending Symmetric triangle * Falling wedge /
triangle Desc broadening wedge
* = bilateral (no directional claim)
Convergence versus divergence splits the two same-slope cells. Head-and-shoulders and double tops/bottoms sit outside the grid — they are defined by the EQUALITY of specific extrema, not by the slope of the envelope — so they are tested separately.
This matters more than it sounds. A pile of independent rules leaks. Three level peaks with FALLING troughs is a right-angled descending broadening formation; with no rule to catch it, the shape drops through to the nearest match and gets logged as a TRIPLE TOP, quietly poisoning that pattern's statistics with a different pattern. Bulkowski's own identification quiz for the right-angled broadening formation opens by warning the reader that they may think they are looking at a triple top. Meanwhile a shape with higher highs AND higher lows that is WIDENING matched nothing at all and was thrown away. Both are now named. The grid is the reason the numbers in the panel mean what they say.
DIRECTIONAL VERSUS BILATERAL — WHY FIVE PATTERNS HAVE NO DIRECTION
A head-and-shoulders makes a claim: it breaks down. A symmetric triangle makes no such claim. Nobody, including Bulkowski, says which way it goes; he publishes statistics for BOTH breakout directions.
So a bilateral pattern arms BOTH boundaries and lets price pick the side. The five are: symmetric triangle, rectangle, broadening formation, and the two right-angled broadening formations. They are drawn in amber, and the trigger logic agrees with the paint.
This is not a cosmetic point. Splitting a symmetric triangle into a "triangle top" and a "triangle bottom" — where the only difference is whether the first extremum happened to be a high or a low — and then trading one short and the other long, is trading a phase accident of where the extremum series began. It is not a forecast, and it halves the sample size for nothing.
THE BOUNDARIES ARE TRENDLINES, NOT HORIZONTAL LINES
A triangle's boundary slopes. Testing a break against a horizontal line drawn at the last extremum is a different test — and it is wrong in a DIFFERENT DIRECTION for different patterns. A converging boundary sits below its last extremum, so a horizontal proxy triggers late. A diverging one sits above it, so the proxy triggers early, on breaks that never happened.
Since the entire purpose of this script is to COMPARE patterns against each other, a bias that flips sign depending on which pattern you are looking at is fatal. Every boundary here carries a slope, is projected to the current bar, and the measured move is projected from the boundary AT THE BAR IT BROKE — which is what the textbook actually says.
THE TWO THINGS IT MEASURES (they are different questions, and both are reported)
A. TRADABILITY. From the trigger bar, with identical geometry for every pattern and for the control, what is the expectancy in R? This is the question "does this pattern predict a favourable move?" It is compared against an unconditional, direction-matched control.
B. THE MEASURED MOVE — and, crucially, HOW FAR AWAY IT IS. Does the classical projected target actually get reached before the pattern's own stop? This is the number every pattern trader assumes and nobody has checked. It is a descriptive statistic, clearly labelled as such, with no control.
Mixing these two makes both meaningless, so they are kept apart. The trade uses a fixed R multiple so that every pattern — and the control — is measured on identical geometry. The measured move is drawn and tested separately.
A HIT RATE WITHOUT A DISTANCE IS NOT A FACT ABOUT THE PATTERN
The panel reports the measured-move hit rate NEXT TO the measured move's distance in R, because the first number is uninterpretable without the second.
On NIFTY futures, live:
Double bottom MM sits 0.6R away reached 73% of the time
Symmetric triangle MM sits 5.7R away reached 0% of the time
Those two rows say the SAME thing. A projection sitting half a unit of risk away being reached three times in four is not evidence that double bottoms work; a projection sitting nearly six units of risk away being reached never is not evidence that symmetric triangles fail. Report the hit rate alone and a reader will draw exactly the wrong conclusion from both.
It also explains a result that looks paradoxical at first: a double bottom can reach its textbook target 73% of the time and still LOSE money, because that target is worth about 0.6R and the trade is being held for 2R. The measured move being reached and the trade being profitable are different events. Almost nobody separates them. This script does.
HOW TO USE
1. A pattern is DETECTED when its fifth extremum confirms. It is not a trade yet.
2. It becomes a TRADE only when price TRIGGERS it: a boundary breaks. The engine never front-runs the pattern.
3. Read the per-pattern calibration BEFORE you weight any of it. A pattern with no proven edge on this instrument is a shape, not a probability.
4. Entry, stop, target and the R multiple are drawn. They are arithmetic, not advice.
BANDWIDTH is the one input that matters. Small = many small patterns; large = few large ones. There is no correct value. There is only the one whose patterns the calibration says work.
NON-REPAINT, AND THE HONEST COST OF IT
A centred kernel looks into the future. Lo, Mamaysky and Wang could use one because they were studying history. We cannot. So the smoother is evaluated only where the whole window already exists, which means an extremum is confirmed roughly one half-window AFTER it occurred, and a pattern therefore prints with that lag.
That lag is the price of not repainting, and it is paid deliberately. Any pattern tool that marks a head-and-shoulders the instant the head forms is either repainting or using a shorter window than it admits.
Everything — extrema, patterns, triggers, calibration — is computed on confirmed bars only.
WHAT IS DELIBERATELY ABSENT
FLAGS AND PENNANTS cannot be detected by this engine and are not faked. Their defining feature is a small consolidation after a sharp pole. Bulkowski puts a flag at a few days to three weeks and calls anything longer a rectangle. But the kernel smoother and the ATR prominence filter exist precisely to destroy small wiggles, and a flag's entire body is often under one ATR. To find flags you need pole detection and channel regression on raw price: a different engine. A pennant, in any case, IS a symmetric triangle that happens to follow a pole.
ELLIOTT WAVE is absent because it is not objectively definable. The wave count is degree-dependent and non-unique. Encoding it would test the encoding, not the theory, and reporting "no edge" against a definition its own proponents would disown is a strawman. This script attacks folklore by testing it fairly, or it does not attack it at all.
WHY THESE PARTS ARE ONE TOOL
A pattern without a smoother is a subjective drawing. A smoother without pattern rules is just a moving average. Rules without a measured target give you nothing to trade. A target without an entry, a stop and an R multiple is not a trade. And all of it, without a per-pattern calibration, is exactly the folklore this script was built to test. Remove any one piece and you have another pattern-drawing tool that asserts an edge it has never measured.
DATA AND SCOPE
Any symbol, any timeframe. ATR-normalised throughout. No volume required.
EXPORTS (Data Window — consume from other scripts via input.source())
EXP_Smooth, EXP_Pattern, EXP_Dir, EXP_Trigger, EXP_Entry, EXP_Stop, EXP_Target, EXP_RR, EXP_PatternEdge, EXP_TargetHitRate
CONCEPT CREDIT
The kernel-regression pattern-recognition algorithm and the core pattern definitions are from Andrew W. Lo, Harry Mamaysky and Jiang Wang, "Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation", Journal of Finance 55(4), 2000. The Nadaraya-Watson estimator is due to E. A. Nadaraya and G. S. Watson (1964). The patterns themselves long predate all of us; the modern written tradition runs through Edwards & Magee. The right-angled broadening formations, the broadening wedges, the ascending and descending triangles and the triple tops and bottoms are documented in Thomas Bulkowski, "Encyclopedia of Chart Patterns"; his published success rates are claims measured on US daily stocks, and testing them on YOUR instrument is the purpose of this tool. ATR — J. Welles Wilder. Triple-barrier forward labelling — Marcos Lopez de Prado. Welch's t-test — B. L. Welch.
The exhaustive peak/trough partition, the bilateral trigger, the sloping-boundary trigger, the per-pattern calibration, the measured-move test and the direction-matched control are the author's own. Clean-room implementation; no third-party Pine code is reused. Not affiliated with, nor endorsed by, any of the above.
HONESTY AND LIMITATIONS
Lo, Mamaysky and Wang's own conclusion deserves to be read before anyone trades this: several patterns DO carry incremental information, but patterns that are optimal for detecting statistical anomalies need not be optimal for indicating trading profits, and vice versa. A pattern can be statistically real and still not pay after costs.
Calibration here is IN-SAMPLE, with no costs or slippage, and uses overlapping windows. A proven in-sample edge is NOT a guarantee out-of-sample.
Pattern counts are small by nature. A rare pattern may never reach a usable sample size, and the panel will keep saying so — "thin", "warming" — rather than pretend. Nothing is marked PROVEN below t = 1.96 against the control, and nothing is rated at all below the minimum sample.
Entry is the CLOSE of the trigger bar, for the pattern and for the control alike. Entering at the boundary — a better price — while the control enters at the close would hand every pattern a free head start and manufacture an edge out of nothing.
When both barriers are touched on the same bar, the stop is assumed first. Unresolved trades at the horizon are marked to market rather than counted as wins.
A different bandwidth gives different patterns. If a pattern shows no edge, the honest conclusion is that it has none here. Nothing in this script predicts price.
DISCLAIMER
Research and educational tool only. Not financial advice, not a recommendation, and no guarantee of results. Entry, stop and target output is arithmetic, not advice. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use. Indicator

SMA8 Extension Zones (Points | % | ATR)SMA8 Extension Zones (Points • % • ATR)
This indicator plots dynamic extension zones around the 8-period Simple Moving Average (SMA8), helping traders identify when price is significantly stretched away from its short-term mean.
Unlike traditional volatility bands, this indicator offers three different calculation methods, allowing you to adapt the zones to your trading style or market conditions:
Points – Fixed point distances from the SMA (default: 8, 15 and 25 points).
Percentage – Relative distances based on the current SMA value (default: 0.15%, 0.20% and 0.35%).
ATR – Adaptive bands based on market volatility using the Average True Range.
Features
Dynamic SMA8 extension zones.
Three calculation modes: Points, Percentage, and ATR.
Fully customizable distance levels.
Customizable colors and transparency.
Designed primarily for SPX, but compatible with any instrument.
How to use
The indicator highlights two extension zones above the SMA and two below it:
Upper Zone 1
Upper Zone 2
Lower Zone 1
Lower Zone 2
These zones help visualize when price is becoming extended from its short-term average. Many traders use this information to identify potential mean reversion opportunities, profit-taking areas, or simply to evaluate whether the current move is unusually stretched.
This indicator does not generate buy or sell signals. It is intended as a market context tool and should be combined with price action, trend analysis, volume, volatility, and proper risk management.
Notes
No single distance model works best in every market condition:
Points provide consistent fixed levels.
Percentage automatically scales with the instrument's price.
ATR adapts the zones to current market volatility.
Choose the mode that best fits your trading methodology. Indicator

Indicator

Indicator

Indicator

PTHLC Previous Timeframe High, Low, and ClosePTHLC — Previous Timeframe High, Low, and Close
PTHLC is a multi-timeframe market-structure indicator that displays the previous completed candle’s high, low, and close from a user-selected timeframe.
Unlike standard previous-day indicators, PTHLC can be applied to intraday or higher timeframes, making it useful for tracking levels from the previous 15-minute, 1-hour, 4-hour, daily, or other selected candle.
Major Features
Previous Timeframe Levels
The indicator plots:
PTH — Previous Timeframe High
PTL — Previous Timeframe Low
PTC — Previous Timeframe Close
The levels are based on the previous fully completed candle to provide stable, non-repainting reference points.
Automatic Timeframe Adjustment
When the selected reference timeframe is lower than the chart timeframe, the indicator automatically uses the chart timeframe instead of producing an error.
This allows the script to remain active as traders move between chart timeframes.
Confirmed Breach Detection
PTH and PTL are considered breached only after price closes beyond the level.
A close above PTH confirms a high breach.
A close below PTL confirms a low breach.
Breached levels are visually distinguished from active levels.
Bullish and Bearish Retest Logic
After a confirmed breach, PTHLC tracks the first return to the level.
A retest that closes above the level is classified as Retest Bullish.
A retest that closes below the level is classified as Retest Bearish.
The line, label, and table status update to reflect the retest direction.
Directional Previous Close
PTC provides immediate directional context:
Bullish when price is above PTC
Bearish when price is below PTC
Neutral when price is at PTC
PTC logic remains separate from the breach and retest logic used for PTH and PTL.
What Makes PTHLC Unique
Most previous-level indicators only plot static support and resistance lines.
PTHLC adds a complete level-state framework:
Active → Breached → Bullish or Bearish Retest
This helps traders quickly identify whether a previous timeframe level is untouched, broken, successfully held, or rejected after a retest.
PTHLC is designed for traders who use multi-timeframe structure, liquidity levels, breakout confirmation, support-and-resistance flips, and retest-based directional bias.
This indicator is intended as a market-analysis tool and does not provide guaranteed trade signals. Indicator

INDICATORE MATRIX 4 STRATEGIE by Ferrini 2026 Rev 72 BisINDICATORE MATRIX 4 STRATEGIE by Ferrini 2026 - Rev 72 Bis
DescrizioneIndicatore avanzato di trading per crypto (ottimizzato per ETHUSDT.P) che combina 4 strategie in un unico strumento con dashboard informativa multi-timeframe.Funzionalità PrincipaliSegnali Long/Short con filtri multipli:Bollinger Bands, RSI, Stocastico, MomentumConferma trend EMA50/EMA200Analisi volume e ADXEntry ottimizzata su pullbackDashboard compatta 4 colonne con:Dati crypto esterni: BTC%, USDT.D%, Funding RateAnalisi multi-timeframe (5m, 15m, 60m)Trend strength, Volume, Support/ResistanceDistanza EMA50, RSI/ADX, CountdownAuto Trendlines automatiche (ultimi 2 pivot highs/lows)⚙️ Impostazioni ConsigliateTimeframe: 15m o 30mADX Minimo: 18 (filtra trend deboli)Min Layers: 4 (richiede confluenza)Pullback: 0.5 ATR su max 5 barre📌 Come UsarloAggiungi all'chart ETHUSDT.P (o altra crypto)Imposta timeframe 15m/30mEntra LONG su triangolo verde, SHORT su triangolo rossoVerifica allineamento dashboard (tutti i TF nello stesso senso)Usa i dati BTC/USDT.D per confermare il contesto di mercato⚠️ DisclaimerQuesto indicatore è fornito a scopo educativo. Non costituisce consulenza finanziaria. Il trading di criptovalute comporta rischi significativi. Testa sempre in demo prima di operare con capitale reale.
Autore: Ferrini 2026
Versione: Rev 72 Bis
MATRIX INDICATOR 4 STRATEGIES by Ferrini 2026 - Rev 72 Bis
Description Advanced crypto trading indicator (optimized for ETHUSDT.P) that combines 4 strategies in a single tool with multi-timeframe information dashboard. Main Features Long/Short signals with multiple filters: Bollinger Bands, RSI, Stochastic, Momentum EMA50/EMA200 trend confirmation Volume and ADX analysis Optimized entry on pullback Compact 4-column dashboard with: External crypto data: BTC%, USDT.D%, Funding Rate Multi-timeframe analysis (5m, 15m, 60m) Trend strength, Volume, Support/Resistance EMA50 distance, RSI/ADX, Countdown Automatic Trendlines (last 2 pivot highs/lows) ⚙️ Recommended Settings Timeframe: 15m or 30m ADX Minimum: 18 (filters weak trends) Min Layers: 4 (requires confluence) Pullback: 0.5 ATR on max 5 bars 📌 How to Use It Add ETHUSDT.P (or other cryptocurrency) to the chart Set the timeframe to 15m/30m Go LONG on the green triangle, SHORT on the red triangle Check dashboard alignment (all TFs in the same direction) Use BTC/USDT.D data to confirm the market context Disclaimer This indicator is provided for educational purposes. It does not constitute financial advice. Cryptocurrency trading involves significant risks. Always test on demo before trading with real capital. Author: Ferrini 2026
Version: Rev 72 Bis
Language: Pine Script v6 Indicator
