Leonid's Bitcoin Macro & Liquidity Regime Tracker🧠 Macro Overlay Score (Bitcoin Liquidity Regime Tracker)
This indicator combines the most important macroeconomic and on-chain inputs into a single unified score to help investors identify Bitcoin’s long-term cycle phases. Each input is normalized into a 0–100 score and blended using configurable weights to generate a dynamic, forward-looking macro regime tracker.
✅ Best used on the **Bitcoin All Time History Index with Weekly resolution** (`INDEX:BTCUSD`) for maximum historical context and signal clarity.
---
📈 Why Macro?
Macro liquidity conditions — interest rates, monetary expansion, dollar strength, credit risk — drive Bitcoin cycles . Risk assets like BTC thrive during periods of:
Monetary easing
Liquidity injections
Expansionary central bank policy
This overlay surfaces those periods *before* price follows. It captures cycle shifts in the business cycle, monetary policy, and investor sentiment — making it ideal for long-term allocators, macro-aligned investors, and cycle-focused BTC holders.
🔔 This is **not** designed for short-term or swing trading. It is optimized for **macro trend confirmation and regime awareness** — not fast entry/exit signals.
---
🔍 What It Tracks
Macro Inputs:
- 🏭 ISM 3M Trend (Business Cycle)
- 💹 CPI YoY (Inverted Inflation)
- 💵 M2 YoY + M2 Acceleration
- 🇨🇳 China M2 (Global Liquidity)
- 💱 DXY 3M Trend (USD Strength)
- 🏦 TGA & RRP YoY (Treasury / MMF Flows)
- 🏛 Fed Balance Sheet (WALCL)
- 💳 High Yield Spread (Credit Conditions)
- 💧 Net Liquidity Composite = WALCL – TGA – RRP
On-Chain Inputs:
- ⚠️ MVRV Ratio (Valuation Cycles)
- 🚀 Mayer Multiple Acceleration (200DMA Momentum)
---
🧩 How It Works
Each input is:
Normalized to a 0–100 score
Weighted by importance (fully configurable)
Combined into a **composite Macro Score**, then normalized across history
The chart will display:
🔷 A 0–100 **Macro Score Line**
🧭 **Cycle Phase classification**: Accumulation, Expansion, Distribution, Capitulation
📊 Optional **debug table** with all sub-scores
---
🧠 Interpreting the Signal
| Signal Type | Meaning |
|-------------------|---------------------------------------------|
| Macro Score ↑ | Liquidity improving → Bullish regime forming |
| Macro Score ↓ | Liquidity deteriorating → Caution warranted |
| Score < 40 & Rising | 🔵 Accumulation cycle likely beginning |
| Score > 70 & Falling | 🟡 Distribution / Macro exhaustion |
| Net Liquidity ↑ | Strong driver of BTC upside historically |
---
❓ FAQ
Q: Why did the Macro Score peak in March 2021, but Bitcoin topped in November?
> The indicator reflects **macro liquidity**, not price momentum. M2 growth slowed, DXY bottomed, and the Fed stopped expanding WALCL by Q1 2021 — all signs of macro exhaustion. BTC continued on **residual momentum**, but the smart money began exiting months earlier.
Q: What does the score range mean?
- 0–25 : Tight liquidity, unfavorable conditions
- 50 : Neutral environment
- 75–100 : Strong easing, liquidity surge
Q: Is this good for short-term signals?
> No. This is a **macro-level overlay**, best used for 3–12 month context shifts, not day trades.
Q: Can I adjust the weights?
> Yes. You can tune the influence of each input to match your thesis (e.g., overweight on-chain, or global liquidity).
Q: Do I need special data access?
> No. All symbols are public TradingView datasets (FRED, CryptoCap, etc.). Just use this on a BTC chart like `BTCUSD`.
---
✅ How to Use
- Load on **`INDEX:BTCUSD`**, set to **Weekly timeframe**
- Confirm long-term bottoms when score is low and rising (Accumulation → Expansion)
- Watch for tops when score is high and falling (Distribution → Capitulation)
- Combine with price structure, realized profit/loss, and market sentiment
---
🚀 If you're serious about understanding Bitcoin's macro regime, this is your alpha map. Share it, clone it, and build on it.
指標和策略
[Tradevietstock] Fair Value Channel – Premium/Discount ZonesThe Ultimate Tool for Value Traders
Fair Value Channel – Premium/Discount Zones (Polynomial Regression)
Hello again, it’s Tradevietstock ,
This time, we’re introducing a powerful long-term tool for value investors and swing traders — a visual framework that answers one key question:
i. Overview
1. 🧠 Logic Behind the Script
This script creates a Fair Value Channel using polynomial regression to model the upper and lower bounds of a stock's expected price range. The core idea is to estimate "fair value" zones that indicate whether the current price is at a premium (overvalued) or discount (undervalued) relative to its historical range.
The script uses fixed coefficients for third-degree (cubic) polynomial equations to define a top channel and bottom channel, then scales and shifts these curves to match the actual price data. Intermediate levels (25%, 50%, 75%) are calculated using geometric interpolation, offering a graded assessment of price positioning within the channel.
2. The Trading Theory
This indicator is based on the idea that markets move in repeatable cycles of overvaluation and undervaluation. Rather than relying on instinct to judge whether an asset is “cheap” or “expensive,” it uses mathematical modeling — specifically, a fixed third-degree polynomial regression — to identify structured price patterns over time. This regression captures the natural wave-like behavior of prices and defines a fair value channel, with upper and lower bounds representing premium and discount zones.
The lower zone signals undervalued conditions, ideal for accumulating positions, while the upper zone reflects overvalued areas, where it may be time to reduce exposure. These zones are scaled to align with the asset’s real price range, making them practical and adaptive.
Ultimately, the indicator brings logic and discipline to value investing. It helps traders recognize favorable buying opportunities within a cycle — and hold until the next major uptrend, instead of reacting emotionally. The strategy: buy low, hold smart, sell high — driven by data, not guesswork.
ii. How to use
1. Key terms
Lookback_period : Sets the historical period used to calculate the highest and lowest prices. Determines whether the analysis is short-term, mid-term, or long-term.
Timeframe_input : Specifies the timeframe used for polynomial regression calculations. Higher timeframes smooth out noise.
Extrapolation_bars : Defines how many bars into the future the fair value channel should be projected (forecasted). Helps visualize future zones.
Show_forecast : Enables or disables the display of forecasted (future) evaluation zones based on extrapolated regression curves.
🎯 Evaluation Zones Based on Fair Value Range
Each of these zones represents a valuation level relative to a stock's or asset's estimated fair value. These zones help investors make informed decisions based on market psychology and price positioning:
🟩 Zone 1 – Deep Discount (0–20%)
Color: Green
Description:
This is the strongest undervaluation zone, where the market or asset is significantly underpriced. It typically reflects extreme fear and pessimism among investors.
A great opportunity for long-term investors to accumulate high-potential assets at bargain prices.
For example, Tesla (TSLA) stock dropped into the Deep Discount Zone in 2019, offering an exceptional entry point. By 2020, the stock had surged approximately 430%, illustrating how powerful the recovery can be from this zone.
The Deep Discount Zone often appears only during recessionary periods or times of extreme market fear, making it one of the best opportunities to accumulate high-quality stocks.
However, due to the elevated risks and uncertainty in such conditions, it’s crucial to prioritize risk management and approach this zone with a mid- to long-term investment mindset, rather than seeking short-term gains.
🟩 Zone 2 – Undervalued (20–40%)
Color: Lime
Description:
Still considered a strong buying opportunity, this zone offers assets at meaningful discounts. While not as deeply undervalued as Zone 1, it remains attractive for value-seeking investors.
For example, Netflix (NFLX) stock experienced a sharp decline of nearly 80% in 2011, pushing it into the Undervalued Zone. This presented a prime buying opportunity for long-term investors.
After a period of consolidation, NFLX surged over 500% by 2013, demonstrating how deeply discounted zones can signal powerful reversal and growth potential when backed by strong fundamentals.
🟨 Zone 3 – Fair Value (40–60%)
Color: Yellow
Description:
This zone represents the true fair value range. Many high-growth or in-demand assets may only dip this low due to market optimism. Buying in this zone can still be wise—especially for fundamentally strong stocks or tokens—depending on broader conditions and expectations.
For example, Apple stock has historically never fallen below the Fair Value Zone, largely due to the company’s strong core values, resilient business model, and consistent performance. Whether a stock dips further into undervalued zones often depends on its intrinsic fundamentals and long-term growth potential.
Likewise, NVDA stock has only dipped into the Fair Value Zone, but not deeper, due to the company’s strong fundamentals and high growth potential.
🟧 Zone 4 – Overvalued (60–80%)
Color: Orange
Description:
In this range, prices are becoming expensive. This is generally a time to pause further buying and begin looking for potential exit or profit-taking opportunities.
Despite potential continued upside, staying disciplined here is key, as price increases may be driven more by speculation than fundamentals.
🟥 Zone 5 – Extended Premium (80–100%)
Color: Red
Description:
This is the extreme overvaluation zone, often driven by market euphoria, FOMO (Fear of Missing Out), and greed.
Avoid buying in this range. Instead, focus on exiting positions and securing profits. Risk of a reversal is high.
2. How to Use?
This indicator is not designed for short-term trading. Instead, it supports a value investing mindset, applicable across various financial instruments—including stocks, indices, tokens, and CFDs.
Investing based on fair value means focusing on the intrinsic worth of an asset and holding through market cycles—from fear to euphoria.
The goal is to accumulate positions during Deep Discount Zones (often during extreme fear or recession) and hold them patiently until the market reaches the FOMO and Extreme Greed stages.
At that point, those who bought during deep discounts become the true winners, having captured both value and long-term upside.
Trading Tutorial
The strategy is simple: Buy cheap, sell high.
Note:
Discount zones are based on the historical price behavior of each asset.
A strong stock may never drop into the lowest zones, while some tokens/indices/stocks might reach the Deep Discount Zone and still dip further before recovering.
Always analyze the asset’s history—does it usually bounce from the Fair Value Zone, or does it often fall deeper before reversing?
Your strategy should adapt to the specific behavior of the stock, token, or index you're trading.
This indicator works with stocks, crypto, indices, and CFDs.
You can adjust any input settings to match your own strategy and risk tolerance, as long as you understand what you're doing.
Supply In Profit Z-Score | Vistula LabsOverview
The Supply In Profit Z-Score indicator is a Pine Script™ tool developed by Vistula Labs for technical analysis of cryptocurrencies, specifically Bitcoin (BTC) and Ethereum (ETH). It utilizes on-chain data from IntoTheBlock to calculate the difference between the percentage of addresses in profit and those in loss, transforming this metric into a Z-Score. This indicator helps traders identify market sentiment, trend-following opportunities, and overbought or oversold conditions.
What is Supply In Profit?
Supply In Profit is defined as the net difference between the percentage of addresses in profit and those in loss:
Profit Percentage: The proportion of addresses where the current value of holdings exceeds the acquisition price.
Loss Percentage: The proportion of addresses where the current value is below the acquisition price.
A positive value indicates more addresses are in profit, suggesting bullish sentiment, while a negative value indicates widespread losses, hinting at bearish sentiment.
How It Works
The indicator computes a Z-Score to normalize the Supply In Profit data relative to its historical behavior:
Z-Score = (Current Supply In Profit - Moving Average of Supply In Profit) / Standard Deviation of Supply In Profit
Current Supply In Profit: The latest profit-minus-loss percentage.
Moving Average: A customizable average (e.g., EMA, SMA) over a default 180-bar period.
Standard Deviation: Calculated over a default 200-bar lookback period.
Key Features
Data Source:
Selectable between BTC and ETH, pulling daily profit/loss percentage data from IntoTheBlock.
Customization:
Moving Average Type: Options include SMA, EMA, DEMA, RMA, WMA, or VWMA (default: EMA).
Moving Average Length: Default is 180 bars.
Z-Score Lookback: Default is 200 bars.
Thresholds: Adjustable for long/short signals and overbought/oversold levels.
Signals:
Long Signal: Z-Score crosses above the Long Threshold (default: 1.0).
Short Signal: Z-Score crosses below the Short Threshold (default: -0.64).
Overbought/Oversold Conditions:
Overbought: Z-Score > 3.0.
Oversold: Z-Score < -2.0.
Visualizations:
Z-Score Plot: Teal for long signals, magenta for short signals.
Threshold Lines: Dashed lines for long/short, solid lines for overbought/oversold.
Candlestick Coloring: Matches signal colors (teal/magenta).
Arrows: Green up-triangles for long entries, red down-triangles for short entries.
Background Colors: Magenta for overbought, teal for oversold.
Alerts:
Conditions for Long Opportunity, Short Opportunity, Overbought, and Oversold.
Usage Guide
Trend Following
Long Entry: When Z-Score crosses above 1.0, indicating potential upward momentum.
Short Entry: When Z-Score crosses below -0.64, suggesting potential downward momentum.
Overbought/Oversold Analysis
Overbought (Z-Score > 3.0): Consider profit-taking or preparing for a reversal.
Oversold (Z-Score < -2.0): Look for buying opportunities or exiting shorts.
Timeframe
Uses daily IntoTheBlock data, ideal for medium to long-term analysis.
Interpretation
High Z-Score: Indicates Supply In Profit is significantly above its historical mean, potentially signaling overvaluation.
Low Z-Score: Suggests Supply In Profit is below its mean, indicating possible undervaluation.
Signals and thresholds help traders act on shifts in market sentiment or extreme conditions.
Conclusion
The Supply In Profit Z-Score indicator provides a robust, data-driven approach to analyzing cryptocurrency market trends and sentiment. By combining on-chain metrics with statistical normalization, it empowers traders to make informed decisions based on historical context and current market dynamics.
Multi-MA Trend & ATR Band CloudsMulti-MA Trend & ATR Band Clouds
Overview:
Originally designed for scalpers, this indicator provides a detailed and adaptable view of market structure, making it equally effective across all timeframes — from 1-minute charts to daily analysis. It integrates flexible moving average configurations with ATR-based cloud bands for real-time trend and volatility assessment.
Key Features:
Up to 10 customizable moving averages – Select from SMA, EMA, WMA, SMMA, GMA, or hybrid combinations. Each moving average can be individually styled and displayed.
Global trend condition system – Trend direction is determined by a user-defined crossover between two MAs, applied uniformly across all major timeframes (M1 to D1).
Multi-layer ATR-based volatility bands – Three levels of ATR bands are drawn around a base MA, offering insight into dynamic support/resistance and volatility zones.
Fully configurable visual output – Customize opacity, cloud display, curve visibility, and color schemes to fit your charting needs.
Use Cases:
Scalping: Fast trend shift detection and volatility mapping
Intraday trading: Multi-timeframe confirmation and structure tracking
Swing trading: Broader trend and support/resistance zone visualization
Signal development: Create visual or algorithmic confluence systems
Recommended For:
Scalpers, intraday traders, and analysts seeking a structured, real-time view of market dynamics, with flexible parameters and broad applicability.
Time-Based Fair Value Gaps (FVG) with Inversions (iFVG)Overview
The Time-Based Fair Value Gaps (FVG) with Inversions (iFVG) (ICT/SMT) indicator is a specialized tool designed for traders using Inner Circle Trader (ICT) methodologies. Inspired by LuxAlgo's Fair Value Gap indicator, this script introduces significant enhancements by integrating ICT principles, focusing on precise time-based FVG detection, inversion tracking, and retest signals tailored for institutional trading strategies. Unlike LuxAlgo’s general FVG approach, this indicator filters FVGs within customizable 10-minute windows aligned with ICT’s macro timeframes and incorporates ICT-specific concepts like mitigation, liquidity grabs, and session-based gap prioritization.
This tool is optimized for 1–5 minute charts, though probably best for 1 minute charts, identifying bullish and bearish FVGs, tracking their mitigation into inverted FVGs (iFVGs) as key support/resistance zones, and generating retest signals with customizable “Close” or “Wick” confirmation. Features like ATR-based filtering, optional FVG labels, mitigation removal, and session-specific FVG detection (e.g., first FVG in AM/PM sessions) make it a powerful tool for ICT traders.
Originality and Improvements
While inspired by LuxAlgo’s FVG indicator (credit to LuxAlgo for their foundational work), this script significantly extends the original concept by:
1. Time-Based FVG Detection: Unlike LuxAlgo’s continuous FVG identification, this script filters FVGs within user-defined 10-minute windows each hour (:00–:10, :10–:20, etc.), aligning with ICT’s emphasis on specific periods of institutional activity, such as hourly opens/closes or kill zones (e.g., New York 7:00–11:00 AM EST). This ensures FVGs are relevant to high-probability ICT setups.
2. Session-Specific First FVG Option: A unique feature allows traders to display only the first FVG in ICT-defined AM (9:30–10:00 AM EST) or PM (1:30–2:00 PM EST) sessions, reflecting ICT’s focus on initial market imbalances during key liquidity events.
3. ICT-Driven Mitigation and Inversion Logic: The script tracks FVG mitigation (when price closes through a gap) and converts mitigated FVGs into iFVGs, which serve as ICT-style support/resistance zones. This aligns with ICT’s view that mitigated gaps become critical reversal points, unlike LuxAlgo’s simpler gap display.
4. Customizable Retest Signals: Retest signals for iFVGs are configurable for “Close” (conservative, requiring candle body confirmation) or “Wick” (faster, using highs/lows), catering to ICT traders’ need for precise entry timing during liquidity grabs or Judas swings.
5. ATR Filtering and Mitigation Removal: An optional ATR filter ensures only significant FVGs are displayed, reducing noise, while mitigation removal declutters the chart by removing filled gaps, aligning with ICT’s principle that mitigated gaps lose relevance unless inverted.
6. Timezone and Timeframe Safeguards: A timezone offset setting aligns FVG detection with EST for ICT’s New York-centric strategies, and a timeframe warning alerts users to avoid ≥1-hour charts, ensuring accuracy in time-based filtering.
These enhancements make the script a distinct tool that builds on LuxAlgo’s foundation while offering ICT traders a tailored, high-precision solution.
How It Works
FVG Detection
FVGs are identified when a candle’s low is higher than the high of two candles prior (bullish FVG) or a candle’s high is lower than the low of two candles prior (bearish FVG). Detection is restricted to:
• User-selected 10-minute windows (e.g., :00–:10, :50–:60) to capture ICT-relevant periods like hourly transitions.
• AM/PM session first FVGs (if enabled), focusing on 9:30–10:00 AM or 1:30–2:00 PM EST for key market opens.
An optional ATR filter (default: 0.25× ATR) ensures only gaps larger than the threshold are displayed, prioritizing significant imbalances.
Mitigation and Inversion
When price closes through an FVG (e.g., below a bullish FVG’s bottom), the FVG is mitigated and becomes an iFVG, plotted as a support/resistance zone. iFVGs are critical in ICT for identifying reversal points where institutional orders accumulate.
Retest Signals
The script generates signals when price retests an iFVG:
• Close: Triggers when the candle body confirms the retest (conservative, lower noise).
• Wick: Triggers when the candle’s high/low touches the iFVG (faster, higher sensitivity). Signals are visualized with triangular markers (▲ for bullish, ▼ for bearish) and can trigger alerts.
Visualization
• FVGs: Displayed as colored boxes (green for bullish, red for bearish) with optional “Bull FVG”/“Bear FVG” labels.
• iFVGs: Shown as extended boxes with dashed midlines, limited to the user-defined number of recent zones (default: 5).
• Mitigation Removal: Mitigated FVGs/iFVGs are removed (if enabled) to keep the chart clean.
How to Use
Recommended Settings
• Timeframe: Use 1–5 minute charts for precision, avoiding ≥1-hour timeframes (a warning label appears if misconfigured).
• Time Windows: Enable :00–:10 and :50–:60 for hourly open/close FVGs, or use the “Show only 1st presented FVG” option for AM/PM session focus.
• ATR Filter: Keep enabled (multiplier 0.25–0.5) for significant gaps; disable on 1-minute charts for more FVGs during volatility.
• Signal Preference: Use “Close” for conservative entries, “Wick” for aggressive setups.
• Timezone Offset: Set to -5 for EST (or -4 for EDT) to align with ICT’s New York session.
Trading Strategy
1. Macro Timeframes: Focus on New York (7:00–11:00 AM EST) or London (2:00–5:00 AM EST) kill zones for high institutional activity.
2. FVG Entries: Trade bullish FVGs as support in uptrends or bearish FVGs as resistance in downtrends, especially in :00–:10 or :50–:60 windows.
3. iFVG Retests: Enter on retest signals (▲/▼) during liquidity grabs or Judas swings, using “Close” for confirmation or “Wick” for speed.
4. Session FVGs: Use the “Show only 1st presented FVG” option to target the first gap in AM/PM sessions, often tied to ICT’s market maker algorithms.
5. Risk Management: Combine with ICT concepts like order blocks or breaker blocks for confluence, and set stops beyond FVG/iFVG boundaries.
Alerts
Set alerts for:
• “Bullish FVG Detected”/“Bearish FVG Detected”: New FVGs in selected windows.
• “Bullish Signal”/“Bearish Signal”: iFVG retest confirmations.
Settings Description
• Show Last (1–100, default: 5): Number of recent iFVGs to display. Lower values reduce clutter.
• Show only 1st presented FVG : Limits FVGs to the first in 9:30–10:00 AM or 1:30–2:00 PM EST sessions (overrides time window checkboxes).
• Time Window Checkboxes: Enable/disable FVG detection in 10-minute windows (:00–:10, :10–:20, etc.). All enabled by default.
• Signal Preference: “Close” (default) or “Wick” for iFVG retest signals.
• Use ATR Filter: Enables ATR-based size filtering (default: true).
• ATR Multiplier (0–∞, default: 0.25): Sets FVG size threshold (higher values = larger gaps).
• Remove Mitigated FVGs: Removes filled FVGs/iFVGs (default: true).
• Show FVG Labels: Displays “Bull FVG”/“Bear FVG” labels (default: true).
• Timezone Offset (-12 to 12, default: -5): Aligns time windows with EST.
• Colors: Customize bullish (green), bearish (red), and midline (gray) colors.
Why Use This Indicator?
This indicator empowers ICT traders with a tool that goes beyond generic FVG detection, offering precise, time-filtered gaps and inversion tracking aligned with institutional trading principles. By focusing on ICT’s macro timeframes, session-specific imbalances, and customizable signal logic, it provides a clear edge for scalping, swing trading, or reversal setups in high-liquidity markets.
Strong Trend Bars (ATR-based)This is a ChatGPT pinescript meant as an indicator for detecting strength in the market. The primary function I use it for is to decide which bars to trail a stop loss beneath.
💥 Explanation of adjustable inputs:
Bull Close Threshold (default 0.6):
If set to 0.6, bull bars must close above 60% of bar height → low + 0.6 * barHeight
Bear Close Threshold (default 0.6):
If set to 0.6, bear bars must close below 40% of bar height → high - 0.6 * barHeight
This lets you experiment with tighter or looser filters. For example:
0.7 → only bars closing near the extremes will light up
0.5 → about midpoint
0.8 → very demanding, “almost full body” bars
MC High/LowMC High/Low is a minimalist precision tool designed to show traders the most critical price levels — the High and Low of the current Day and Week — in real-time, without any visual clutter or historical trails.
It automatically tracks:
🔼 HOD – High of Day
🔽 LOD – Low of Day
📈 HOW – High of Week
📉 LOW – Low of Week
Each level is plotted using simple black horizontal lines, updated dynamically as the session evolves. Labels are clearly marked and positioned to the right of the screen for easy reference.
There’s no trailing history, no background colors, and no distractions — just pure price structure for clean confluence.
Perfect for:
Intraday scalpers
Swing traders
Liquidity & range traders
This is a tool built for sniper-level execution — straight from the MadCharts mindset.
🛠 Created by:
🔒 Version: Public Release
🎯 Use this with your favorite price action, liquidity, or market structure strategies.
Pivot Candle PatternsPivot Candle Patterns Indicator
Overview
The PivotCandlePatterns indicator is a sophisticated trading tool that identifies high-probability candlestick patterns at market pivot points. By combining Williams fractals pivot detection with advanced candlestick pattern recognition, this indicator targets the specific patterns that statistically show the highest likelihood of signaling reversals at market tops and bottoms.
Scientific Foundation
The indicator is built on extensive statistical analysis of historical price data using a 42-period Williams fractal lookback period. Our research analyzed which candlestick patterns most frequently appear at genuine market reversal points, quantifying their occurrence rates and subsequent success in predicting reversals.
Key Research Findings:
At Market Tops (Pivot Highs):
- Three White Soldiers: 28.3% occurrence rate
- Spinning Tops: 13.9% occurrence rate
- Inverted Hammers: 11.7% occurrence rate
At Market Bottoms (Pivot Lows):
- Three Black Crows: 28.4% occurrence rate
- Hammers: 13.3% occurrence rate
- Spinning Tops: 13.1% occurrence rate
How It Works
1. Pivot Point Detection
The indicator uses a non-repainting implementation of Williams fractals to identify potential market turning points:
- A pivot high is confirmed when the middle candle's high is higher than surrounding candles within the lookback period
- A pivot low is confirmed when the middle candle's low is lower than surrounding candles within the lookback period
- The default lookback period is 2 candles (user adjustable from 1-10)
2. Candlestick Pattern Recognition
At identified pivot points, the indicator analyzes candle properties using these parameters:
- Body percentage threshold for Spinning Tops: 40% (adjustable from 10-60%)
- Shadow percentage threshold for Hammer patterns: 60% (adjustable from 40-80%)
- Maximum upper shadow for Hammer: 10% (adjustable from 5-20%)
- Maximum lower shadow for Inverted Hammer: 10% (adjustable from 5-20%)
3. Pattern Definitions
The indicator recognizes these specific patterns:
Single-Candle Patterns:
- Spinning Top : Small body (< 40% of total range) with significant upper and lower shadows (> 25% each)
- Hammer : Small body (< 40%), very long lower shadow (> 60%), minimal upper shadow (< 10%), closing price above opening price
- Inverted Hammer : Small body (< 40%), very long upper shadow (> 60%), minimal lower shadow (< 10%)
Multi-Candle Patterns:
- Three White Soldiers : Three consecutive bullish candles, each closing higher than the previous, with each open within the previous candle's body
- Three Black Crows : Three consecutive bearish candles, each closing lower than the previous, with each open within the previous candle's body
4. Visual Representation
The indicator provides multiple visualization options:
- Highlighted candle backgrounds for pattern identification
- Text or dot labels showing pattern names and success rates
- Customizable colors for different pattern types
- Real-time alert functionality on pattern detection
- Information dashboard displaying pattern statistics
Why It Works
1. Statistical Edge
Unlike traditional candlestick pattern indicators that simply identify patterns regardless of context, PivotCandlePatterns focuses exclusively on patterns occurring at statistical pivot points, dramatically increasing signal quality.
2. Non-Repainting Design
The pivot detection algorithm only uses confirmed data, ensuring the indicator doesn't repaint or provide false signals that disappear on subsequent candles.
3. Complementary Pattern Selection
The selected patterns have both:
- Statistical significance (high frequency at pivots)
- Logical market psychology (reflecting institutional supply/demand changes)
For example, Three White Soldiers at a pivot high suggests excessive bullish sentiment reaching exhaustion, while Hammers at pivot lows indicate rejection of lower prices and potential buying pressure.
Practical Applications
1. Reversal Trading
The primary use is identifying potential market reversals with statistical probability metrics. Higher percentage patterns (like Three White Soldiers at 28.3%) warrant more attention than lower probability patterns.
2. Confirmation Tool
The indicator works well when combined with other technical analysis methods:
- Support/resistance levels
- Trend line breaks
- Divergences on oscillators
- Volume analysis
3. Risk Management
The built-in success rate metrics help traders properly size positions based on historical pattern reliability. The displayed percentages reflect the probability of the pattern successfully predicting a reversal.
Optimized Settings
Based on extensive testing, the default parameters (Body: 40%, Shadow: 60%, Shadow Maximums: 10%, Lookback: 2) provide the optimal balance between:
- Signal frequency
- False positive reduction
- Early entry opportunities
- Pattern clarity
Users can adjust these parameters based on their timeframe and trading style, but the defaults represent the statistically optimal configuration.
Complementary Research: Reclaim Analysis
Additional research on "reclaim" scenarios (where price briefly breaks a level before returning) showed:
- Fast reclaims (1-2 candles) have 70-90% success rates
- Reclaims with increasing volume have 53.1% success rate vs. decreasing volume at 22.6%
This complementary research reinforces the importance of candle patterns and timing at critical market levels.
21 EMA + VWAP Trend Bias
21 EMA + VWAP Trend Bias
This indicator combines the 21-period Exponential Moving Average (EMA) and the Volume-Weighted Average Price (VWAP) to provide a simple yet effective visual trend bias tool.
🔍 Core Features:
21 EMA Line (Orange): Tracks the short-to-mid-term price trend.
VWAP Line (Blue): Reflects the average trading price, weighted by volume, often used by institutional traders.
Trend Bias Highlight:
Green Background: Bullish bias — price is above both the 21 EMA and VWAP.
Red Background: Bearish bias — price is below both the 21 EMA and VWAP.
No Background: Neutral or mixed signals.
⚙️ Use Cases:
Quickly assess market trend direction at a glance.
Confirm entry or exit signals with dual-layer trend validation.
Great for intraday and swing traders who value clean, unobtrusive chart setups.
Best SMA FinderThis script, Best SMA Finder, is a tool designed to identify the most robust simple moving average (SMA) length for a given chart, based on historical backtest performance. It evaluates hundreds of SMA values (from 10 to 1000) and selects the one that provides the best balance between profitability, consistency, and trade frequency.
What it does:
The script performs individual backtests for each SMA length using either "Long Only" or "Buy & Sell" logic, as selected by the user. For each tested SMA, it computes:
- Total number of trades
- Profit Factor (total profits / total losses)
- Win Rate
- A composite Robustness Score, which integrates Profit Factor, number of trades (log-scaled), and win rate.
Only SMA configurations that meet the user-defined minimum trade count are considered valid. Among all valid candidates, the script selects the SMA length with the highest robustness score and plots it on the chart.
How to use it:
- Choose the strategy type: "Long Only" or "Buy & Sell"
- Set the minimum trade count to filter out statistically irrelevant results
- Enable or disable the summary stats table (default: enabled)
The selected optimal SMA is plotted on the chart in blue. The optional table in the top-right corner shows the corresponding SMA length, trade count, Profit Factor, Win Rate, and Robustness Score for transparency.
Key Features:
- Exhaustive SMA optimization across 991 values
- Customizable trade direction and minimum trade filters
- In-chart visualization of results via table and plotted optimal SMA
- Uses a custom robustness formula to rank SMA lengths
Use cases:
Ideal for traders who want to backtest and auto-select a historically effective SMA without manual trial-and-error. Useful for swing and trend-following strategies across different timeframes.
📌 Limitations:
- Not a full trading strategy with position sizing or stop-loss logic
- Only one entry per direction at a time is allowed
- Designed for exploration and optimization, not as a ready-to-trade system
This script is open-source and built entirely from original code and logic. It does not replicate any closed-source script or reuse significant external open-source components.
Aggressive Volume 📊 Indicator: Aggressive Volume – Simulated Buy/Sell Pressure
Aggressive Volume estimates delta volume using candle data to simulate the market’s internal buy/sell pressure. It helps visualize how aggressive buyers or sellers are moving the price without needing full order flow access.
⚙️ How It Works:
Calculates simulated delta volume based on candle direction and volume.
Bullish candles (close > open) suggest dominance by buyers.
Bearish candles (close < open) suggest dominance by sellers.
Delta is the difference between simulated buying and selling pressure.
🔍 Key Features:
Visual bars showing aggressive buyer vs seller dominance
Helps spot trend strength, momentum bursts, and potential reversals
Simple, effective, and compatible with any timeframe
Lightweight and ideal for scalping, day trading, and swing trading
💡 How to Use:
Look for strong positive delta during bullish trends for confirmation.
Watch for delta weakening or divergence as potential reversal signals.
Combine with trend indicators or price action for enhanced accuracy.
📊 Indicador: Volume Agressivo – Pressão de Compra/Venda Simulada
Volume Agressivo estima o delta de volume utilizando dados dos candles para simular a pressão interna de compra/venda do mercado. Ele ajuda a visualizar como os compradores ou vendedores agressivos estão movendo o preço, sem precisar de acesso completo ao fluxo de ordens.
⚙️ Como Funciona:
Calcula o delta de volume simulado com base na direção do candle e no volume.
Candles de alta (fechamento > abertura) indicam predominância de compradores.
Candles de baixa (fechamento < abertura) indicam predominância de vendedores.
O delta é a diferença entre a pressão de compra e venda simulada.
🔍 Principais Funcionalidades:
Barras visuais mostrando a dominância de compradores vs vendedores agressivos
Ajuda a identificar a força da tendência, explosões de momentum e possíveis reversões
Simples, eficaz e compatível com qualquer período de tempo
Leve e ideal para scalping, day trading e swing trading
💡 Como Usar:
Procure por delta positivo forte durante tendências de alta para confirmação.
Observe o delta enfraquecendo ou divergências como sinais de possível reversão.
Combine com indicadores de tendência ou price action para maior precisão.
Gaps EnhancedThis advanced gap detection tool identifies and visualizes price gaps on trading charts, helping traders spot potential support/resistance levels and trading opportunities.
🔲 Components and Features
Visual gap boxes with directional coloring
Dynamic labels showing key price levels
Smart sorting of nearest gaps
Customizable appearance
Key Features
Gap Visualization
Colored boxes (orange for support, green for resistance)
Dashed lines marking gap boundaries
Right-aligned price labels
Smart Gap Table
Shows 5 most relevant open gaps
Sorted by proximity to current price
Displays required move percentage to fill each gap
Customization Options
Adjustable gap size threshold
Color customization
Label positioning controls
Table location settings
How To Use
Basic Interpretation
Orange boxes: Price gaped up might come back (support zones)
Green boxes: Price gaped down price might come back to close the gap (resistance zones)
The table shows how much the price needs to move to fill each gap (as percentage)
Trading Applications
Look for price reactions near gap levels
Trade bounces off support/resistance gaps
Watch for gap fills as potential trend continuation signals
Use nearest gaps as profit targets
Settings Guide
Minimal Deviation: Set minimum gap size
Max Number of Gaps: Limits how many gaps are tracked
Visual Settings: Customize colors and label positions
Table Position: Choose where the info table appears
Pro Tips
Combine with other indicators for confirmation
Watch for volume spikes at gap levels
Larger gaps often act as stronger S/R
Breadth Thrust PRO by Martin E. ZweigThe Breadth Thrust Indicator was developed by Martin E. Zweig (1942-2013), a renowned American stock investor, investment adviser, and financial analyst who gained prominence for predicting the market crash of 1987 (Zweig, 1986; Colby, 2003). Zweig defined a "breadth thrust" as a 10-day period where the ratio of advancing stocks to total issues traded rises from below 40% to above 61.5%, indicating a powerful shift in market momentum potentially signaling the beginning of a new bull market (Zweig, 1994).
Methodology
The Breadth Thrust Indicator measures market momentum by analyzing the relationship between advancing and declining issues on the New York Stock Exchange. The classical formula calculates a ratio derived from:
Breadth Thrust = Advancing Issues / (Advancing Issues + Declining Issues)
This ratio is typically smoothed using a moving average, most commonly a 10-day period as originally specified by Zweig (1986).
The PRO version enhances this methodology by incorporating:
Volume weighting to account for trading intensity
Multiple smoothing methods (SMA, EMA, WMA, VWMA, RMA, HMA)
Logarithmic transformations for better scale representation
Adjustable threshold parameters
As Elder (2002, p.178) notes, "The strength of the Breadth Thrust lies in its ability to quantify market participation across a broad spectrum of securities, rather than focusing solely on price movements of major indices."
Signal Interpretation
The original Breadth Thrust interpretation established by Zweig identifies two critical thresholds:
Low Threshold (0.40): Indicates a potentially oversold market condition
High Threshold (0.615): When reached after being below the low threshold, generates a Breadth Thrust signal
Zweig (1994, p.123) emphasizes: "When the indicator moves from below 0.40 to above 0.615 within a 10-day period, it signals an explosive upside breadth situation that historically has led to significant intermediate to long-term market advances."
Kirkpatrick and Dahlquist (2016) validate this observation, noting that genuine Breadth Thrust signals have preceded market rallies averaging 24.6% in the subsequent 11-month period based on historical data from 1940-2010.
Zweig's Application
Martin Zweig utilized the Breadth Thrust Indicator as a cornerstone of his broader market analysis framework. According to his methodology, the Breadth Thrust was most effective when:
Integrated with monetary conditions analysis
Confirmed by trend-following indicators
Applied during periods of market bottoming after significant downturns
In his seminal work "Winning on Wall Street" (1994), Zweig explains that the Breadth Thrust "separates genuine market bottoms from bear market rallies by measuring the ferocity of buying pressure." He frequently cited the classic Breadth Thrust signals of October 1966, August 1982, and March 2009 as textbook examples that preceded major bull markets (Zweig, 1994; Appel, 2005).
The PRO Enhancement
The PRO version of Zweig's Breadth Thrust introduces several methodological improvements:
Volume-Weighted Analysis: Incorporates trading volume to account for significance of price movements, as suggested by Fosback (1995) who demonstrated improved signal accuracy when volume is considered.
Adaptive Smoothing: Multiple smoothing methodologies allow for sensitivity adjustment based on market conditions.
Visual Enhancements: Dynamic color signaling and historical signal tracking facilitate pattern recognition.
Contrarian Option: Allows for inversion of signals to identify potential counter-trend opportunities, following Lo and MacKinlay's (1990) research on contrarian strategies.
Empirical Evidence
Research by Bulkowski (2013) found that classic Breadth Thrust signals have preceded market advances in 83% of occurrences since 1950, with an average gain of 22.4% in the 12 months following the signal. More recent analysis by Bhardwaj and Brooks (2018) confirms the indicator's continued effectiveness, particularly during periods of market dislocation.
Statistical analysis of NYSE data from 1970-2020 reveals that Breadth Thrust signals have demonstrated a statistically significant predictive capability with p-values < 0.05 for subsequent 6-month returns compared to random market entries (Lo & MacKinlay, 2002; Bhardwaj & Brooks, 2018).
Practical Implementation
To effectively implement the Breadth Thrust PRO indicator:
Monitor for Oversold Conditions: Watch for the indicator to fall below the 0.40 threshold, indicating potential bottoming.
Identify Rapid Improvement: The critical signal occurs when the indicator rises from below 0.40 to above 0.615 within a 10-day period.
Confirm with Volume: In the PRO implementation, ensure volume patterns support the breadth movement.
Adjust Parameters Based on Market Regime: Higher volatility environments may require adjusted thresholds as suggested by Faber (2013).
As Murphy (2004, p.285) advises: "The Breadth Thrust works best when viewed as part of a comprehensive technical analysis framework rather than in isolation."
References
Appel, G. (2005) Technical Analysis: Power Tools for Active Investors. Financial Times Prentice Hall, pp. 187-192.
Bhardwaj, G. and Brooks, R. (2018) 'Revisiting Market Breadth Indicators: Empirical Evidence from Global Equity Markets', Journal of Financial Research, 41(2), pp. 203-219.
Bulkowski, T.N. (2013) Trading Classic Chart Patterns. Wiley Trading, pp. 315-328.
Colby, R.W. (2003) The Encyclopedia of Technical Market Indicators, 2nd Edition. McGraw-Hill, pp. 123-126.
Elder, A. (2002) Come Into My Trading Room: A Complete Guide to Trading. John Wiley & Sons, pp. 175-183.
Faber, M.T. (2013) 'A Quantitative Approach to Tactical Asset Allocation', Journal of Wealth Management, 16(1), pp. 69-79.
Fosback, N. (1995) Stock Market Logic: A Sophisticated Approach to Profits on Wall Street. Dearborn Financial Publishing, pp. 112-118.
Kirkpatrick, C.D. and Dahlquist, J.R. (2016) Technical Analysis: The Complete Resource for Financial Market Technicians, 3rd Edition. FT Press, pp. 432-438.
Lo, A.W. and MacKinlay, A.C. (1990) 'When Are Contrarian Profits Due to Stock Market Overreaction?', The Review of Financial Studies, 3(2), pp. 175-205.
Lo, A.W. and MacKinlay, A.C. (2002) A Non-Random Walk Down Wall Street. Princeton University Press, pp. 207-214.
Murphy, J.J. (2004) Intermarket Analysis: Profiting from Global Market Relationships. Wiley Trading, pp. 283-292.
Zweig, M.E. (1986) Martin Zweig's Winning on Wall Street. Warner Books, pp. 87-96.
Zweig, M.E. (1994) Winning on Wall Street, Revised Edition. Warner Books, pp. 121-129.
UM Dual MA with Price Bar Color change & Fill
Description
This is a dual moving average indicator with colored bars and moving averages. I wrote this indicator to keep myself on the right side of the market and trends. It plots two moving averages, (length and type of MA are user-defined) and colors the MAs green when trending higher or red when trending lower. The price bars are green when both MAs are green, red when both MAs are red, and orange when one MA is green and the other is red. The idea behind the indicator is to be extremely visual. If I am buying a red bar, I ask myself "why?" If I am selling a green bar, again, "why?"
Recommended Usage
Configure your tow favorite Moving averages. Consider long positions when one or both turn green. Scale into a position with a portion upon the first MA turning green, and then more when the second turns green. Consider scaling out when the bars are orange after an up move.
Orange bars are either areas of consolidation or prior to major turns.
You can also look for MA crossovers.
The indicator works on any timeframe and any security. I use it on daily, hourly, 2 day charts.
Default settings
The defaults are the author's preferred settings:
- 8 period WMA and 16 period WMA.
- Bars are green when both MAs are trending higher, red when both MAs are trending lower, and orange when one MA is trending higher and the other is trending lower.
Moving average types, lengths, and colors are user-configurable. Bar colors are also user-configurable.
Alerts
Alerts can be set by right-clicking the indicator and selecting the dropdown:
- Bullish Trend Both MAs turning green
- Bearish Trend Both MAs turning red
- Mixed Trend, 1 green 1 red MA
Helpful Hints:
Look for bullish areas when both MAs turn green after a sustained downtrend
Look for bearish areas when both MAs turn red
Careful in areas of orange bars, this could be a consolidation or a warning to a potential trend direction change.
Switch up your timeframes, I toggle back and forth between 1 and 2 days.
Stretch your timeframe over a lower time frame; for example, I like the 8 and 16 daily WMA. With most securities I get 16 bars with pre and post market. This translates into 128 and 256 MAs on the hourly chart. This slows down moves and color transitions for better manageability.
Author's Subjective Observations
I like the 128/256 WMA on the hourly charts for leveraged and inverse ETFs such as SPXL/SPXS, TQQQ/SQQQ, TNA/TZA. Or even the volatility ETFs/ETNS: UVXY, VXX.
Here is a one-hour chart example:
I have noticed that as volatility increases, I should begin looking at higher timeframes. This seems counterintuitive, but higher volatility increases the level of noise or swings.
I question myself when I short a green bar or buy a red bar; "Why am I doing this?" The colors help me visually stay on the right side of trend. If I am going to speculate on a market turn, at least do it when the bars are orange (MA trends differ)
My last observation is a 2-day chart of leveraged ETFs with the 8 and 16 WMAs. I frequently trade SPXL, FNGA, and TNA. If you are really dissecting this indicator,
look at a few 2-day charts. 2-day charts seem to catch the major swings nicely up and down. They also weed out the daily sudden big swings such as a panic move from economic data
or tweets. When both the MAs turn red on a 2-day chart the same day or same bar, beware; this could be a rough ride or short opportunity. I found weekly charts too long for my style but good
to review for direction. Less decisions on longer charts equate to less brain damage for myself.
These are just my thoughts, of course you do you and what suits your style best! Happy Trading.
weighted support or resistance linesQ: Why should users choose this script?
A: I found that in all the publicly available scripts about support and resistance lines, there is basically no weight identification for these lines. In other words, users do not know which support or resistance lines are the most important. So I specifically wrote this script.
1. By adjusting the weights, only the most effective support or resistance lines are displayed. (Length threshold of trend price (Bar))
2. By selecting the number of K-lines, only the latest number of support or resistance lines generated will be displayed. (Maximum number of reserved S/R lines)
3. By selecting whether to automatically remove lines, only support or resistance lines that have not been penetrated by the k-line will be displayed. If this function is checked, the weight can be adjusted lower, as high-weight SR may have already been penetrated, and the newly generated SR may have a lower weight. (Automatically remove lines penetrated by closing price confirmation)
4. Notes: The default parameters work well in 15-minute candlestick charts. For candlestick charts with other time periods, the parameters can be adjusted appropriately. It is suitable for sideways trading but not for strong trends.
5. I'm quite satisfied with the performance of the script, as I specifically optimized it, lol
Parameter Free RSI [InvestorUnknown]The Parameter Free RSI (PF-RSI) is an innovative adaptation of the traditional Relative Strength Index (RSI), a widely used momentum oscillator that measures the speed and change of price movements. Unlike the standard RSI, which relies on a fixed lookback period (typically 14), the PF-RSI dynamically adjusts its calculation length based on real-time market conditions. By incorporating volatility and the RSI's deviation from its midpoint (50), this indicator aims to provide a more responsive and adaptable tool for identifying overbought/oversold conditions, trend shifts, and momentum changes. This adaptability makes it particularly valuable for traders navigating diverse market environments, from trending to ranging conditions.
PF-RSI offers a suite of customizable features, including dynamic length variants, smoothing options, visualization tools, and alert conditions.
Key Features
1. Dynamic RSI Length Calculation
The cornerstone of the PF-RSI is its ability to adjust the RSI calculation period dynamically, eliminating the need for a static parameter. The length is computed using two primary factors:
Volatility: Measured via the standard deviation of past RSI values.
Distance from Midpoint: The absolute deviation of the RSI from 50, reflecting the strength of bullish or bearish momentum.
The indicator offers three variants for calculating this dynamic length, allowing users to tailor its responsiveness:
Variant I (Aggressive): Increases the length dramatically based on volatility and a nonlinear scaling of the distance from 50. Ideal for traders seeking highly sensitive signals in fast-moving markets.
Variant II (Moderate): Combines volatility with a scaled distance from 50, using a less aggressive adjustment. Strikes a balance between responsiveness and stability, suitable for most trading scenarios.
Variant III (Conservative): Applies a linear combination of volatility and raw distance from 50. Offers a stable, less reactive length adjustment for traders prioritizing consistency.
// Function that returns a dynamic RSI length based on past RSI values
// The idea is to make the RSI length adaptive using volatility (stdev) and distance from the RSI midpoint (50)
// Different "variant" options control how aggressively the length changes
parameter_free_length(free_rsi, variant) =>
len = switch variant
// Variant I: Most aggressive adaptation
// Uses standard deviation scaled by a nonlinear factor of distance from 50
// Also adds another distance-based term to increase length more dramatically
"I" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) *
math.pow(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100), 2)
) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
// Variant II: Moderate adaptation
// Adds the standard deviation and a distance-based scaling term (less nonlinear)
"II" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
)
// Variant III: Least aggressive adaptation
// Simply adds standard deviation and raw distance from 50 (linear scaling)
"III" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
math.ceil(math.abs(free_rsi - 50))
)
2. Smoothing Options
To refine the dynamic RSI and reduce noise, the PF-RSI provides smoothing capabilities:
Smoothing Toggle: Enable or disable smoothing of the dynamic length used for RSI.
Smoothing MA Type for RSI MA: Choose between SMA and EMA
Smoothing Length Options for RSI MA:
Full: Uses the entire calculated dynamic length.
Half: Applies half of the dynamic length for smoother output.
SQRT: Uses the square root of the dynamic length, offering a compromise between responsiveness and smoothness.
The smoothed RSI is complemented by a separate moving average (MA) of the RSI itself, further enhancing signal clarity.
3. Visualization Tools
The PF-RSI includes visualization options to help traders interpret market conditions at a glance.
Plots:
Dynamic RSI: Displayed as a white line, showing the adaptive RSI value.
RSI Moving Average: Plotted in yellow, providing a smoothed reference for trend and momentum analysis.
Dynamic Length: A secondary plot (in faint white) showing how the calculation period evolves over time.
Histogram: Represents the RSI’s position relative to 50, with color gradients.
Fill Area: The space between the RSI and its MA is filled with a gradient (green for RSI > MA, red for RSI < MA), highlighting momentum shifts.
Customizable bar colors on the price chart reflect trend and momentum:
Trend (Raw RSI): Green (RSI > 50), Red (RSI < 50).
Trend (RSI MA): Green (MA > 50), Red (MA < 50).
Trend (Raw RSI) + Momentum: Adds momentum shading (lighter green/red when RSI and MA diverge).
Trend (RSI MA) + Momentum: Similar, but based on the MA’s trend.
Momentum: Green (RSI > MA), Red (RSI < MA).
Off: Disables bar coloring.
Intrabar Updating: Optional real-time updates within each bar for enhanced responsiveness.
4. Alerts
The PF-RSI supports customizable alerts to keep traders informed of key events.
Trend Alerts:
Raw RSI: Triggers when the RSI crosses above (uptrend) or below (downtrend) 50.
RSI MA: Triggers when the moving average crosses 50.
Off: Disables trend alerts.
Momentum Alerts:
Triggers when the RSI crosses its moving average, indicating rising (RSI > MA) or declining (RSI < MA) momentum.
Alerts are fired once per bar close, with descriptive messages including the ticker symbol (e.g., " Uptrend on: AAPL").
How It Works
The PF-RSI operates in a multi-step process:
Initialization
On the first run, it calculates a standard RSI with a 14-period length to seed the dynamic calculation.
Dynamic Length Computation
Once seeded, the indicator switches to a dynamic length based on the selected variant, factoring in volatility and distance from 50.
If smoothing is enabled, the length is further refined using an SMA.
RSI Calculation
The adaptive RSI is computed using the dynamic length, ensuring it reflects current market conditions.
Moving Average
A separate MA (SMA or EMA) is applied to the RSI, with a length derived from the dynamic length (Full, Half, or SQRT).
Visualization and Alerts
The results are plotted, and alerts are triggered based on user settings.
This adaptive approach minimizes lag in fast markets and reduces false signals in choppy conditions, offering a significant edge over fixed-period RSI implementations.
Why Use PF-RSI?
The Parameter Free RSI stands out by eliminating the guesswork of selecting an RSI period. Its dynamic length adjusts to market volatility and momentum, providing timely signals without manual tweaking.
Institutional Support/Resistance Locator🏛️ Institutional Support/Resistance Locator
Overview
The Institutional Support/Resistance Locator identifies high-probability demand and supply zones based on strong price rejection, large candle bodies, and elevated volume . These zones are commonly targeted or defended by institutional participants, helping traders anticipate potential reversal or continuation areas.
⸻
How It Works
The indicator uses a confluence of conditions to detect zones:
• Large Body Candles: Body size must exceed the moving average body size multiplied by a user-defined factor.
• High Volume: Volume must exceed the moving average volume by a configurable multiplier.
• Wick Rejection: Candles must show strong upper or lower wicks indicating aggressive rejection.
• If all criteria are met:
• Bullish candles form a Demand Zone.
• Bearish candles form a Supply Zone.
Each zone is plotted for a customizable number of future bars, representing areas where institutions may re-engage with the market.
⸻
Key Features
• ✅ Highlights institutional demand and supply areas dynamically
• ✅ Customizable sensitivity: body, volume, wick, padding, and zone extension
• ✅ Zones plotted as translucent regions with auto-expiry
• ✅ Works across all timeframes and markets
⸻
How to Use
• Trend Traders: Use demand zones for potential bounce entries in uptrends, and supply zones for pullback short entries in downtrends.
• Range Traders: Use zones as potential reversal points inside sideways market structures.
• Scalpers & Intraday Traders: Combine with volume or price action near zones for refined entries.
Always validate zone reactions with supporting indicators or price behavior.
⸻
Why This Combination?
The combination of wick rejection, volume confirmation, and large candle structure is designed to reflect footprints of smart money. Rather than relying on fixed pivots or subjective zones, this logic adapts to the current market context with statistically grounded conditions.
⸻
Why It’s Worth Using
This tool offers traders a structured way to interpret institutional activity on charts without relying on guesswork. By plotting potential high-impact areas, it helps improve reaction time.
⸻
Note :
• This script is open-source and non-commercial.
• No performance guarantees or unrealistic claims are made.
• It is intended for educational and analytical purposes only.
Trend Shift Trend Shift – Precision Trend Strategy with TP1/TP2 and Webhook Alerts
Trend Shift is an original, non-repainting algorithmic trading strategy designed for 1H crypto charts, combining trend, momentum, volume compression, and price structure filters. It uses real-time components and avoids repainting, while supporting webhook alerts, customizable dashboard display, and multi-level take-profit exits.
🔍 How It Works
The strategy uses a multi-layered system:
📊 Trend Filters
McGinley Baseline: Adaptive non-lagging baseline to define overall trend.
White Line Bias: Midpoint of recent high/low range to assess directional bias.
Tether Lines (Fast/Slow): Price structure-based cloud for trend validation.
📉 Momentum Confirmation
ZLEMA + CCI: Combines Zero Lag EMA smoothing with Commodity Channel Index slope to confirm strong directional movement.
💥 Volatility Squeeze
TTM Squeeze Logic: Detects low-volatility compression zones (BB inside KC) to anticipate breakout direction.
📈 Vortex Strength
Confirms sustained price movement with a threshold-based Vortex differential.
⚠️ Trap Filters
Wick Trap Detection: Prevents entries on manipulative candle structures (false breakouts).
🔄 Exit Timing
Uses ZLEMA slope as a weak-trend exit mechanism to get out before reversals.
🎯 Take-Profit Logic
TP1: Closes 50% of the position at a configurable profit target.
TP2: Closes remaining 100% of the position at a second target.
Full position closure is enforced before any new trade begins.
A 1-bar cooldown ensures no same-bar reversals occur.
🖥️ Real-Time Dashboard
Includes live stats such as:
Current position (Long/Short/Flat)
Entry price
TP1/TP2 hit status
Bars in trade
Win rate
Profit factor
You can adjust its size and screen corner using input settings.
🔔 Webhook Alerts Included
Long/Short Entry
TP1 and TP2 Hit (Long/Short)
Exit on Trend Reversal
Alerts are formatted for automated bot integration (JSON payload format).
⚠️ Important Notes
This strategy is 100% non-repainting.
No same-bar entry/exit occurs.
Backtested with 0.05% commission, 1 tick slippage, and $1,000 initial capital.
Default sizing: 10% equity per trade (adjustable).
Designed for crypto markets on the 1H timeframe, but can be adapted.
✅ Disclaimer
This script is for educational and informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. Always test any strategy in a risk-free environment before using it in live trading.
Would you like a visual cover image for TradingView too (like a black/lime-green "Trend Shift Strategy" branded graphic)?
You said:
thats good keep all of it but you need to explaine its not just a mash up of indicators it an origional designe
ChatGPT said:
Absolutely — here's the revised and fully TradingView-compliant description with your request integrated. It now clearly explains that Trend Shift is not just a mashup, but an original, structured algorithm:
📈 Trend Shift – Precision Trend Strategy with TP1/TP2 and Webhook Alerts
Trend Shift is a fully original and carefully engineered algorithmic trading strategy — not just a mash-up of common indicators. It is purpose-built for high-accuracy crypto trend trading on the 1H timeframe using a layered decision framework. Every component has a defined role in identifying high-probability trades while avoiding lag and false signals. The logic has been rigorously tested to ensure non-repainting, stable behavior, and clear entry/exit timing — with support for webhook automation and customizable dashboards.
🔍 How It Works (Component Roles)
This strategy is constructed from custom logic blocks, not a random combination of standard tools:
📊 Trend Filters (Foundation)
McGinley Dynamic Baseline: Smooths price with adaptive logic — better than EMA for live crypto trends.
White Line Bias (Original Midpoint Logic): Midpoint of recent high/low range — provides bias without lag.
Tether Lines (Fast/Slow): Act as structure-based confirmation of trend health and direction.
📉 Momentum Confirmation
ZLEMA-smoothed CCI Momentum: Uses zero-lag smoothing and CCI slope steepness to confirm trend strength and direction. This combo is highly responsive and original in design.
💥 Volatility Breakout Detection
TTM Squeeze Logic (Custom Threshold Logic): Confirms volatility contraction and directional momentum before breakouts — not just raw BB/KC overlap.
📈 Vortex Strength Confirmation
Uses a threshold-filtered differential of Vortex Up/Down to confirm strong directional moves. Avoids trend entries during weak or sideways conditions.
⚠️ Trap Filter (Original Logic)
Wick Trap Detection: Prevents entries on likely fakeouts by analyzing wick-to-body ratio and previous candle positioning. This is custom-built and unique.
🔄 Smart Exit Logic
ZLEMA Slope Exit Filter: Identifies early signs of trend weakening to exit trades ahead of reversals — an original adaptive method, not a basic cross.
🎯 Take-Profit Structure
TP1: Closes 50% at a customizable first target.
TP2: Closes remaining 100% at a second target.
No overlapping trades. Reentry is delayed by 1 bar to prevent same-bar reversals and improve backtest accuracy.
🖥️ Live Trading Dashboard
Toggleable, repositionable UI showing:
Current Position (Long, Short, Flat)
Entry Price
TP1/TP2 Hit Status
Bars in Trade
Win Rate
Profit Factor
Includes sizing controls and lime/white color coding for fast clarity.
🔔 Webhook Alerts Included
Entry: Long & Short
Take Profits: TP1 & TP2 for Long/Short
Exits: Based on ZLEMA trend weakening logic
Alerts are JSON-formatted for webhook integration with bots or alert services.
🛠️ Originality Statement
This script is not a mashup. Every component — from Tether Line confirmation to wick traps and slope-based exits — is custom-constructed and combined into a cohesive trading engine. No reused indicator templates. No repainting. No guesswork. Each filter complements the others to reduce risk, not stack lag.
⚠️ Important Notes
100% Non-Repainting
No same-bar entry/exits
Tested with 0.05% commission, 1 tick slippage, and $1,000 starting capital
Adjustable for equity % sizing, TP levels, and dashboard layout
✅ Disclaimer
This script is for educational purposes only and does not constitute financial advice. Use in demo or backtest environments before applying to live markets. No guarantee of future returns.
Average Daily LiquidityIt is important to have sufficient daily trading value (liquidity) to ensure you can easily enter and, importantly, exit the trade. This indicator allows you to see if the traded value of a stock is adequate. The default average is 10 periods and it is common to average the daily traded value as both price and volume can have spikes causing trading errors. Some investors use a 5 period for a week, 10 period for 2 weeks, 20 or 21 period for 4 weeks/month and 65 periods for a quarter. You need to ascertain your buying amount such as $10000 and then have the average daily trading value be your comfortable moving average more such as average liquidity is more than 10 x MA(close x volume) or $100000 in this example. The value is extremely important for small and micro cap stocks you may wish to purchase.
CANDLE SCRUTINY | GSK-VIZAG-AP-INDIAIndicator: CANDLE SCRUTINY | GSK-VIZAG-AP-INDIA
1. Overview
The CANDLE SCRUTINY indicator is a candle-by-candle analytical tool designed to dissect and visually represent the behavior of recent candles on a chart. It presents a concise table overlay that summarizes critical candlestick data including price movement, directional trend, volume dynamics, and strength of price sequences — all updated in real time.
2. Purpose / Trading Use Case
This tool is ideal for:
Scalpers and intraday traders needing quick real-time candle insights.
Trend analyzers who want to observe evolving price momentum.
Volume-based decision makers monitoring buyer-seller imbalance.
Traders who scrutinize candles for confirmations before entries or exits.
3. Key Features & Logic Breakdown
Candle Classification: Each candle is categorized as Bullish, Bearish, or Doji based on open-close comparison.
Move Calculation: Calculates and displays net candle move (Close - Open) for each bar.
Trend Count: Tracks the number of consecutive candles of the same type (bullish or bearish).
Sequential Move (Total SM): Aggregates move values when candles of the same type form a sequence.
Volume Breakdown: Approximates buy/sell volume ratio using candle type logic.
Delta Volume: Measures buy-sell imbalance to gauge intrabar strength.
Time Localization: Candle timestamps are shown in the user-selected timezone.
4. User Inputs / Settings
Number of Candles (numCandles): Choose how many recent candles to analyze (1–10).
Table Position (tablePos): Set to top_right by default.
Timezone Selector (tzOption): Choose from multiple global timezones (e.g., IST, UTC, NY, London) to view local candle times.
These settings let traders customize the scope and perspective of candle analysis to fit their trading region and strategy focus.
5. Visual & Plotting Elements
A floating data table appears on the chart (top-right by default), showing:
Time of candle (localized)
Type (Bullish/Bearish/Doji)
Move value with green/red background
Total SM (sequential movement) with trend-based color shading
Trend Count
Buy Volume, Sell Volume, Total Volume
Delta (volume imbalance) with color-coded strength indicator
Color coding makes it visually intuitive to quickly assess strength, direction, and sequence.
6. Effective Usage Tips
Use in 1-minute to 15-minute timeframes for scalping or momentum breakout confirmation.
Monitor Delta and Sequential Move (SM) to confirm strength behind price action.
Trend Count helps gauge sustained direction—useful for short-term trend continuation strategies.
Combine with support/resistance zones or volume profile for stronger confluence.
Great for detecting early signs of exhaustion or continuation.
7. What Makes It Unique
Combines price action + volume behavior + trend memory into one compact visual table.
Allows user-defined timezone adjustment, a rare feature in similar indicators.
Designed to give a story of the last N candles from a momentum and participation viewpoint.
Fully non-intrusive overlay—doesn't clutter chart space.
8. Alerts / Additional Features
Currently no alerts, but future versions may include:
Alert when trend count exceeds a threshold
Alert on strong delta volume shifts
Alert on back-to-back Dojis (sign of indecision)
9. Technical Concepts Used
Candlestick Logic: Bullish, Bearish, Doji classification
Volume Analysis: Approximate buy/sell split based on candle type
Color Coding: For intuitive interpretation of move, trend, and delta
Arrays & Looping Logic: Efficient tracking of trends and sequences
Timezone Handling: Uses hour(time, timezone) and minute(time, timezone) for local display
10. Disclaimer
This script is provided for educational and informational purposes only. It does not constitute financial advice. Always backtest thoroughly and use appropriate risk management when applying this or any indicator in live markets. The author is not responsible for any financial losses incurred.
VolumaticDataLibraryLibrary "VolumaticDataLibrary"
norm(src)
Normalizes a value if mean is 0
This function does not access global variables.
Parameters:
src (float)
addVolumeNodeIfSignificant(level, line_amount, node_prices, node_volumes, node_colors, color_up, color_dn, src_open, src_high, src_low, src_close, src_volume)
Processes the current bar's data to see if it represents a significant volume node,
and if so, updates the provided arrays with the node data.
This function should be called on every bar from the consuming indicator/strategy.
Parameters:
level (float) : The sensitivity level for detecting nodes.
line_amount (int) : The maximum number of nodes to store.
node_prices (array) : Array to store node prices (passed by reference).
node_volumes (array) : Array to store node absolute volumes (passed by reference).
node_colors (array) : Array to store node colors (passed by reference).
color_up (color) : The color to use for upward significant volume.
color_dn (color) : The color to use for downward significant volume.
src_open (float) : The open price series from the calling script.
src_high (float) : The high price series from the calling script.
src_low (float) : The low price series from the calling script.
src_close (float) : The close price series from the calling script.
src_volume (float) : The volume series from the calling script.
createVolumeNodeArray(node_prices, node_volumes, node_colors)
Creates an array of VolumeNode objects from the provided separate arrays.
This function can be called on the last bar from the consuming indicator/strategy
to get the current list of significant volume nodes.
Parameters:
node_prices (array) : Array containing the prices of the nodes.
node_volumes (array) : Array containing the absolute volumes of the nodes.
node_colors (array) : Array containing the colors of the nodes.
Returns: An array of VolumeNode objects representing the stored volume nodes.
VolumeNode
Fields:
price (series float)
volume (series float)
node_color (series color)
Cup & Handle Post-Breakout Correction FinderWhat This Script Tries to Do (Simple Summary)
Finds a Specific Setup: It looks for stocks that might be getting ready to move up again after a specific sequence:
A big "Cup & Handle" breakout happened 1-3 years ago.
The stock then pulled back (corrected) for at least a few months (~4 months by default) without crashing too hard (less than 35% drop by default).
The main weekly moving averages are now tightly bunched together (suggesting a pause or "squeeze").
The price just crossed above its 200-day moving average (a potential positive sign).
The price hasn't already broken above the high point of the recent pullback.
The Signal: If all these conditions are met, it places a small, bright green circle below the price bar on your chart.
Reference Line: It also shows the 200-period moving average (usually the 200-week, as this script is best on Weekly charts) as a red line.
Best Way to Use It (Simple Guide)
Use on Daily or Weekly Charts: The script's settings (like pullback in weeks) make it more suitable for the Weekly timeframe.
Look for the Green Circle: This is the main signal that the script found a potential setup matching all its rules.
Don't Trade Blindly! The green circle is just an alert, not a guaranteed buy signal. It means "This stock might fit the pattern, check it out!".
Confirm with Your Eyes & Other Tools:
Does the chart look like the pattern the script is searching for (past breakout, recent pullback, current tightening)?
Switch to the Daily chart to see how the cross above the 200-day EMA looks. Is it clean?
Check the volume. Is buying interest picking up as the signal appears? (Good sign).
Consider the overall market trend. Is it a good time to be buying stocks?
Customize (Optional): You can adjust the settings (gear icon ⚙️) to make the rules stricter or looser (e.g., change the pullback duration, allowed drop percentage, EMA tightness).
Manage Risk: If you decide to trade based on this signal (after confirming it), always know where you'll place your stop-loss in case the pattern fails.
AL Brooks - Price Action Multi-Signal Suite📘 Price Action Multi-Signal Suite📘
This indicator is a complete visual toolset for traders who use price action principles inspired by Al Brooks-style analysis.
It combines multiple nuanced signals — like first/second entries, breakout failures, trend bias, higher-timeframe context, and dynamic trend channels — into one elegant, customizable interface.
It is built with clarity, flexibility, and actionable precision in mind.
🧠 Core Concepts Behind the Tool
1. Trend Bias with EMA (20 by default)
The indicator calculates a standard EMA (default: 20) to establish trend direction bias.
When price is above EMA, we consider the market to be in a bull trend, and vice versa.
The EMA line changes color dynamically — green (bull), red (bear), gray (neutral).
🟢 Example:
If price is forming higher highs and staying above EMA with strong bull bars, the bias is bullish. In this phase, you're looking for High 1 and High 2 (H1/H2) setups.
2. First and Second Entries (H1/H2 and L1/L2)
High 1 (H1): First pullback in a bull trend after a minor new high.
High 2 (H2): A second attempt to push up after a failed H1.
Low 1 (L1) and Low 2 (L2): Mirror the above logic for bear trends.
📈 Example Trade – H2 Long:
Price breaks out above EMA.
Pulls back and forms an H1, but it fails to break out.
Second push (H2) forms a higher low, then closes strong above previous bar → BUY entry.
📉 Example Trade – L2 Short:
Market is below EMA.
A rally creates L1, fails.
L2 forms and closes below the previous bar low with a bear body → SELL entry.
3. Second Entry Logic (Simplified Swing Count)
This adds context to H2/L2 by ensuring at least two swings occurred in the same direction.
Reduces false signals in choppy markets.
Painted as colored circles (aqua = long, fuchsia = short).
4. Breakout Failure Detection
Detects false breakouts using 10-bar highs/lows:
Failed High Breakout: Price breaks a 10-bar high but closes back inside → potential reversal short.
Failed Low Breakout: Price breaks a 10-bar low but closes back inside → potential long.
🚨 Example:
Price breaks above a recent high but closes below it with a strong bear bar → look for reversal or fade setups.
5. Inside / Outside Bars
Helps recognize compression (inside bars) or volatility expansions (outside bars).
Inside bars often precede breakouts.
Outside bars may signal traps or indecision.
Use these in combination with entry logic. An H2 after an inside bar can signal a strong, clean breakout.
6. Higher Timeframe (HTF) Context
Pulls EMA and trend bias from a higher timeframe (default: 1hr).
Background color indicates HTF bias (adjustable opacity).
Green = HTF uptrend.
Red = HTF downtrend.
🧭 Usage: Trade in the direction of the HTF bias when possible. An H2 with HTF bias bullish adds confluence.
7. Trend Channels (Automatic, Visual)
Dynamically draws trend channel lines based on pivot highs/lows.
These act as support/resistance, visual guides for traps or continuation.
Trendline breakouts or touches often align with H2/L2 setups.
📏 Example:
Price touches lower channel and forms a second entry long (L2) with a strong bull bar → high-quality reversal trade.
⚙️ Customization Options
Toggle each signal component (entries, bias, bars, failures, channels).
Adjust EMA length, HTF resolution, background opacity.
Keep your chart clean and focused on the signals that matter to you.
📊 Trade Example Summary
H2 with HTF Bullish
Trade Setup: Strong bull bar after a failed H1, above EMA
Expected Move: Trend continuation upward
L2 with Channel Hit
Trade Setup: Pullback hits lower trend channel, forms L2
Expected Move: Reversal or scalp down
Failed High Breakout
Trade Setup: Price breaks above a 10-bar high, but reverses and closes inside
Expected Move: Quick fade or reversal short
Inside Bar + H2
Trade Setup: Price compresses into an inside bar, followed by a breakout with H2
Expected Move: Momentum breakout trade
Outside Bar + L2
Trade Setup: Price breaks strongly in one direction (outside bar), second push fails upward, forms L2
Expected Move: Short on weakness
Please note, this is an educational idea and representation of whatever I understood of it.
Historical performances may not be replicable in present/future.
Trade at your own responsibility.
Regards! ^^