Smart Trend Lines [The_lurker]
Smart Trend Lines
A multi-level trend classifier that detects bullish and bearish conditions using a methodology based on drawing trend lines—main, intermediate, and short-term—by identifying peaks and troughs. The tool highlights trend strength by applying filters such as the Average Directional Index (ADX) (A), Relative Strength Index (RSI) (R), and Volume (V), making it easier to interpret trend strength. The filter markers (V, A, R) in the Smart Trend Lines indicator are powerful tools for assessing the reliability of breakouts. Breakouts containing are the most reliable, as they indicate strong volume support, trend strength, and favorable momentum. Breakouts with partial filters (such as or ) require additional confirmation, while breakouts without filters ( ) should be avoided unless supported by other strong signals. By understanding the meaning of each filter and the market context.
Core Functionality
1. Trend Line Types
The indicator generates three distinct trend line categories, each serving a specific analytical purpose:
Main Trend Lines: These are long-term trend lines designed to capture significant market trends. They are calculated based on pivot points over a user-defined period (default: 50 bars). Main trend lines are ideal for identifying macro-level support and resistance zones.
Mid Trend Lines: These are medium-term trend lines (default: 21 bars) that focus on intermediate price movements. They provide a balance between short-term fluctuations and long-term trends, suitable for swing trading strategies.
Short Trend Lines: These are short-term trend lines (default: 9 bars) that track rapid price changes. They are particularly useful for scalping or day trading, highlighting immediate support and resistance levels.
Each trend line type can be independently enabled or disabled, allowing traders to tailor the indicator to their preferred timeframes.
2. Breakout Detection
The indicator employs a robust breakout detection system that identifies when the price crosses a trend line, signaling a potential trend reversal or continuation. Breakouts are validated using the following filters:
ADX Filter: The Average Directional Index (ADX) measures trend strength. A user-defined threshold (default: 20) ensures that breakouts occur during strong trends, reducing false signals in range-bound markets.
RSI Filter: The Relative Strength Index (RSI) identifies overbought or oversold conditions. Breakouts are filtered based on RSI thresholds (default: 65 for overbought, 35 for oversold) to avoid signals in extreme market conditions.
Volume Filter: Breakouts are confirmed only when trading volume exceeds a moving average (default: 20 bars) and aligns with the breakout direction (e.g., higher volume on bullish breakouts when the candle closes higher).
Breakout events are marked with labels on the chart, indicating the type of trend line broken (Main, Mid, or Short) and the filters satisfied (Volume, ADX, RSI). Alerts are triggered for each breakout, providing real-time notifications.
3. Customization Options
The indicator offers extensive customization through input settings, organized into logical groups for ease of use:
Main Trend Line Settings
Length: Defines the number of bars used to calculate pivot points (default: 50).
Bullish Color: Color for upward-sloping (bullish) main trend lines (default: green).
Bearish Color: Color for downward-sloping (bearish) main trend lines (default: red).
Style: Line style options include solid, dashed, or dotted (default: solid).
Mid Trend Line Settings
Length: Number of bars for mid-term pivot points (default: 21).
Show/Hide: Toggle visibility of mid trend lines (default: enabled).
Bullish Color: Color for bullish mid trend lines (default: lime).
Bearish Color: Color for bearish mid trend lines (default: maroon).
Style: Line style (default: dashed).
Short Trend Line Settings
Length: Number of bars for short-term pivot points (default: 9).
Show/Hide: Toggle visibility of short trend lines (default: enabled).
Bullish Color: Color for bullish short trend lines (default: teal).
Bearish Color: Color for bearish short trend lines (default: purple).
Style: Line style (default: dotted).
General Display Settings
Break Check Price: Selects the price type for breakout detection (Close, High, or Low; default: Close).
Show Previous Trendlines: Option to display historical main trend lines (default: disabled).
Label Size: Size of breakout labels (Tiny, Small, Normal, Large, Huge; default: Small).
Filter Settings
ADX Threshold: Minimum ADX value for trend strength confirmation (default: 25).
Volume MA Period: Period for the volume moving average (default: 20).
RSI Filter: Enable/disable RSI filtering (default: enabled).
RSI Upper Threshold: Upper RSI limit for overbought conditions (default: 65).
RSI Lower Threshold: Lower RSI limit for oversold conditions (default: 35).
4. Technical Calculations
The indicator relies on several technical calculations to ensure accuracy:
Pivot Points: Pivot highs and lows are detected using the ta.pivothigh and ta.pivotlow functions, with separate lengths for Main, Mid, and Short trend lines.
Slope Calculation: The slope of each trend line is calculated as the change in price divided by the change in bar index between two pivot points.
ADX Calculation: ADX is computed using a 14-period Directional Movement Index (DMI), with smoothing over 14 bars.
RSI Calculation: RSI is calculated over a 14-period lookback using the ta.rsi function.
Volume Moving Average: A simple moving average (SMA) of volume is used to determine if current volume exceeds the average.
5. Strict Mode Validation
To ensure the reliability of trend lines, the indicator employs a strict mode check:
For bearish trend lines, all prices between pivot points must remain below the projected trend line.
For bullish trend lines, all prices must remain above the projected trend line.
Post-pivot break checks ensure that no breakouts occur between pivot points, enhancing the validity of the trend line.
6. Trend Line Extension
Trend lines are dynamically extended forward until a breakout occurs. The extension logic:
Projects the trend line using the calculated slope.
Continuously validates the extension using strict mode checks.
Stops extension upon a breakout, fixing the trend line at the breakout point.
7. Alerts and Labels
Labels: Breakout labels are placed above (for bearish breakouts) or below (for bullish breakouts) the price bar. Labels include:
A prefix indicating the trend line type (B for Main, M for Mid, S for Short).
A suffix showing satisfied filters (e.g., for Volume, ADX, and RSI).
Alerts: Each breakout triggers a one-time alert per bar close, with a descriptive message indicating the trend line type and filters met.
Detailed Code Breakdown
1. Initialization and Inputs
The script begins by defining the indicator with indicator('Smart Trend Lines ', overlay = true), ensuring it overlays on the price chart. Input settings are grouped into categories (Main, Mid, Short, General Display, Filters) for user convenience. Each input includes a tooltip in both English and Arabic, enhancing accessibility.
2. Technical Indicator Calculations
Volume MA: Calculated using ta.sma(volume, volPeriod) to compare current volume against the average.
ADX: Computed using custom dirmov and adx functions, which calculate the Directional Movement Index and smooth it over 14 periods.
RSI: Calculated with ta.rsi(close, rsiPeriod) over 14 periods.
Price Selection: The priceToCheck function selects the price type (Close, High, or Low) for breakout detection.
3. Pivot Detection
Pivot points are detected using ta.pivothigh and ta.pivotlow for each trend line type. The lookback period is set to the respective trend line length (e.g., 50 for Main, 21 for Mid, 9 for Short).
4. Trend Line Logic
For each trend line type (Main, Mid, Short):
Bearish Trend Lines: Identified when two consecutive pivot highs form a downward slope. The script validates the trend line using strict mode and post-pivot break checks.
Bullish Trend Lines: Identified when two consecutive pivot lows form an upward slope, with similar validation.
Trend lines are drawn using line.new, with separate lines for the initial segment (between pivots) and the extended segment (from the second pivot forward).
5. Breakout Detection and Labeling
Breakouts are detected when the selected price crosses the trend line level. The script checks:
Volume conditions (above average and aligned with candle direction).
ADX condition (above threshold).
RSI condition (within thresholds if enabled). Labels are created with label.new, and alerts are triggered with alert.
6. Trend Line Extension
The extendTrendline function dynamically updates the trend line’s endpoint unless a breakout occurs. It uses strict mode checks to ensure the trend line remains valid.
7. Previous Trend Lines
If enabled, previous main trend lines are stored in arrays (previousBearishStartLines, previousBullishTrendLines, etc.) and displayed on the chart, providing historical context.
Disclaimer:
The information and publications are not intended to be, nor do they constitute, financial, investment, trading, or other types of advice or recommendations provided or endorsed by TradingView.
Indicadores e estratégias
Position Size CalculatorPosition Size Calculator - User Guide
A simple tool to calculate optimal position size based on your risk preferences, visualize trade levels, and automatically determine trade direction.
Introduction
The Position Size Calculator is a TradingView indicator designed to help traders calculate the optimal position size for their trades based on account size and risk tolerance. This tool visually represents entry, stop loss, and take profit levels while automatically calculating the appropriate position size to maintain consistent risk management.
Getting Started
Setting Up Your Account Parameters
Setting Price Levels
Understanding the Visual Elements
Adjusting Your Trade on the Chart
Reading the Information Panel
1. Getting Started
After adding the indicator to your chart, you'll see three horizontal lines representing:
Yellow line: Entry price
Green line: Take profit price
Red line: Stop loss price
The indicator automatically detects whether you're planning a Long or Short trade based on the position of your take profit relative to your entry.
2. Setting Up Your Account Parameters
In the "Position Calculator" settings group:
Account Size : Enter your total account balance
Account Currency : Set your account currency (USD, EUR, etc.)
Risk (%) : Enter the percentage of your account you're willing to risk per trade (e.g., 2%)
Instrument Type : Select your trading instrument (Forex, Futures, Stocks, or Crypto)
Value per 0.01 lot per tick : Enter the value of 0.01 lots per tick (for most Forex pairs, this is $1 per pip for 0.01 lot)
Minimum Lot Size : Set the minimum lot size allowed by your broker (usually 0.01 for Forex)
3. Setting Price Levels
In the "Price Levels" section:
Entry Price : The price at which you plan to enter the trade
Stop Loss Price : Where you'll exit if the trade goes against you
Take Profit Price : Your target price where you'll take profits
If you set Entry Price to 0, it will default to the current price. If Stop Loss or Take Profit are set to 0, they'll default to 5% below or above entry price respectively.
4. Understanding the Visual Elements
Yellow line : Your entry price
Green line : Your take profit level
Red line : Your stop loss level
Green zone : The profit zone (between entry and take profit)
Red zone : The loss zone (between entry and stop loss)
Information panel : Shows all calculations and trade details
5. Adjusting Your Trade on the Chart
The beauty of this tool is its interactivity:
You can drag any of the lines directly on the chart to adjust entry, stop loss, or take profit
If you drag the take profit above the entry , the indicator automatically sets up for a Long trade
If you drag the take profit below the entry , it automatically configures for a Short trade
All calculations and visuals update in real-time as you adjust the lines
This means you can quickly test different scenarios and see how they affect your position size and potential profit/loss.
6. Reading the Information Panel
The information panel displays:
Account details : Your account size and currency
Risk information : Your percentage risk and the equivalent monetary amount
Position Size : The optimal lot size calculated based on your risk parameters
Price levels : Entry, Stop Loss, and Take Profit with distances in ticks
Risk/Reward ratio : Shown as 1:X (where X is the reward relative to 1 unit of risk)
Potential outcomes : The exact amount you stand to gain or lose on this trade
Trade direction : Whether this is a Long or Short trade
Visual Settings
You can customize the appearance in the "Visual" settings group:
Adjust colors for profit and loss zones
Change the transparency of colored zones
Toggle the filling of spaces between lines
Adjust how far the lines extend beyond the last candle
Practical Tips
Always double-check your "Value per 0.01 lot per tick" setting for the specific instrument you're trading
For Forex major pairs, the standard is usually $1 per pip for 0.01 lots
For other instruments, consult your broker's specifications
The indicator works best when you place your stop loss at a logical market level (support/resistance, swing high/low) rather than a fixed percentage
Final Thoughts
This Position Size Calculator helps remove emotion from your trading by objectively calculating your position size based on your predefined risk parameters. It ensures that you maintain consistent risk across all your trades, regardless of the stop loss distance, which is a key component of successful risk management.
Remember: The most important goal in trading is capital preservation. This tool helps you ensure that each trade risks only what you've decided is acceptable for your trading strategy.
Volumetric Pivot Echo🔮 Volumetric Pivot Echo (VPE)
Future Price Projection Zones with Confidence Scoring
📘 Overview
The Volumetric Pivot Echo (VPE) is a next-generation leading indicator that identifies high-volume reversal points and echoes their price + time behavior into the future — giving you a visual forecast box that includes a confidence score, price range, and duration estimate.
It’s designed for swing and options traders who want forward guidance based on real structure, not just reactive signals.
⚙️ How It Works
Pivot Detection – Finds pivot highs/lows based on configurable bar structure.
Volume Confirmation – Only confirms pivots backed by strong volume (e.g., 1.5× average).
Echo Logic – Measures the price move and time it took to reach the pivot.
ATR Scaling – Adjusts projections based on current market volatility.
Confidence Score – Rates each projection (0–100%) based on structure match, volatility, and direction alignment.
📦 What Appears on Chart
Projection Box:
A forward-drawn rectangle from the current bar to the estimated future zone. The box's size and duration mirror the last valid momentum leg.
Box Label Text:
🔹 Range (projected move size)
⏱️ Duration (bars expected)
✅ Confidence %
VPH/VPL Markers:
Pivot highs and lows confirmed by volume, marked with “VPH” or “VPL”.
🎯 How to Trade with It
Use the box as a target zone for directional trades.
If price enters a box with >85% confidence, consider it a high-quality path projection.
Use with support/resistance confluence or entry systems.
Works especially well for swing trading, breakout setups, or options targeting.
🛠️ Recommended Settings
Box Transparency: Set Projection Up/Down Color to 90 (10% visible).
Text Color: Set to white for readability.
Volume Multiplier: Default 1.5x, increase in choppy markets.
Projection Duration: Start with 1.0x echo multiplier and fine-tune.
⏳ Timeframes & Accuracy
Timeframe Confidence Zones Most Reliable
15m – 1h Use 70–85% confidence scores
1h – 4h Sweet spot for balanced signals
1D – 1W Strongest historical echo tracking (>85% ideal)
✅ Key Features
Forward-looking, non-repainting logic
Clear visual projections — no guesswork
Confidence scoring built-in
ATR-adjusted — adapts to volatility
Works on any asset (stocks, crypto, FX)
🧠 Why It’s Unique
This is not a lagging oscillator or classic trend-following tool.
It’s a leading structure projection model — combining pivot behavior, volume intensity, and market volatility to sketch forward “echo zones” based on the past.
Current Fractal High/Low (Dynamic)
This indicator dynamically tracks the most recent confirmed Fractal High and Fractal Low across any timeframe using custom left/right bar configurations.
🔍 Key Features:
Detects Fractal Highs and Lows based on user-defined pivot settings.
Draws a green line and label ("FH") at the most recent Fractal High.
Draws a red line and label ("FL") at the most recent Fractal Low.
All lines extend from the confirmation bar to the current candle.
Automatically removes old lines and labels for a clean, uncluttered chart.
🛠️ Customizable Inputs:
Left & Right bars for pivot sensitivity
Line width for visibility
📌 Use Cases:
Identifying structure shifts
Recognizing key swing points
Supporting liquidity and breakout strategies
💡 Fractals are confirmed only after the full formation of the pattern (left and right bars). This ensures reliability over reactivity.
This script is designed for intraday to swing traders who want a reliable way to visualize market turning points with minimal noise.
Pivot ATR Zones [v6]🟩 Pivot ATR Zones
Overview:
The Pivot ATR Zones indicator plots dynamic support and resistance zones based on pivot highs and lows, combined with ATR (Average True Range) volatility levels. It helps traders visually identify potential long and short trade areas, along with realistic target and stop loss zones based on market conditions.
Features:
Automatically detects pivot highs and lows
Draws ATR-based entry zones on the chart
Plots dynamic take-profit and stop-loss levels using ATR multipliers
Color-coded long (green) and short (red) zones
Entry arrow markers for clearer trade visualization
Real-time alerts when new zones form
Best For:
Scalpers, intraday traders, and swing traders who want a visual, volatility-aware way to mark potential trade areas based on key pivot structures.
How to Use:
Look for newly formed green zones for long opportunities and red zones for short setups.
Use the dashed lines as dynamic take-profit and stop levels, tuned to the current ATR value.
Combine with other confirmation tools or indicators for optimal results.
Trend Oscillator# Trend Oscillator: Advanced Technical Analysis Indicator
## Overview
The Trend Oscillator is a sophisticated technical analysis tool designed to identify market trends, momentum shifts, and potential reversal points. Unlike basic oscillators, this indicator combines key analytical approaches to provide a more comprehensive market analysis:
1. **Mean Deviation-Based Oscillator**:(160) At its core, it measures price deviations from moving averages normalized by mean deviation
2. **Fixed Reference Levels**: Clear overbought/oversold thresholds that define extreme market conditions
3. **Trend Filtering**: EMA(36)-based trend direction confirmation to reduce false signals
## Technical Foundation
### Core Calculation Method
The indicator derives its primary oscillator value using a normalized deviation method:
- Calculates a typical price (average of source + high + low)
- Measures the deviation of typical price from its moving average
- Normalizes this deviation by the mean deviation multiplied by a scaling factor (0.015)
This formula effectively creates a momentum oscillator that quantifies how far price has moved from its equilibrium value, relative to typical market volatility.
### Fixed Overbought/Oversold Levels
The Trend Oscillator uses consistent reference levels to identify extreme market conditions:
- Standardized overbought level set at +100
- Standardized oversold level set at -100
- Neutral zone centered around the zero line
These fixed thresholds provide reliable reference points for signal generation and trend strength assessment.
### Trend Filtering Mechanism
The indicator incorporates an EMA-based trend filter that:
- Calculates a directional bias using price position relative to its EMA 36
- Modifies oscillator interpretation based on the prevailing trend
- Helps distinguish between counter-trend corrections and actual reversals
## How to Use the Trend Oscillator
### For Trend Identification
- **Bullish trend**: Oscillator above zero with positive slope
- **Bearish trend**: Oscillator below zero with negative slope
- **Trend strength**: Distance from zero line indicates trend intensity
- **Trend confirmation**: When oscillator and trend filter align
### For Entry Signals
- **Long entry opportunities**:
- Oscillator crossing above the signal line during uptrend
- Oscillator exiting oversold territory with trend filter positive
- Price showing strength while oscillator moves from negative to positive
- **Short entry opportunities**:
- Oscillator crossing below the signal line during downtrend
- Oscillator exiting overbought territory with trend filter negative
- Price showing weakness while oscillator moves from positive to negative
### For Exit Signals
- **Taking profits**: When oscillator approaches extreme levels in your trade direction
- **Stop-loss placement**: When oscillator crosses signal line against your position
- **Trend change warning**: When oscillator crosses zero line against your position
## Customization Options
### General Settings
- **Length**: (160)Controls the calculation period for the oscillator (higher values create smoother, less sensitive readings)
- **Source**: The price data input (close, open, high, low, hl2, hlc3, etc.)
### Signal Line Settings
- **Signal Line**: Optional smoothed version of the oscillator for crossover signals
- **Signal Length**:(36) Determines signal line responsiveness
### Level Settings
- **Overbought/Oversold Levels**: Standard thresholds that define extreme conditions
### Trend Filter Settings
- **Trend Period**: Lookback period for trend direction calculation
- **Trend Source**: Price data used for trend determination
### Visual Settings
- **Show Background Color**: Toggles colored background based on oscillator readings
- **Background Transparency**: Controls the opacity of background coloring
## Trading Strategy Applications
### Trend-Following Approach
1. Enter in the direction of the prevailing trend when:
- Oscillator and trend filter align
- Oscillator crosses signal line in trend direction
- Price pulls back to neutral zone during strong trend
2. Exit when:
- Oscillator crosses signal line against position
- Trend filter changes direction
- Oscillator reaches extreme level in your trade direction
### Counter-Trend Approach
1. Look for reversal opportunities when:
- Oscillator reaches extreme overbought/oversold levels
- Signal line crossover occurs at extreme readings
- Price action confirms potential reversal
2. Exit when:
- Target price levels are reached
- Oscillator returns to neutral zone
- New signals emerge in opposite direction
## Indicator Strengths
- Combines momentum and trend analysis in one comprehensive tool
- Consistent reference levels provide reliable benchmarks
- Reduces false signals through trend filter confirmation
- Visual color-coding provides intuitive market context
## Best Practices
- Effective on all timeframes for trend analysis
- Use in conjunction with support/resistance or price action
- Start with default settings and gradually adjust to your trading style and instrument
- Consider the overall market context when interpreting signals
The Trend Oscillator offers traders a comprehensive technical analysis framework that goes beyond simplistic overbought/oversold readings by incorporating trend context and normalized deviation methodology—providing a nuanced approach to market analysis with clear, consistent reference points.
Zero Lag MTF Moving Average by CoffeeshopCryptoBased on Moving Average Types supplied by @TradingView www.tradingview.com
Ideas and code enhanced to show higher timeframe by @CoffeeShopCrypto
It’s time to take the guesswork out of moving averages and multiple timeframes when day trading. Moving averages are a cornerstone of many trading strategies, often viewed as dynamic support and resistance levels. Traders rely on these levels to anticipate price reactions, whether it’s a bounce in a trending market or a reversal in a ranging one. Additionally, the direction and alignment of multi timeframe moving averages—whether they’re moving in the same direction or diverging—provide critical clues about market momentum and potential reversals. However, the traditional higher timeframe moving average indicators force traders to wait for higher timeframe candles to close, creating lag and missed opportunities.
The Old Way
For example: If you are on a 5 minute chart and you want to observe the location and direction of a 30 minute chart Moving Average, you'll need to wait for a total of 6 candles to close, and again every 6 candles after that. This only creates more lag.
The New Way
Now there is no waiting for high timeframe session candles to close. No matter what timeframe Moving Average you want to know about, this indicator will show you its location on your current chart at any time in real time.
For those who prefer Bollinger Bands, this indicator adds a whole new dimension to your strategy. Traders often wait for price action to break outside the lower time frame Bollinger bands before considering a trade, while still seeking key support or resistance levels beyond them. But if you don't know the position of your higher time frame Bollinger, you could be trading into a trap. With Zero Lag Multi Timeframe Moving Average, you can view both your current and higher timeframe Bollinger Bands simultaneously with zero waiting. This lets you instantly see when price action is traveling between the bands of either timeframe or breaking through both—indicating a strong trend in that direction. Additionally, when both sets of Bollinger Bands overlap at the same price levels, it highlights areas of strong consolidation and ranging conditions, giving you a clear picture of market dynamics. This is a key element in price action that tells you there is currently no direction to the market and both the current and higher time frames are flat.
Enter Zero Lag Multi Timeframe Moving Average—the ultimate tool for real-time higher timeframe moving averages and Bollinger Bands. This innovative indicator eliminates the delay, delivering instant, precise values for higher timeframe averages and bands, even on open candles. Seamlessly combining current and higher timeframe data, it allows traders to identify key moments where moving averages or Bollinger Bands align or diverge, signaling market conditions. Whether you’re gauging the strength of a trend, pinpointing potential reversals, or identifying consolidation zones, Zero Lag Multi Timeframe Moving Average gives you the clarity needed to make better trading decisions according to market conditions.
Why is this "Mashup" of moving averages different and important?
Honestly its really about the calculation thats imported through the "import library" function.
Heres what it does:
The ZLMTF-MA is designed to help traders easily see where higher timeframe moving averages and Bollinger Bands are—without needing to switch chart timeframes or wait for those larger candles to close. It works by adjusting common moving average types like SMA, EMA, and VWMA to show what they would look like if they were based on a higher timeframe, right on your current chart. This helps users stay focused on their main timeframe while still having a clear view of the bigger picture, making it easier to spot trend direction, key support and resistance levels, and overall market structure. The goal is to keep things simple, fast, and more visually informative for everyday traders.
Bollinger Bands
When working with Bollinger Bands, a common strategy is to take the trades once price action has escaped through the top or bottom of your current Bollinger Band.
A false breakout occurs when both Bollinger Bands are not moving in the same direction as eachother or when they are overlapping.
Moving Averages as Support and Resistance:
Traders who use Moving Averages as support or resistance, looking for rejections or failures of these areas can now see multiple timeframe price action instantly and simultaneously.
Trading Setup Examples:
Price Action Scenario 1:
Higher Timeframe Ranging-
When price action breaks through a current moving average headed toward a higher timeframe moving average, trades are taken with caution if the moving averages are converging.
Price Action Scenario 2:
Strong Trending Market -
If the moving averages are in the same direction, and your price action is now leading the low timeframe moving average, you have re-entered a strong trend.
Price Action Scenario 3:
High Timeframe Rejections -
If you have a rejection of a higher timeframe moving average, and your both averages are still diverging, this is the end of a pullback as you re-enter a strong trend in the original direction
Price Action Scenario 4:
Trend Reversals -
If you close beyond both the low and high timeframe moving averages, you can consider that price action is strong enough to change direction here and you should prepare for trade setups in the opposite direction of the previous.
HTF MA Label Information:
Even if your high timeframe moving average is turned off, you can still see this label.
It gives you a quick reminder of what high timeframe settings you have used to see MA values.
Vietnamese Market Structure With CountersThis indicator is designed to track Market Structure with Swing-Low Breakdowns and Swing-High Breakups specifically tailored for the Vietnamese stock market, though it can be applied elsewhere too. By default, it uses a 10-period EMA to dynamically detect key turning points in price action and count significant breakdowns or breakups from previous swing levels.
As an open source, you can modify the source code to match your needs.
What it does:
Detects when price breaks below previous swing lows or above previous swing highs.
Plots swing levels for both highs and lows.
Displays labeled counters on the chart to show how many consecutive breakdowns or breakups have occurred.
Helps traders identify trend shifts and possible exhaustion in moves.
Why it's useful:
This tool is great for visually tracking market momentum and structure changes — especially in trending or volatile environments. It emphasizes structure over indicators, helping you understand price behavior in a simplified, intuitive way.
License:
This script is published under the Mozilla Public License 2.0. Feel free to use, modify, and contribute!
Created with care by @doqkhanh.
If you find it useful, consider leaving a comment or sharing it with others!
GEX and OI levelsIntroduction
Harness the power of institutional options flow analysis with the GEX & OI Levels indicator – an advanced tool that brings professional-grade options analytics directly to your TradingView charts. This comprehensive indicator visualizes Gamma Exposure (GEX) and Open Interest (OI) data, revealing hidden market forces that drive price action and potential reversal points. Designed for serious traders who understand that options positioning often precedes price movement.
What Is GEX & OI Levels?
GEX & OI Levels is a sophisticated indicator that analyzes options market positioning through the lens of dealer gamma exposure and open interest concentration. By visualizing where market makers must hedge their options positions, you can identify potential support/resistance levels, price magnets, and likely volatility zones. The indicator processes strike-by-strike options data to generate actionable insights about institutional positioning and potential price behavior.
Key Features
Complete Gamma Exposure Analysis
Dynamic GEX histogram showing dealer positioning at each strike
Visual identification of positive and negative gamma zones
Smoothed total GEX calculation with customizable parameters
Zero gamma level identification - critical price points where dealer behavior changes
Critical Price Level Identification
Gamma flip points that often act as magnets for price
Gamma walls where significant hedging activity may create support/resistance
Golden strike detection where both call and put OI show unusual concentration
Max pain calculation showing the price point where options expiration causes maximum loss
Dealer Positioning Intelligence
Analysis of dealer hedging requirements for price movements
Calculation of expected dealer behavior during rallies and dips
Signal strength indicators showing potential hedging impact
Delta-adjusted GEX for more accurate near-expiration analysis
Comprehensive Data Visualization
Highly configurable visualization of GEX histogram with logarithmic scaling
Strike-by-strike data table with color-coded gamma values
Top OI levels for both calls and puts with customizable highlighting
Detailed metrics panel showing all key GEX and options analytics
Use Cases
1. Identifying Potential Price Magnets
Gamma flip points often act as magnets for price, especially near expiration
Zero gamma levels show where dealer hedging pressure changes direction
Golden strikes reveal where both call and put sellers have significant exposure
2. Discovering Support & Resistance Zones
Gamma walls indicate where dealer hedging may create price barriers
Top OI levels often become psychological support/resistance points
Max pain level shows where options writers have incentive to push price
3. Predicting Market Volatility
Low GEX environments signal potential for increased volatility
High GEX environments typically lead to price compression and reduced volatility
Dealer positioning metrics indicate whether market makers are dampening or amplifying moves
4. Timing Market Reversals
Extreme dealer positioning often precedes market reversals
Proximity to flip points provides timing signals for potential turns
Signal strength measurement helps quantify the potential impact
5. Enhancing Trading Strategy
Align your trades with or against dealer hedging flows
Use dealer positioning analysis to set more precise stop losses and targets
Combine with technical analysis for high-probability trading setups
Customization Options
The indicator offers extensive customization capabilities:
Data Input & Configuration
CSV data input for option chain information
Adjustable DTE (Days To Expiration) settings
Risk-free rate and implied volatility parameters
Custom symbol formatting for different data providers
Calculation Settings
Gamma weight multiplier for sensitivity adjustment
Strike range limitations to focus on relevant price zones
Gamma scaling options based on strike distance
Static IV mode for environments without option price data
Visualization Options
Customizable histogram appearance including scale and transparency
Color settings for positive/negative GEX, flip points, and gamma walls
OI level display with configurable number of levels
Strike data table with adjustable strike count
Analytics Settings
Delta-adjusted GEX for improved accuracy
Dealer positioning analytics with hedge efficiency parameters
Alerting capabilities for price approaching key levels
Golden strike highlighting for significant option activity zones
How to Use
Apply the indicator to your chart
Input your options data in CSV format using the required structure
Configure the expiration date to match your analysis timeframe
Adjust gamma calculation parameters based on your instrument
Use the GEX histogram and key levels to identify potential price targets
Monitor dealer positioning metrics to anticipate market behavior
Trade with confidence knowing where institutional hedging activity is concentrated
Perfect for options traders, futures traders, swing traders, and anyone who wants to incorporate institutional-level options analysis into their technical trading strategy.
Elevate your trading with GEX & OI Levels - where options positioning reveals future price action.
Ultimate NATR█ | Overview
This N-ATR (Normalized Average True Range) volatility indicator illustrates the trend of percentage-based candle volatility over a self-defined number of bars (period). The primary objective of the indicator is to highlight periods of high or low volatility, which can be exploited within the cyclical logic of volatility contraction and expansion. If market behavior is inherently cyclical, it naturally follows that candle volatility itself also exhibits cyclical characteristics.
It can therefore be defined as a recurring pattern:
Low Volatility --> High Volatility --> Low Volatility -->
Here is a concrete example of the cyclical phases of volatility, which compresses during Accumulation or Distribution phases, and then explodes with a mark-up or mark-down in price.
█ | Features
🔵 Plots on Overlay false
Smoothed NATR Line
NATR's Fixed Levels
NATR's Standard Deviation Levels (Dynamic)
🔵 Elements, overlapped to the chart
Analytical and Statistical Tables
NATR Information Label
🔵 Customization
Button to calculate fixed or dynamic (auto-calculated) levels
Dark / light mode based on the layout background
Setting of the initial date for the calculation of N-ATR dependent functions
ATR period
Moving Average of the N-ATR
Data sample (number) on which to calculate the standard deviation of the N-ATR
Adjustment of the multiplicative coefficients of the standard deviation σ
Setting of static values L1, L2, L3, and L4 of the N-ATR
Adjustment of the table zoom factor
█ | N-ATR Calculation
The N-ATR function is built upon the ATR (Average True Range), the quintessential volatility indicator.
Once the ATR_period is defined, the N-ATR is calculated using the following formula:
N-ATR = 100 * ATR / close
A moving average of the N-ATR completes the main indicator curve (yellow), making the function smoother and less sensitive to the instantaneous fluctuations of individual candles.
SMA_natr = sum(natr_i) / ATR_period
natr = 100 * ta.atr(periodo_ATR) / close
media_natr = ta.sma(natr, media_len)
█ | Settings
Show selected calc period : allows you to display or hide a background color that extends from the initial calculation date to the current bar, or from the first available bar if the selected date is earlier.
Set data range for ST.DEV : this setting defines the number of bars over which the standard deviation is calculated—an essential foundational element for plotting the upper and lower curves relative to the N-ATR, as well as for defining the statistical ranges in the tables overlaid on the price chart.
Static Levels : these are user-defined input values representing N-ATR value thresholds, used to classify table values within the ranges L1–L2 / L2–L3 / L3–L4 / >L4. To be meaningful, the user is expected to conduct separate statistical analysis using a spreadsheet or external data analysis tools or languages.
Coefficients x, w, y : these are input values used in the code to calculate statistical ranges and the bands above and below the N-ATR. For example, when expressing the statistical range as μ ± nσ, n can take the value of x, w, or y. By default, the values are x=1, w=2, y=3. However, as explained, they can be customized to represent wider or narrower statistical clusters, depending on the user's analytical preference.
█ | Tables
Static Levels : when the boolean button "Fixed Levels" is active, the table counts and distributes the data across five ranges, defined by the custom input values L1, L2, L3, and L4. Studying the table immediately answers the question: "Have I set appropriate values for the L_x levels?"
If the majority of data points fall within the lowest range, it indicates that the levels are spaced too far apart; conversely, if most values are in the "> L4" range, the levels are likely too narrow.
From left to right, the table also displays the probability that the current candle might move from its current range to the next one (Update Prob.); the absolute frequency of each range and the relative frequency are shown in the rightmost column.
Dynamic Levels : alternatively, you can deselect "Fixed Levels" to obtain an auto-calculated / self-adjusting representation of the N-ATR and its bands, based on the standard deviation input settings. In this case, the table takes on a more statistical form, useful for analyzing the frequency of outliers beyond a certain standard deviation, as defined by the largest multiplicative coefficient "y".
This visualization may also be preferred when aiming to study the standard deviation of the N-ATR in greater depth for a given asset, timeframe, and configuration more broadly.
█ | Next-to-Price Label
Information in the label next to the live price: if the first settings button in the indicator, "Fixed levels", is enabled (true), a label appears next to the price showing information about the relative position of the N-ATR associated with the current candle.
Specifically, if:
natr ≤ L1, ⇨ "Minimum-"
natr > L1 and natr ≤ L2, ⇨ "Minimum+"
natr > L2 and natr ≤ L3, ⇨ "Neutral L3"
natr > L3 and natr ≤ L4, ⇨ "Topping L4"
natr > L4, ⇨ "Excess L4: natr > V4"
Additionally, the corresponding N-ATR range is displayed to the right of the evaluated category for the individual candle.
1-Please note: this allows you to avoid constantly checking the N-ATR curve, especially when working in full-screen mode and focusing solely on the price chart for a cleaner view.
2-Please note : unfortunately, the informational label is not available in Dynamic display mode.
█ | Conclusion
• This indicator captures a snapshot of market turbulence. Whether currently unfolding or approaching, the combination of volatility breakout forecasting with price structure analysis—further evaluated based on periods of compression or high turbulence—offers traders a powerful tool for identifying trend-aligned trade opportunities.
• The accompanying analytical tables enhance the indicator by enabling a statistical interpretation of the likelihood that certain excess thresholds will be reached. Based on this data, traders can gain deeper insight into the nature of the asset, identify outlier volatility levels, and strengthen the hedging of their trades. Used as a filter, this indicator significantly improves win rate potential.
Please note : the indicator is shown here on a black background. I suggest you trying it on a white layout as well, so you can decide which visualization best suits your preferences.
Bitcoin Impact AnalyzerSummary of the "Bitcoin Impact Analyzer" script, the adjustments users can make, and an explanation of what the chart and table represent:
Script Summary:
The "Bitcoin Impact Analyzer" script is designed to help traders and analysts understand the relationship between a chosen altcoin and Bitcoin (BTC). It does this by:
Fetching price data for the specified altcoin and Bitcoin.
Calculating several key comparative metrics:
Normalized Prices: Shows the percentage performance of both assets from a common starting point.
Price Correlation: Measures how similarly the two assets' prices move over a defined period.
Beta: Indicates the altcoin's volatility relative to Bitcoin.
Altcoin/BTC Ratio: Shows the altcoin's value expressed in Bitcoin.
Fetching and displaying Bitcoin Dominance (BTC.D) data.
Visualizing these metrics on the chart as distinct plots.
Displaying the current values of these key metrics in a data table on the chart for quick reference.
The script aims to provide insights into whether an altcoin is outperforming or underperforming Bitcoin, how closely its price movements are tied to Bitcoin's, and its relative volatility.
User Adjustments:
Users can customize the script's behavior through several input settings:
Symbol Inputs:
Altcoin Symbol: Users can enter the ticker symbol for any altcoin they wish to analyze (e.g., BINANCE:ETHUSDT, KUCOIN:SOLUSDT).
Bitcoin Reference Symbol: Users can specify the Bitcoin pair to use as a reference, though BINANCE:BTCUSDT is a common default.
Lookback for Correlation/Beta:
Lookback Period: This integer value (default 50 periods) determines how many past candles are used to calculate the price correlation and beta.
A shorter lookback makes the metrics more sensitive to recent price action.
A longer lookback provides a smoother, more stable indication of the longer-term relationship.
Plot Visibility Options:
Users can toggle on or off the display of each individual plot on the chart:
Normalized BTC & Altcoin Prices
Altcoin/BTC Ratio
Correlation Plot
Bitcoin Dominance (BTC.D)
Beta Plot
This allows users to focus on specific metrics and reduce chart clutter.
What the Chart Represents:
The chart visually displays the historical trends and relationships of the selected metrics:
Normalized Prices Plot: Two lines (typically orange for BTC, blue for the altcoin) show the percentage growth of each asset from the start of the loaded chart data (or the first available data point for each symbol). This makes it easy to see which asset has performed better over time on a relative basis.
Correlation Plot: A single line (purple) oscillates between -1 and +1.
Values near +1 indicate a strong positive correlation (altcoin and BTC prices tend to move in the same direction).
Values near -1 indicate a strong negative correlation (they tend to move in opposite directions).
Values near 0 indicate little to no linear relationship.
Lines at +0.7 and -0.7 are often plotted as thresholds for "strong" correlation.
Beta Plot (if enabled): A single line (teal) shows the altcoin's volatility relative to BTC.
A Beta of 1 (often marked by a dashed line) means the altcoin has, on average, the same volatility as BTC.
Beta > 1 suggests the altcoin is more volatile than BTC (moves by a larger percentage for a given BTC move).
Beta < 1 suggests the altcoin is less volatile than BTC.
Bitcoin Dominance Plot: An area plot (gray) shows the percentage of the total cryptocurrency market capitalization that Bitcoin holds. This helps understand broader market sentiment and capital flows.
Altcoin/BTC Ratio Plot: A line (fuchsia) shows the price of the altcoin denominated in BTC.
An upward trend means the altcoin is gaining value against Bitcoin (outperforming).
A downward trend means the altcoin is losing value against Bitcoin (underperforming).
What the Table Represents:
The data table, typically located in the bottom-right corner of the chart, provides a snapshot of the current values for the most important calculated metrics. It includes:
Altcoin: The ticker symbol of the analyzed altcoin.
Bitcoin Ref: The ticker symbol of the Bitcoin reference.
Correlation (lookback): The current correlation coefficient between the altcoin and BTC, based on the specified lookback period. The value is color-coded (e.g., green for strong positive, red for strong negative).
Beta (lookback): The current beta value of the altcoin relative to BTC, based on the specified lookback period. The value may be color-coded to highlight significantly high or low volatility.
BTC.D Current: The current Bitcoin Dominance percentage.
ALT/BTC Ratio: The current price of the altcoin expressed in Bitcoin.
The table offers a quick, at-a-glance summary of the present market dynamics between the two assets without needing to interpret the lines on the chart for their exact current values.
Precision Trend Shot | JeffreyTimmermansPrecision Trend Shot
The "Precision Trend Shot" Indicator is an advanced technical tool designed to provide a dynamic and adaptive view of market trends. By combining three core components—RSI Oscillator, LSMA ATR, and Adaptable Trend—this indicator delivers precise signals that help traders identify market direction, volatility, and potential trend reversals. The calculated total score, derived from these components, provides a clear, actionable view of market conditions.
Key Features
Multi-Component Analysis: Integrates three key indicators (RSI, LSMA ATR, and Adaptable Trend) for a comprehensive view of market trends.
Dynamic Trend Classification: Categorizes market states as "Bullish" or "Bearish", based on a combined score.
Standard Deviation Bands: Displays standard deviation bands around the score line for enhanced volatility visualization.
Gradient Background Coloring: Visually highlights market phases with gradient colors, aiding quick interpretation.
Customizable Visuals: Offers extensive settings for coloring, background gradients, and signal visibility.
Real-Time Alerts: Generates alerts for significant trend changes or transitions between market states.
Inputs & Settings
RSI Settings:
RSI Source: Default: Close price. Defines the data source for RSI calculation.
RSI Length: Default: 10. Sets the period for calculating RSI.
LSMA ATR Settings:
LSMA Source: Default: Close price. Defines the data source for LSMA calculation.
LSMA Length: Default: 21. Sets the period for calculating the Least Squares Moving Average.
ATR Length: Default: 12. Sets the period for calculating the Average True Range.
Adaptable Trend Settings:
Trend Length: Default: 5. Sets the period for calculating the trend.
Smoothing Length: Default: 5. Controls the smoothing of trend volatility.
Sensitivity: Default: 1.5. Adjusts the sensitivity of trend bands.
Standard Deviation Settings:
Enable Standard Deviation Bands: Default: True. Toggles the display of standard deviation bands.
Standard Deviation Length: Default: 20. Sets the period for standard deviation calculation.
Standard Deviation Multiplier: Default: 2.0. Adjusts the width of the bands.
Smoothing Length: Default: 5. Controls the smoothing of standard deviation bands.
Visual Settings:
Enable Candle Coloring: Default: True. Colors candles based on market state (Bullish or Bearish).
Enable Background Gradient: Default: True. Applies gradient coloring to the background based on trend direction.
Score Line Colors: Customize colors for bullish or bearish score lines.
Calculation Process
RSI Calculation:
Computes the Relative Strength Index (RSI) of the selected source data.
Signals bullish (RSI > 50) or bearish (RSI < 50) conditions.
LSMA ATR Calculation:
Computes LSMA for trend direction and ATR for volatility measurement.
Generates buy and sell signals based on crossover and crossunder of ATR bands.
Adaptable Trend Calculation:
Calculates dynamic trend levels using EMA and standard deviation bands.
Classifies trend states as Bullish or Bearish.
Combined Signal Calculation:
Averages the signals from RSI, LSMA ATR, and Adaptable Trend to generate a total score.
Classifies the market as "Bullish" or "Bearish" based on this score.
Standard Deviation Bands:
Plots standard deviation bands around the combined signal for enhanced volatility analysis.
Gradient Background Coloring:
Colors the chart background based on the identified market state (Bullish or Bearish).
How to Use the Precision Trend Shot Indicator
Identifying Market States:
Bullish Market: Total score > 0, gradient background green.
Bearish Market: Total score < 0, gradient background red.
Confirming Signals:
Use RSI and LSMA ATR signals for early indications.
Use Trend Recon for confirming longer-term trend direction.
Visualizing Volatility:
Standard deviation bands highlight potential reversal zones.
Dynamic Alerts
The Precision Trend Shot Indicator includes a robust alert system for real-time market transitions:
Bullish to Bearish: Market shifts from a bullish to bearish trend.
Bearish to Bullish: Market shifts from a bearish to bullish trend.
Conclusion
The Precision Trend Shot Indicator is an advanced, versatile tool for identifying market trends, visualizing volatility, and generating actionable signals. With customizable settings, dynamic alerts, and clear visual representation, it is an essential addition to any trader’s toolkit.
-Jeffrey
ADR/ATR Ranges & DashboardADR/ATR Ranges & Dashboard
Description:
The ADR/ATR Ranges & Dashboard indicator is a comprehensive tool designed to visualize key market volatility levels and provide traders with a clear daily framework. This script combines Average Daily Range (ADR) and Average True Range (ATR) metrics across multiple timeframes to assist in defining realistic intraday price targets and stop levels.
Key Features:
ADR Levels (Upper/Lower) plotted automatically based on a customizable period.
Daily High/Low and Previous Day High/Low plotted for context and range awareness.
Custom Range High/Low: Define your own time range to track session-specific extremes.
Dashboard Panel summarizing ADR values, distances to key levels, and custom range data.
Multi-timeframe ATR Dashboard (M1, M5, M15, H1, H4, D1) for detailed volatility insight.
Fully customizable colors and line styles (via the Style tab).
Adjustable dashboard font size and position.
How ADR differs from ATR:
ADR calculates the average difference between daily highs and lows over a set number of days — showing how much price typically moves per day.
ATR measures the average range (including gaps) within a given timeframe — providing a more comprehensive view of volatility.
Ideal for:
Day traders, scalpers, and swing traders needing clear intraday structure.
Volatility-based trading strategies (range breakouts, mean reversion, etc.).
Identifying realistic take-profit and stop-loss zones based on historical price behavior.
Created by: Precious Life Dynamics
Engulfing Candles with Liquidity SweepOverview
The Engulfing Candles with Liquidity Sweep indicator is designed to highlight high- and low-probability engulfing candle patterns, incorporating liquidity sweep logic for enhanced price action analysis. This script visually marks bullish and bearish engulfing events, differentiating between high-probability and low-probability setups, and plots key Fibonacci levels for each event.
🔶 USAGE
This indicator is ideal for traders seeking to identify potential reversal or continuation points based on engulfing candle patterns and liquidity sweeps. High-probability signals are based on strict engulfing and sweep criteria, while low-probability signals offer additional context for nuanced price action.
• High Probability Engulfing:
Highlights strong bullish or bearish engulfing candles that also sweep the previous candle’s high or low, suggesting a significant shift in market sentiment.
• Low Probability Engulfing:
Marks less strict engulfing patterns where the close remains within the previous candle’s range, providing early signals for potential reversals.
• Fibonacci Levels:
For each detected pattern, the script draws a 50% Fibonacci retracement line, helping traders identify potential retracement or reaction zones.
🔹 SETTINGS
• High Probability Engulfing Settings:
• Customizable colors, line styles, and widths for bullish and bearish fib lines
• Option to show/hide fib lines and pattern markers
• Low Probability Engulfing Settings:
• Separate color and style controls for low-probability signals
• Option to show/hide fib lines and pattern markers
• Alerts:
• Built-in alert conditions for all pattern types, enabling automated notifications
🔶 DETAILS
High Probability Bullish Engulfing:
• Previous candle bearish
• Current candle bullish
• Current low sweeps previous low
• Current close above previous high
High Probability Bearish Engulfing:
• Previous candle bullish
• Current candle bearish
• Current high sweeps previous high
• Current close below previous low
Low Probability Bullish Engulfing:
• Previous candle bearish
• Current candle bullish
• Current low sweeps previous low
• Current close between previous open and high
Low Probability Bearish Engulfing:
• Previous candle bullish
• Current candle bearish
• Current high sweeps previous high
• Current close between previous open and low
🔶 NOTES
• The indicator is fully customizable and can be adapted to various trading styles.
• All signals and levels are plotted directly on the chart for easy reference.
• Alerts can be set for any pattern, supporting both discretionary and automated trading approaches.
Disclaimer:This script is for informational and educational purposes only. It does not constitute financial advice. Use at your own risk.
Custom Message and Notes Rotator [NAMI-TRADING]Custom Message and Notes Rotator
Display up to five rotating text messages directly on your chart—ideal for notes, reminders or context cues without popping up alerts.
Key Features
Five Custom Messages & Toggles
Define Message 1–5 and switch each on/off independently.
Custom Text & Background Colors
Pick any text color and background shade to suit your chart theme.
Five Text-Size Presets
Choose from tiny, small, normal, large or huge for perfect readability.
Adjustable Rotation Interval
Set how often (in seconds) the display cycles through your messages.
Nine Position Options
Place your message table anywhere: top_left → bottom_right.
Inputs
Message 1–5 (string)
Show Message 1–5 (bool)
Text Color (color)
Background Color (color)
Text Size (tiny | small | normal | large | huge)
Interval (seconds) (int ≥1)
Table Position (top_left, top_center, …, bottom_right)
No guarantees or investment advice. This is a simple visual‐utility overlay. Feel free to experiment with colors, sizes and timing to suit your workflow!
On Balance Volume W DivergenceOBV With Divergence Indicator
A comprehensive On Balance Volume (OBV) indicator enhanced with divergence detection capabilities.
Core Features:
Classic OBV calculation with volume-based price movement tracking
Advanced divergence detection system
Multiple smoothing options for OBV
Bollinger Bands integration
Technical Components:
Volume-based price movement analysis
Pivot point detection for divergence
Customizable lookback periods
Adjustable divergence range parameters
Customization Options:
Multiple Moving Average types (SMA, EMA, SMMA, WMA, VWMA)
Bollinger Bands with adjustable standard deviation
Divergence sensitivity settings
Visual customization for signals and alerts
The indicator combines traditional OBV analysis with modern divergence detection, offering traders a powerful tool for identifying potential trend reversals and market momentum shifts.
Key Parameters:
- Pivot Lookback Right/Left: 5 (default)
- Divergence Range: 5-60 bars
- MA Length: 14 (default)
- BB StdDev: 2.0 (default)
Alert System:
- Bullish divergence alerts
- Bearish divergence alerts
- Customizable alert messages
Note: The indicator requires volume data to function properly and will display an error if volume data is not available.
Position size Margin & Lot Calculator [Algo Star]Position Size Margin & Lot Calculator is a lightweight Pine v5 indicator that helps you scale into a trade with five incremental “steps.”
What it does:
Takes your total capital and leverage settings
Splits your risk into five proportioned entries
Shows both the USD margin required and the corresponding MT4/MT5 lot size for each entry
Why you’ll love it:
No manual calculations—everything is displayed in a neat on-chart table
Fully configurable: set your account size, leverage, contract size and price source
Ideal for pyramiding or averaging in with controlled risk at each step
Just add it to any chart, tweak your inputs, and immediately see exactly how much margin and how many lots to allocate at each of the five pre-defined steps—perfect for systematic position sizing without the headache.
Adaptive Momentum Oscillator [LuxAlgo]The Adaptive Momentum Oscillator tool allows traders to measure the current relative momentum over a given period using the maximum delta in price.
It features a histogram with gradient color, divergences, and an adaptive moving average that allows traders to clearly see the smoothed trend direction.
🔶 USAGE
This unbounded oscillator has positive momentum when values are above 0 and negative momentum when values are below 0. The adaptive moving average is used as a minimum lag smoothing tool over the momentum histogram.
🔹 Signal Line
There are two main uses for the signal line drawn on the chart above.
Momentum crosses above or below the signal line: acceleration in momentum.
Signal line crosses the 0 value: positive or negative momentum.
🔹 Data Length
On the chart above, we can compare different length sizes and how the tool values change, allowing traders to get a shorter or longer-term view of current market strength.
🔹 Smoothing Length
In the previous figure, we can compare how different Smoothing Length values affect the oscillator output.
🔹 Divergences
The divergence detector is disabled by default. Traders can enable it and adjust the divergence length from the settings panel.
As we can see in the chart above, by changing the length of the divergences, traders can fine-tune their detection, a small number will detect smaller divergences, and use a larger number for larger divergences.
🔶 SETTINGS
Data: Select data source, close price by default
Data Length: Select the length for data gathering
Smoothing Length: Select the length for data smoothing
Divergences: Enable/Disable divergences detection and length
Quarterly Theory ICT 05 [TradingFinder] Doubling Theory Signals🔵 Introduction
Doubling Theory is an advanced approach to price action and market structure analysis that uniquely combines time-based analysis with key Smart Money concepts such as SMT (Smart Money Technique), SSMT (Sequential SMT), Liquidity Sweep, and the Quarterly Theory ICT.
By leveraging fractal time structures and precisely identifying liquidity zones, this method aims to reveal institutional activity specifically smart money entry and exit points hidden within price movements.
At its core, the market is divided into two structural phases: Doubling 1 and Doubling 2. Each phase contains four quarters (Q1 through Q4), which follow the logic of the Quarterly Theory: Accumulation, Manipulation (Judas Swing), Distribution, and Continuation/Reversal.
These segments are anchored by the True Open, allowing for precise alignment with cyclical market behavior and providing a deeper structural interpretation of price action.
During Doubling 1, a Sequential SMT (SSMT) Divergence typically forms between two correlated assets. This time-structured divergence occurs between two swing points positioned in separate quarters (e.g., Q1 and Q2), where one asset breaks a significant low or high, while the second asset fails to confirm it. This lack of confirmation—especially when aligned with the Manipulation and Accumulation phases—often signals early smart money involvement.
Following this, the highest and lowest price points from Doubling 1 are designated as liquidity zones. As the market transitions into Doubling 2, it commonly returns to these zones in a calculated move known as a Liquidity Sweep—a sharp, engineered spike intended to trigger stop orders and pending positions. This sweep, often orchestrated by institutional players, facilitates entry into large positions with minimal slippage.
Bullish :
Bearish :
🔵 How to Use
Applying Doubling Theory requires a simultaneous understanding of temporal structure and inter-asset behavioral divergence. The method unfolds over two main phases—Doubling 1 and Doubling 2—each divided into four quarters (Q1 to Q4).
The first phase focuses on identifying a Sequential SMT (SSMT) divergence, which forms when two correlated assets (e.g., EURUSD and GBPUSD, or NQ and ES) react differently to key price levels across distinct quarters. For example, one asset may break a previous low while the other maintains structure. This misalignment—especially in Q2, the Manipulation phase—often indicates early smart money accumulation or distribution.
Once this divergence is observed, the extreme highs and lows of Doubling 1 are marked as liquidity zones. In Doubling 2, the market gravitates back toward these zones, executing a Liquidity Sweep.
This move is deliberate—designed to activate clustered stop-loss and pending orders and to exploit pockets of resting liquidity. These sweeps are typically driven by institutional forces looking to absorb liquidity and position themselves ahead of the next major price move.
The key to execution lies in the fact that, during the sweep in Doubling 2, a classic SMT divergence should also appear between the two assets. This indicates a weakening of the previous trend and adds an extra layer of confirmation.
🟣 Bullish Doubling Theory
In the bullish scenario, Doubling 1 begins with a bullish SSMT divergence, where one asset forms a lower low while the other maintains its structure. This divergence signals weakening bearish momentum and possible smart money accumulation. In Doubling 2, the market returns to the previous low and sweeps the liquidity zone—breaking below it on one asset, while the second fails to confirm, forming a bullish SMT divergence.
f this move is followed by a bullish PSP and a clear market structure break (MSB), a long entry is triggered. The stop-loss is placed just below the swept liquidity zone, while the target is set in the premium zone, anticipating a move driven by institutional buyers.
🟣 Bearish Doubling Theory
The bearish scenario follows the same structure in reverse. In Doubling 1, a bearish SSMT divergence occurs when one asset prints a higher high while the other fails to do so. This suggests distribution and weakening buying pressure. Then, in Doubling 2, the market returns to the previous high and executes a liquidity sweep, targeting trapped buyers.
A bearish SMT divergence appears, confirming the move, followed by a bearish PSP on the lower timeframe. A short position is initiated after a confirmed MSB, with the stop-loss placed
🔵 Settings
⚙️ Logical Settings
Quarterly Cycles Type : Select the time segmentation method for SMT analysis.
Available modes include : Yearly, Monthly, Weekly, Daily, 90 Minute, and Micro.
These define how the indicator divides market time into Q1–Q4 cycles.
Symbol : Choose the secondary asset to compare with the main chart asset (e.g., XAUUSD, US100, GBPUSD).
Pivot Period : Sets the sensitivity of the pivot detection algorithm. A smaller value increases responsiveness to price swings.
Pivot Sync Threshold : The maximum allowed difference (in bars) between pivots of the two assets for them to be compared.
Validity Pivot Length : Defines the time window (in bars) during which a divergence remains valid before it's considered outdated.
🎨 Display Settings
Show Cycle :Toggles the visual display of the current Quarter (Q1 to Q4) based on the selected time segmentation
Show Cycle Label : Shows the name (e.g., "Q2") of each detected Quarter on the chart.
Show Labels : Displays dynamic labels (e.g., “Q2”, “Bullish SMT”, “Sweep”) at relevant points.
Show Lines : Draws connection lines between key pivot or divergence points.
Color Settings : Allows customization of colors for bullish and bearish elements (lines, labels, and shapes)
🔔 Alert Settings
Alert Name : Custom name for the alert messages (used in TradingView’s alert system).
Message Frequenc y:
All : Every signal triggers an alert.
Once Per Bar : Alerts once per bar regardless of how many signals occur.
Per Bar Close : Only triggers when the bar closes and the signal still exists.
Time Zone Display : Choose the time zone in which alert timestamps are displayed (e.g., UTC).
Bullish SMT Divergence Alert : Enable/disable alerts specifically for bullish signals.
Bearish SMT Divergence Alert : Enable/disable alerts specifically for bearish signals
🔵 Conclusion
Doubling Theory is a powerful and structured framework within the realm of Smart Money Concepts and ICT methodology, enabling traders to detect high-probability reversal points with precision. By integrating SSMT, SMT, Liquidity Sweeps, and the Quarterly Theory into a unified system, this approach shifts the focus from reactive trading to anticipatory analysis—anchored in time, structure, and liquidity.
What makes Doubling Theory stand out is its logical synergy of time cycles, behavioral divergence, liquidity targeting, and institutional confirmation. In both bullish and bearish scenarios, it provides clearly defined entry and exit strategies, allowing traders to engage the market with confidence, controlled risk, and deeper insight into the mechanics of price manipulation and smart money footprints.
Smart Money Volume by P4 ProviderSmart Money Volume by P4 Provider is a proprietary volume-based tool designed to identify institutional activity across major trading sessions (Asian, London, and New York) with precision. It combines classical Volume Spread Analysis (VSA) with dynamically calculated session-wise volume averages , tracked in real-time on 1-minute and 5-minute charts.
Built for serious traders, this indicator highlights:
High-Volume Nodes: Automatically marks the highest volume bar of the day with a horizontal level.
Session-Based Volume Intelligence: Tracks and averages volume spikes during key sessions using both M1 and M5 granularities.
Smart Institutional Footprint: Reveals session-specific average volume levels via colored horizontal lines (Green for Asian, Purple for London, Red for NY).
Volume Strength Color Coding: Visualizes bullish/bearish volume intensity via dynamic bar coloring.
Ideal for scalpers, intraday traders, and smart money trackers seeking to align with institutional footprints.
Important Notes:
Time Zone Setup Required: Please adjust the UTC offset in the script according to your local time for accurate session alignment.
Optimized for 1-minute and 5-minute charts only.
For educational and analytical use. Not a buy/sell signal generator.
Developed by P4 Provider , this tool is part of a broader ecosystem focused on elite trading tools powered by real market behavior.
Candle Rating (1–5)This “Candle Rating (1–5)” indicator measures where each bar’s close sits within its own high-low range and assigns a simple strength score:
Range Calculation
It computes the candle’s total range (high − low) and finds the close’s position as a percentage of that range (0 = close at low, 1 = close at high).
Five-Point Rating
1 (Strong Buy): Close in the top 20% of the range
2 (Moderate Buy): 60–80%
3 (Neutral): 40–60%
4 (Moderate Sell): 20–40%
5 (Strong Sell): Bottom 20%
Visual Feedback
It plots the numeric rating above each bar (colored green → red), giving you an at-a-glance read of candle momentum and potential reversal strength across any timeframe.
Dealing rangeHi all!
This indicator will show you the current dealing range. The concept of dealing range comes from the inner circle trader (ICT) and gives you a range between an established swing high and an established swing low (the length of these pivots can be changed in settings parameter Length and defaults to 5/2 (left/right)). These swing points must have taken out liquidity to be considered "established". The liquidity that must be grabbed by the swing point has to be a pivot of left length of 1 and a right length of 1.
The dealing range that's created should be used in conjunction with market structure. This could be done through scripts (maybe the Market structure script that I published ()) or manually. It's a common approach to look for long opportunities when the trend is bullish and price is currently in the discount zone of the dealing range. If the trend is bearish then short opportunities are presented when the price is currently in the premium zone of the dealing range.
The zones within the dealing range are premium and discount that are split on the 50% level of the dealing range. These zones can be split into 3 zone with a Fair price (also called Fair value ) zone in between premium and discount. This makes the premium zone to be in the upper third of the dealing range, fair price in the middle third and discount in the lower third. This can be enabled in the settings through the Fair price parameter.
Enabled:
You can choose to enable/disable the visualisation of liquidity grabs and the External liquidity available above and below the swing points that created the dealing range.
Enabled:
Disabled:
Enabled on a higher timeframe (will display a box of the liquidity grab price instead of a label):
This dealing range is configurable to be created by a higher timeframe then the visible charts. Use the setting Higher timeframe to change this.
You can force candles to be closed (for liquidity and swing points). Please note that if you use a higher timeframe then the visible charts the candles must be closed on this timeframe.
Lastly you can also change the transparency of liquidity grabs and external liquidity outside of the dealing range. Use the Transparency setting to change this (a lower value will lead to stronger visuals).
If you have any input or suggestions on future features or bugs, don't hesitate to let me know!
Best of trading luck!
Parsifal.Swing.TrendScoreThe Parsifal.Swing.TrendScore indicator is a module within the Parsifal Swing Suite, which includes a set of swing indicators such as:
• Parsifal Swing TrendScore
• Parsifal Swing Composite
• Parsifal Swing RSI
• Parsifal Swing Flow
Each module serves as an indicator facilitating judgment of the current swing state in the underlying market.
________________________________________
Background
Market movements typically follow a time-varying trend channel within which prices oscillate. These oscillations—or swings—within the trend are inherently tradable.
They can be approached:
• One-sidedly, aligning with the trend (generally safer), or
• Two-sidedly, aiming to profit from mean reversions as well.
Note: Mean reversions in strong trends often manifest as sideways consolidations, making one-sided trades more stable.
________________________________________
The Parsifal Swing Suite
The modules aim to provide additional insights into the swing state within a trend and offer various trigger points to assist with entry decisions.
All modules in the suite act as weak oscillators, meaning they fluctuate within a range but are not bounded like true oscillators (e.g., RSI, which is constrained between 0% and 100%).
________________________________________
The Parsifal.Swing.TrendScore – Specifics
The Parsifal.Swing.TrendScore module combines short-term trend data with information about the current swing state, derived from raw price data and classical technical indicators. It provides an indication of how well the short-term trend aligns with the prevailing swing, based on recent market behavior.
________________________________________
How Swing.TrendScore Works
The Swing.TrendScore calculates a swing score by collecting data within a bin (i.e., a single candle or time bucket) that signals an upside or downside swing. These signals are then aggregated together with insights from classical swing indicators.
Additionally, it calculates a short-term trend score using core technical signals, including:
• The Z-score of the price's distance from various EMAs
• The slope of EMAs
• Other trend-strength signals from additional technical indicators
These two components—the swing score and the trend score—are then combined to form the Swing.TrendScore indicator, which evaluates the short-term trend in context with swing behavior.
________________________________________
How to Interpret Swing.TrendScore
The trend component enhances Swing.TrendScore’s ability to provide stronger signals when the short-term trend and swing state align.
It can also override the swing score; for example, even if a mean reversion appears to be forming, a dominant short-term trend may still control the market behavior.
This makes Swing.TrendScore particularly valuable for:
• Short-term trend-following strategies
• Medium-term swing trading
Unlike typical swing indicators, Swing.TrendScore is designed to respond more to medium-term swings rather than short-lived fluctuations.
________________________________________
Behavior and Chart Representation
The Swing.TrendScore indicator fluctuates within a range, as most of its components are range-bound (though Z-score components may technically extend beyond).
• Historically high or low values may suggest overbought or oversold conditions
• The chart displays:
o A fast curve (orange)
o A slow curve (white)
o A shaded background representing the market state
• Extreme values followed by curve reversals may signal a developing mean reversion
________________________________________
TrendScore Background Value
The Background Value reflects the combined state of the short-term trend and swing:
• > 0 (shaded green) → Bullish mode: swing and short-term trend both upward
• < 0 (shaded red) → Bearish mode: swing and short-term trend both downward
• The absolute value represents the confidence level in the market mode
Notably, the Background Value can remain positive during short downswings if the short-term trend remains bullish—and vice versa.
________________________________________
How to Use the Parsifal.Swing.TrendScore
Several change points can act as entry triggers or aids:
• Fast Trigger: change in slope of the fast signal curve
• Trigger: fast line crosses slow line or the slope of the slow signal changes
• Slow Trigger: change in sign of the Background Value
Examples of these trigger points are illustrated in the accompanying chart.
Additionally, market highs and lows aligning with the swing indicator values may serve as pivot points in the evolving price process.
________________________________________
As always, this indicator should be used in conjunction with other tools and market context in live trading.
While it provides valuable insight and potential entry points, it does not predict future price action.
Instead, it reflects recent tendencies and should be used judiciously.
________________________________________
Extensions
The aggregation of information—whether derived from bins or technical indicators—is currently performed via simple averaging. However, this can be modified using alternative weighting schemes, based on:
• Historical performance
• Relevance of the data
• Specific market conditions
Smoothing periods used in calculations are also modifiable. In general, the EMAs applied for smoothing can be extended to reflect expectations based on relevance-weighted probability measures.
Since EMAs inherently give more weight to recent data, this allows for adaptive smoothing.
Additionally, EMAs may be further extended to incorporate negative weights, akin to wavelet transform techniques.
Camarilla Pivot Plays█ OVERVIEW
This indicator implements the Camarilla Pivot Points levels and a system for suggesting particular plays. It only calculates and shows the 3rd, 4th, and 6th levels, as these are the only ones used by the system. In total, there are 12 possible plays, grouped into two groups of six. The algorithm constantly evaluates conditions for entering and exiting the plays and indicates them in real time, also triggering user-configurable alerts.
█ CREDITS
The Camarilla pivot plays are defined in a strategy developed by Thor Young, and the whole system is explained in his book "A Complete Day Trading System" . The indicator is published with his permission, and he is a user of it. The book is not necessary in order to understand and use the indicator; this description contains sufficient information to use it effectively.
█ FEATURES
Automatically draws plays, suggesting an entry, stop-loss, and maximum target
User can set alerts on chosen ticker to call these plays, even when not currently viewing them
Highly configurable via many options
Works for US/European stocks and US futures (at least)
Works correctly on both RTH and ETH charts
Automatically switches between RTH and ETH data
Optionally also shows the "other" set of pivots (RTH vs ETH data)
Configurable behaviour in the pre-market, not active in the post-market
Configurable sensitivity of the play detection algorithm
Can also show weekly and monthly Camarilla pivots
Well-documented options tooltips
Sensible defaults which are suitable for immediate use
Well-documented and high-quality open-source code for those who are interested
█ HOW TO USE
The defaults work well; at a minimum, just add the indicator and watch the plays being called. To avoid having to watch securities, by selecting the three dots next to the indicator name, you can set an alert on the indicator and choose to be alerted on play entry or exit events—or both. The following diagram shows several plays activated in the past (with the "Show past plays" option selected).
By default, the indicator draws plays 5 days back; this can be changed up to 20 days. The labels can be shifted left/right using the "label offset" option to avoid overlapping with other labels in this indicator or those of another indicator.
An information box at the top-right of the chart shows:
The data currently in use for the main pivots. This can switch in the pre-market if the H/L range exceeds the previous day's H/L, and if it does, you will see that switch at the time that it happens
Whether the current day's pivots are in a higher or lower range compared to the previous day's. This is based on the RTH close, so large moves in the post-market won't be reflected (there is an advanced option to change this)
The width of the value relationship in the current day compared to the previous day
The currently active play. If multiple plays are active in parallel, only the last activated one is shown
The resistance pivots are all drawn in the same colour (red by default), as are the support pivots (green by default). You can change the resistance and support colours, but it is not possible to have different colours for different levels of the same kind. Plays will always use the correct colour, drawing over the pivots. For example, R4 is red by default, but if a play treats R4 as a support, then the play will draw a green line (by default) over the red R4 line, thereby hiding it while the play is active.
There are a few advanced parameters; leave these as default unless you really know what they do. Please note the script is complicated—it does a lot. You might need to wait a few seconds while it (re)calculates on new tickers or when changing options. Give it time when first loading or changing options!
█ CONCEPTS
The indicator is focused around daily Camarilla pivots and implements 12 possible plays: 6 when in a higher range, 6 when in a lower range. The plays are labelled by two letters—the first indicates the range, the second indicates the play—as shown in this diagram:
The pivots can be calculated using only RTH (Regular Trading Hours) data, or ETH (Extended Trading Hours) data, which includes the pre-market and post-market. The indicator implements logic to automatically choose the correct data, based on the rules defined by the strategy. This is user-overridable. With the default options, ETH will be used when the H/L range in the previous day's post-market or current day's pre-market exceeds that of the previous day's regular market. In auto mode, the chosen pivots are considered the main pivots for that day and are the ones used for play evaluation. The "other" pivots can also be shown—"other" here meaning using ETH data when the main pivots use RTH data, and vice versa.
When displaying plays in the pre-market, since the RTH open is not yet known (and that value is needed to evaluate play pre-conditions), the pre-market open is used as a proxy for the RTH open. After the regular market opens, the correct RTH open is used to evaluate play conditions.
█ NOTE FOR FUTURES
Futures always use full ETH data in auto mode. Users may, however, wish to use the option "Always use RTH close," which uses the 3 p.m. Central Time (CME/Chicago) as a basis for the close in the pivot calculations (instead of the 4 p.m. actual close).
Futures don't officially have a pre-market or post-market like equities. Let's take ES on CME as an example (CME is in Chicago, so all times are Central Time, i.e., 1 hour behind Eastern Time). It trades from 17:00 Sunday to 16:00 Friday, with a daily pause between 16:00 and 17:00. However, most of the trading activity is done between 08:30 and 15:00 (Central), which you can tell from the volume spikes at those times, and this coincides with NYSE/NASDAQ regular hours (09:30–16:00 Eastern). So we define a pseudo-pre-market from 17:00 the previous day to 08:30 on the current day, then a pseudo-regular market from 08:30 to 15:00, then a pseudo-post-market from 15:00 to 16:00.
The indicator then works exactly the same as with equities—all the options behave the same, just with different session times defined for the pre-, regular, and post-market, with "RTH" meaning just the regular market and "ETH" meaning all three. The only difference from equities is that the auto calculation mode always uses ETH instead of switching based on ETH range compared to RTH range. This is so users who just leave all the defaults are not confused by auto-switching of the calculation mode; normally you'll want the pivots based on all the (ETH) data. However, both "Force RTH" and "Use RTH close with ETH data" work the same as with equities—so if, in the calculations, you really want to only use RTH data, or use all ETH H/L data but use the RTH close (at 15:00), you can.
█ LIMITATIONS
The pivots are very close to those shown in DAS Trader Pro. They are not to-the-cent exact, but within a few cents. The reasons are:
TradingView uses real-time data from CBOE One, so doesn't have access to full exchange data (unless you pay for it in TradingView), and
the close/high/low are taken from the intraday timeframe you are currently viewing, not daily data—which are very close, but often not exactly the same. For example, the high on the daily timeframe may differ slightly from the daily high you'll see on an intraday timeframe.
I have occasionally seen larger than a few cents differences in the pivots between these and DAS Trader Pro—this is always due to differences in data, for example a big spike in the data in TradingView but not in DAS Trader Pro, or vice versa. The more traded the stock is, the less the difference tends to be. Highly traded stocks are usually within a few cents. Less traded stocks may be more (for example, 30¢ difference in R4 is the highest I've seen). If it bothers you, official NYSE/NASDAQ data in TradingView is quite inexpensive (but even that doesn't make the 8am candle identical).
The 6th Camarilla level does not have a standard definition and may not match the level shown on other platforms. It does match the definition used by DAS Trader Pro.
The indicator is an intraday indicator (despite also being able to show weekly and monthly pivots on an intraday chart). It deactivates on a daily timeframe and higher. It is untested on sub-minute timeframes; you may encounter runtime errors on these due to various historical data referencing issues. Also, the play detection algorithm would likely be unpredictable on sub-minute timeframes. Therefore, sub-minute timeframes are formally unsupported.
The indicator was developed and tested for US/European stocks and US futures. It may or may not work as intended for stocks and futures in different locations. It does not work for other security types (e.g., crypto), where I have no evidence that the strategy has any relevance.