Penunjuk dan strategi
BAFD (Price Action For D.....s)🧠 Overview
This indicator combines multiple Moving Averages (MA) with visual price action elements such as Fair Value Gaps (FVGs) and Swing Points. It provides traders with real-time insight into trend direction, structural breaks, and potential entry zones based on institutional price behavior.
⚙️ Features
1. Multi MA Visualization (SMA & EMA)
- Plots short-, mid-, and long-term moving averages
- Fully customizable: MA type (SMA/EMA) and length per MA
- Dynamic color coding: green for bullish, red for bearish (based on close >/< MA)
2. Fair Value Gaps (FVG) Detection
Detects bullish and bearish imbalances using multiple logic types:
- Same Type: Last 3 candles move in the same direction
- Twin Close: Last 2 candles close in the same direction
- All: Shows all valid FVGs regardless of pattern
Gaps are marked with semi-transparent yellow boxes
Useful for identifying potential liquidity voids and retest zones
3. Swing Highs and Lows
- Automatically identifies major swing points
- Customizable sensitivity (strength setting)
Marked with subtle colored dots for structure identification or support/resistance mapping
📈 Use Cases
- Trend Identification: Visualize momentum on multiple timeframes
- Liquidity Mapping: Spot potential retracement zones using FVGs
- Confluence Building: Combine MA slope, FVG zones, and swing points for refined setups
🛠️ Customizable Settings
- Moving average type and length for each MA
- FVG logic selection and color
- Swing point strength
🔔 Note
This script does not generate buy/sell signals or alerts. It is designed as a visual decision-support tool for discretionary traders who rely on market structure, trend, and price action.
PinBar Finder | @CRYPTOKAZANCEVPinBar Finder | @CRYPTOKAZANCEV
This script helps traders identify high-probability reversal points based on price action, specifically Pin Bars — a well-known candlestick pattern used in technical analysis.
What does the indicator do?
It detects bullish and bearish Pin Bars using a custom method for wick-to-body ratio and filters based on historical volatility (pseudo-ATR). A label appears on the chart with detailed info on wick and body size when a valid signal is found.
How does it work?
- The indicator calculates a pseudo-ATR based on the percentage range of the last 1000 candles.
- It then multiplies this value by a user-defined factor (default: 1.1) to set a dynamic threshold for wick size.
- Bullish Pin Bars are detected when the lower wick is at least 1.1 times the body and greater than the dynamic ATR.
- Bearish Pin Bars are detected when the upper wick meets similar conditions.
- Signals are shown using chart labels with exact wick/body percentages.
- Alerts are included for automation or integration with trading bots.
How to use it?
- Add the indicator to any timeframe and asset.
- Use the alerts to notify you when a Pin Bar appears.
- Ideal for traders who use candlestick reversal strategies or combine price action with other confluence tools.
- You can adjust the wick length multiplier to fit the volatility of the instrument.
What makes it original?
Unlike many public scripts that use fixed ratios, this script adapts wick length detection based on recent volatility (pseudo-ATR logic). This makes it more dynamic and suitable for different markets and timeframes.
Developed by: @ZeeZeeMon
Original author name on chart: @CRYPTOKAZANCEV
This script is open-source and educational. Use at your own discretion.
PinBar Finder | @CRYPTOKAZANCEV
Этот скрипт помогает трейдерам находить точки потенциального разворота на основе прайс-экшена, а именно — свечного паттерна «Пин-бар». Индикатор автоматически определяет бычьи и медвежьи пин-бары с учетом адаптивных параметров волатильности.
Что делает индикатор?
Скрипт ищет свечи, у которых тень в несколько раз превышает тело (пин-бары), и отображает на графике точную информацию о длине тела и тени. Это полезно для трейдеров, использующих свечные сигналы на разворот.
Как работает?
- Рассчитывается псевдо-ATR по 1000 последним свечам на основе процентного диапазона high-low.
- Этот ATR умножается на заданный множитель (по умолчанию: 1.1), чтобы динамически задать минимальную длину тени.
- Бычий пин-бар определяется, когда нижняя тень больше тела в 1.1 раза и превышает ATR.
- Медвежий пин-бар — аналогично, но для верхней тени.
- Индикатор отображает лейблы с точными значениями тела и тени.
- Реализованы условия для оповещений (alerts).
Как использовать?
- Добавьте индикатор на нужный график и таймфрейм.
- Настройте alerts, чтобы не пропустить сигналы.
- Особенно полезен для трейдеров, работающих со свечным анализом, стратегиями разворота, а также в сочетании с другими индикаторами.
В чем оригинальность?
В отличие от многих скриптов, использующих фиксированные параметры, здесь используется динамический расчет длины тени на основе волатильности. Это делает скрипт адаптивным к рынку и таймфрейму.
Разработчик: @ZeeZeeMon
Оригинальное имя автора на графике: @CRYPTOKAZANCEV
Скрипт является открытым и предназначен для образовательных целей. Используйте на своё усмотрение.
Brian Shannon 5-Day MA BackgroundBrian Shannon 5-Day Moving Average with Dynamic Background Fill
OVERVIEW
This indicator implements Brian Shannon's renowned 5-Day Moving Average methodology from his acclaimed work "Technical Analysis Using Multiple Timeframes." The indicator provides instant visual clarity on short-term trend direction and momentum, making it an essential tool for swing traders and active investors.
KEY FEATURES
• True 5-Day Moving Average: Dynamically calculates the correct period across all timeframes (1min, 5min, 15min, 1H, etc.)
• Visual Price-to-MA Relationship: Color-coded fill between price and the moving average
- Green Fill: Price is above the 5-day MA (bullish short-term momentum)
- Red Fill: Price is below the 5-day MA (bearish short-term momentum)
• Multi-Timeframe Compatible: Works seamlessly on any chart timeframe while maintaining the true 5-day calculation
BRIAN SHANNON'S STRATEGIC APPLICATION
Primary Uses:
1. Trend Identification: Quickly identify short-term momentum shifts
2. Dynamic Support/Resistance: The 5-day MA acts as a moving support level in uptrends and resistance in downtrends
3. Entry Signal Confirmation: Look for pullbacks to the 5-day MA as potential entry points in trending stocks
4. Multi-Timeframe Analysis: Essential component of Shannon's multiple timeframe approach
Perfect Combination with:
• AVWAP (Anchored Volume Weighted Average Price): Use together to identify high-probability setups where price is above both the 5-day MA and AVWAP
• Longer-term Moving Averages: Combine with 20-day and 50-day MAs for complete trend analysis
• Volume Analysis: Confirm 5-day MA signals with volume patterns
TRADING APPLICATIONS
For Swing Traders:
• Bullish Setup: Price above 5-day MA + above AVWAP + above longer-term MAs = Strong uptrend
• Bearish Setup: Price below 5-day MA + below AVWAP + below longer-term MAs = Strong downtrend
• Entry Timing: Use pullbacks to the 5-day MA as entry opportunities in the direction of the primary trend
For Day Traders:
• Quick visual confirmation of intraday momentum
• Dynamic support/resistance levels for scalping opportunities
• Clear trend bias for directional trades
WHY THIS INDICATOR WORKS
Brian Shannon's approach emphasizes that the 5-day moving average represents the short-term sentiment of market participants. When price is consistently above this level, it indicates buyers are in control of short-term price action. Conversely, when price falls below, it suggests selling pressure is dominating.
The visual fill makes it immediately obvious:
• How far price is from the 5-day MA
• The strength of the current short-term trend
• Potential areas where price might find support or resistance
BEST PRACTICES
1. Never use in isolation - Always combine with longer timeframe analysis
2. Volume confirmation - Look for volume expansion on moves away from the 5-day MA
3. Multiple timeframe approach - Check higher timeframes for overall trend direction
4. Combine with AVWAP - Most powerful when both indicators align
INSTALLATION NOTES
This indicator automatically adjusts for any timeframe, ensuring you always get a true 5-trading-day moving average regardless of whether you're viewing 1-minute or hourly charts.
Based on the technical analysis methodology of Brian Shannon, author of "Technical Analysis Using Multiple Timeframes"
PCA Regime-Adjusted MomentumSummary
The PCA Regime-Adjusted Momentum (PCA-RAM) is an advanced market analysis tool designed to provide nuanced insights into market momentum and structural stability. It moves beyond traditional indicators by using Principal Component Analysis (PCA) to deconstruct market data into its most essential patterns.
The indicator provides two key pieces of information:
A smoothed momentum signal based on the market's dominant underlying trend.
A dynamic regime filter that gauges the stability and clarity of the market's structure, advising you when to trust or fade the momentum signals.
This allows traders to not only identify potential shifts in momentum but also to understand the context and confidence behind those signals.
Core Concepts & Methodology
The strength of this indicator lies in its sound, data-driven methodology.
1. Principal Component Analysis (PCA)
At its core, the indicator analyzes a rolling window (default 50 periods) of standardized market data (Open, High, Low, Close, and Volume). PCA is a powerful statistical technique that distills this complex, 5-dimensional data into its fundamental, uncorrelated components of variance. We focus on the First Principal Component (PC1), which represents the single most dominant pattern or "theme" driving the market's behavior in the lookback window.
2. The Momentum Signal
Instead of just looking at price, we project the current market data onto this dominant underlying pattern (PC1). This gives us a raw "projection score" that measures how strongly the current bar aligns with the historically dominant market structure. This raw score is then smoothed using two an exponential moving averages (a fast and a slow line) to create a clear, actionable momentum signal, similar in concept to a MACD.
3. The Dynamic Regime Filter
This is arguably the indicator's most powerful feature. It answers the question: "How clear is the current market picture?"
It calculates the Market Concentration Ratio, which is the percentage of total market variance explained by PC1 alone.
A high ratio indicates that the market is moving in a simple, one-dimensional way (e.g., a clear, strong trend).
A low ratio indicates the market is complex, multi-dimensional, and choppy, with no single dominant theme.
Crucially, this filter is dynamic. It compares the current concentration ratio to its own recent average, allowing it to adapt to any asset or timeframe. It automatically learns what "normal" and "choppy" look like for the specific chart you are viewing.
How to Interpret the Indicator
The indicator is displayed in a separate pane with two key visual elements:
The Momentum Lines (White & Gold)
White Line: The "Fast Line," representing the current momentum.
Gold Line: The "Slow Line," acting as the trend confirmation.
Bullish Signal: A crossover of the White Line above the Gold Line suggests a shift to positive momentum.
Bearish Signal: A crossover of the White Line below the Gold Line suggests a shift to negative momentum.
The Regime Filter (Purple & Dark Red Background)
This is your confidence gauge.
Navy Blue Background (High Concentration): The market structure is stable, simple, and trending. Momentum signals are more reliable and should be given higher priority.
Dark Red Background (Low Concentration): The market structure is complex, choppy, or directionless. Momentum signals are unreliable and prone to failure or "whipsaws." This is a signal to be cautious, tighten stops, or potentially stay out of the market.
Potential Trading Strategies
This tool is versatile and can be used in several ways:
1. Primary Signal Strategy
Condition: Wait for the background to turn Purple, confirming a stable, high-confidence regime.
Entry: Take the next crossover signal from the momentum lines (White over Gold for long, White under Gold for short).
Exit/Filter: Consider exiting positions or ignoring new signals when the background turns Navy.
2. As a Confirmation or Filter for Your Existing Strategy
Do you have a trend-following system? Only enable its long and short signals when the PCA-RAM background is Purple.
Do you have a range-trading or mean-reversion system? It might be most effective when the PCA-RAM background is Navy, indicating a lack of a clear trend.
3. Advanced Divergence Analysis
Look for classic divergences between price and the momentum lines. For example, if the price is making a new high, but the Gold Line is making a lower high, it may indicate underlying weakness in the trend, even on a Purple background. This divergence signal is more powerful because it shows that the new price high is not being confirmed by the market's dominant underlying pattern.
Correlation MA – 15 Assets + Average (Optional)This indicator calculates the moving average of the correlation coefficient between your charted asset and up to 15 user-selected symbols. It helps identify uncorrelated or inversely correlated assets for diversification, pair trading, or hedging.
Features:
✅ Compare your current chart against up to 15 assets
✅ Toggle assets on/off individually
✅ Custom correlation and MA lengths
✅ Real-time average correlation line across enabled assets
✅ Horizontal lines at +1, 0, and -1 for easy visual reference
Ideal for:
Portfolio diversification analysis
Finding low-correlation stocks
Mean-reversion & pair trading setups
Crypto, equities, ETFs
To use: set the benchmark chart (e.g. TSLA), choose up to 15 assets, and adjust settings as needed. Look for assets with correlation near 0 or negative values for uncorrelated performance.
AutoFib Breakout Strategy for Uptrend AssetsThis trading strategy is designed to help you catch powerful upward moves on assets that are in a long-term uptrend, such as Gold (XAUUSD). It uses a popular technical tool called the Fibonacci Extension, combined with a trend filter and a risk-managed exit system.
✅ When to Use This Strategy
• Works best on higher timeframes: Daily (1D), 3-Day (3D), or Weekly (W).
• Best used on uptrending assets like Gold.
• Designed for swing trading – holding trades from a few days to weeks.
📊 How It Works
1. Find the Trend
We only want to trade in the direction of the trend.
• The strategy uses the 200-period EMA (Exponential Moving Average) to identify if the market is in an uptrend.
• If the price is above the 200 EMA, we consider it an uptrend and allow long trades.
2. Identify Breakout Levels
• The strategy detects recent high and low pivot points to draw Fibonacci extension levels.
• It focuses on the 1.618 Fibonacci level, which is often a target in strong trends.
• When the price breaks above this level in an uptrend, it signals a potential momentum breakout – a good time to buy.
3. Enter a Trade
• The strategy enters a long (buy) position when the price closes above the 1.618 Fibonacci level and the market is in an uptrend (above the 200 EMA).
4. Manage Risk Automatically
• The trade includes a stop-loss set to 1x the ATR (Average True Range) below the entry price – this protects against sudden drops.
• It sets a take-profit at 3x the ATR above the entry – aiming for higher rewards than risks.
⚠️ Important Notes
• 📈 Higher Timeframes Preferred: This strategy works best on Daily (D), 3-Day (3D), and Weekly (W) charts, especially on Gold (XAUUSD).
• 🧪 Not for Deep Backtesting: Due to the nature of how pivot points and Fib levels are calculated, this strategy may not perform well in backtesting simulations (because the historical calculations can shift). It is better used for live analysis and forward testing.
LB | SB | OH | OL (Auto Futures OI)This indicator is for trading purposes, particularly in futures markets given the inclusion of open interest (OI) data.
Indicator Name and Overlay: The indicator is named "LB | SB | OH | OL" and is set to overlay on the price chart (overlay=true).
Override Symbol Input: Users can input a symbol to override the default symbol for analysis.
Open Interest Data Retrieval: It retrieves open interest data for the specified symbol and time frame. If no data is found, it generates a runtime error.
Dashboard Configuration: Users can choose to display a dashboard either at the top right, bottom right, or bottom left of the chart.
Calculations:
It calculates the percentage change in open interest (oi_change).
It calculates the percentage change in price compared to the previous day's close (price_change).
Build Up Conditions:
Long Build Up: When there's a significant increase in open interest (OIChange threshold) and price rises (PriceChange threshold).
Short Build Up: When there's a significant increase in open interest (OIChange threshold) and price falls (PriceChange threshold).
Display Table:
It creates a table on the chart showing the build-up conditions, open interest change percentage, and price change percentage.
Labeling:
It allows for the labeling of buy and sell conditions based on price movements.
Overall, this indicator provides a visual representation of open interest and price movements, helping traders identify potential trading opportunities based on build-up conditions and price behavior.
The "LB | SB | OH | OL" indicator is a tool designed to assist traders in analyzing price movements and open interest (OI) changes in FNO markets. This indicator combines various elements to provide insights into long build-up (LB), short build-up (SB), open-high (OH), and open-low (OL) scenarios.
Key features of the indicator include:
Override Symbol Input: Traders can override the default symbol and input their preferred symbol for analysis.
Open Interest Data: The indicator retrieves open interest data for the selected symbol and time frame, facilitating analysis based on changes in open interest.
Dashboard: The indicator features a customizable dashboard that displays key information such as build-up conditions, OI change, and price change.
Build-Up Conditions: The indicator identifies long build-up and short build-up scenarios based on user-defined thresholds for OI change and price change percentages.
Customization Options: Traders have the flexibility to customize various aspects of the indicator, including colors for long build-up, short build-up, positive OI change, negative OI change, positive price change, and negative price change.
Label Plots: Buy and sell labels are plotted on the chart to highlight potential trading opportunities. Traders can customize the colors and text colors of these labels based on their preferences.
Overall, the "LB | SB | OH | OL" indicator offers traders a comprehensive tool for analyzing price movements and open interest changes, helping them make informed trading decisions in the FNO markets.
ATR | LOTSIZE | Risk (Futures)This Pine Script is a futures-specific trading utility designed to help F\&O (Futures and Options) traders quickly assess the volatility and position sizing for any selected stock on the chart — even if it's not a futures chart.
What the Script Does:
* Automatically detects the futures symbol for the underlying equity using a dynamic mapping system.
* Calculates the ATR (Average True Range) of the futures contract using either SMA or EMA.
* Fetches the Lot Size (Point Value) of the futures instrument.
* Computes risk per lot by multiplying ATR with lot size (Risk = ATR × Lot Size).
* Displays all 3 values — ATR, Lot Size, and Risk in INR — in a compact table on the chart.
Why This Is Useful for F\&O Traders:
* ✅ Quick Risk Assessment: Helps traders understand how much is at risk per lot without switching to the actual futures chart.
* ✅ Position Sizing: Provides data to calculate how many lots to trade based on a defined risk per trade.
* ✅ Volatility Awareness:ATR gives insights into how much the stock typically moves, guiding stop-loss and target placements.
* ✅ Efficient Workflow:No need to load separate futures charts or lookup lot sizes manually — saves time and reduces error.
This tool is ideal for discretionary and systematic traders who want risk and volatility context for every trade, especially in the NSE Futures & Options segment.
McGinley Dynamic debugged🔍 McGinley Dynamic Debugged (Adaptive Moving Average)
This indicator plots the McGinley Dynamic, a mathematically adaptive moving average designed to reduce lag and better track price action during both trends and consolidations.
✅ Key Features:
Adaptive smoothing: The McGinley Dynamic adjusts itself based on the speed of price changes.
Lag reduction: Compared to traditional moving averages like EMA or SMA, McGinley provides smoother yet responsive tracking.
Stability fix: This version includes a robust fix for rare recursive calculation issues, particularly on low-priced historical assets (e.g., Wipro pre-2000).
⚙️ What’s Different in This Debugged Version?
Implements manual clamping on the source / previous value ratio to prevent mathematical spikes that could cause flattening or distortion in the plotted line.
Ensures more stable behavior across all instruments and timeframes, especially those with historically low price points or volatile early data.
💡 Use Case:
Ideal for:
Trend confirmation
Entry filtering
Adaptive support/resistance visualization
Improving signal precision in low-volatility or high-noise environments
⚠️ Notes:
Works best when combined with volume filters or other trend indicators for validation.
This version is optimized for visual use—for signal generation, consider pairing it with additional logic or thresholds.
Laplace Momentum Percentile ║ BullVision 🔬 Overview
Laplace Momentum Percentile ║ BullVision is a custom-built trend analysis tool that applies Laplace-inspired smoothing to price action and maps the result to a historical percentile scale. This provides a contextual view of trend intensity, with optional signal refinement using a Kalman filter.
This indicator is designed for traders and analysts seeking a normalized, scale-independent perspective on market behavior. It does not attempt to predict price but instead helps interpret the relative strength or weakness of recent movements.
⚙️ Key Concepts
📉 Laplace-Based Smoothing
The core signal is built using a Laplace-style weighted average, applying an exponential decay to price values over a specified length. This emphasizes recent movements while still accounting for historical context.
🎯 Percentile Mapping
Rather than displaying the raw output, the filtered signal is converted into a percentile rank based on its position within a historical lookback window. This helps normalize interpretation across different assets and timeframes.
🧠 Optional Kalman Filter
For users seeking additional smoothing, a Kalman filter is included. This statistical method updates signal estimates dynamically, helping reduce short-term fluctuations without introducing significant lag.
🔧 User Settings
🔁 Transform Parameters
Transform Parameter (s): Controls the decay rate for Laplace weighting.
Calculation Length: Sets how many candles are used for smoothing.
📊 Percentile Settings
Lookback Period: Defines how far back to calculate the historical percentile ranking.
🧠 Kalman Filter Controls
Enable Kalman Filter: Optional toggle.
Process Noise / Measurement Noise: Adjust the filter’s responsiveness and tolerance to volatility.
🎨 Visual Settings
Show Raw Signal: Optionally display the pre-smoothed percentile value.
Thresholds: Customize upper and lower trend zone boundaries.
📈 Visual Output
Main Line: Smoothed percentile rank, color-coded based on strength.
Raw Line (Optional): The unsmoothed percentile value for comparison.
Trend Zones: Background shading highlights strong upward or downward regimes.
Live Label: Displays current percentile value and trend classification.
🧩 Trend Classification Logic
The indicator segments percentile values into five zones:
Above 80: Strong upward trend
50–80: Mild upward trend
20–50: Neutral zone
0–20: Mild downward trend
Below 0: Strong downward trend
🔍 Use Cases
This tool is intended as a visual and contextual aid for identifying trend regimes, assessing historical momentum strength, or supporting broader confluence-based analysis. It can be used in combination with other tools or frameworks at the discretion of the trader.
⚠️ Important Notes
This script does not provide buy or sell signals.
It is intended for educational and analytical purposes only.
It should be used as part of a broader decision-making process.
Past signal behavior should not be interpreted as indicative of future results.
Triple EMA Momentum Oscillator (TEMO) HistogramThis Pine Script code replicates the Python indicator you provided, calculating the Triple EMA Momentum Oscillator (TEMO) and generating signals based on its value and momentum.
Explanation of the Code:
User Inputs:
Allows you to adjust the periods for the short, mid, and long EMAs.
Calculate EMAs:
Computes the Exponential Moving Averages for the specified periods.
Calculate EMA Spreads (Distances):
Finds the differences between the EMAs to understand the spread between them.
Calculate Spread Velocities:
Determines the change in spreads from the previous period, indicating momentum.
Composite Strength Score:
Weighted calculation of the spreads normalized by the EMA values.
Velocity Accelerator:
Weighted calculation of the velocities normalized by the EMA values.
Final TEMO Oscillator:
Combines the spread strength and velocity accelerator to create the TEMO.
Generate Signals:
Signals are generated when TEMO is positive and increasing (buy), or negative and decreasing (sell).
Plotting:
Zero Line: Helps visualize when TEMO crosses from positive to negative.
TEMO Oscillator: Plotted with green for positive values and red for negative values.
Signals: Displayed as a histogram to indicate buy (1) and sell (-1) signals.
Usage:
Buy Signal: When TEMO is above zero and increasing.
Sell Signal: When TEMO is below zero and decreasing.
Note: This oscillator helps identify momentum changes based on EMAs of different periods. It's useful for detecting trends and potential reversal points in the market.
Timeframe % TrakcerPulls historical closes from nine higher-timeframe look-backs (1 H, 12 H, 1 D, 7 D, 14 D, 1 M, 3 M, 6 M, 1 Y, 3 Y) with request.security().
2. Calculates the percent change between each look-back close and the current price:
(close − close₍look-back₎) / close₍look-back₎ × 100
3. Renders a two-column table in the chart’s top-right corner.
• Left column = timeframe label
• Right column = % move, rounded to two decimals
4. Heat-codes the cells — green if the asset is up, red if it’s down — so you can spot momentum (or pain) instantly.
5. Stays lightweight by updating only on the last bar; no excess runtimes.
X OROverview
Designed to plot hourly opening ranges (ORs) on an intraday chart. It primarily serves as a trading tool for assessing market direction and potential trading opportunities by analyzing price action relative to key OHLC (Open, High, Low, Close) levels within each hourly range.
The code provided is for each hour sessions from 2:00 AM to 3:00 PM for a complete session-based framework. In addition there is the RTH open range
Purpose
The core purpose of this indicator is to:
✅ Define each hourly range (based on the session’s opening bar) by recording the high and low of that range.
✅ Extend this range into the following bars for visual reference — serving as dynamic support and resistance zones.
✅ Monitor price action relative to each hourly OR, helping traders evaluate market direction and structure trades using concepts like:
Breakouts above/below the OR high/low.
Rejections or consolidations within the OR.
Continuation or reversal signals tied to each OR.
Key Features
The script marks the first bar of the session as the OR session start.
During this bar, it initializes:
Opening price
Session high
Session low
These levels form the initial range.
🔹 Dynamic Range Tracking
Throughout the one-minute OR session:
The highest and lowest prices are updated in real time, capturing intra-hour volatility.
A visual background box is drawn to highlight the OR range on the chart.
🔹 Range Extension
The script defines an extended session period after the initial OR (e.g., 2:00 AM-2:45 AM for the 2:00 AM session).
During this extension period:
The box persists on the chart, providing a contextual zone that traders can use as a dynamic support/resistance area.
🔹 Visual Representation
Transparent colored boxes highlight each session’s OR visually on the chart.
These boxes help traders easily identify whether price is trading:
Inside the OR
Breaking above the high (potential bullish continuation)
Breaking below the low (potential bearish continuation)
Application in Trading
🔍 Trading the Opening Range Breakout
Traders often use the OR high and low as breakout triggers. For example:
A price break above the OR high may signal bullish momentum.
A break below the OR low may signal bearish momentum.
⚖️ Support and Resistance
Even if breakouts fail, the OR can act as a pivot zone — offering areas for:
Stop placements
Target levels
Entry confirmations for fade trades or mean reversion strategies.
🕒 Session Awareness
By defining each hour’s OR individually (from 2:00 AM to 3:00 PM), traders can:
Analyze price behavior within each session.
Recognize when liquidity or volatility increases (e.g. around overlapping sessions like London open or New York open).
Summary
This Pine Script indicator provides a powerful framework for visualizing and trading hourly opening ranges. It enhances intraday analysis by:
Structuring price action within hourly boxes.
Highlighting key price levels relative to OHLC concepts.
Helping traders make more informed decisions by assessing price behavior around these critical ranges.
Not-So-Average True Range (nsATR)Not-So-Average True Range (nsATR)
*By Sherlock_MacGyver*
---
Long Story Short
The nsATR is a complete overhaul of traditional ATR analysis. It was designed to solve the fundamental issues with standard ATR, such as lag, lack of contextual awareness, and equal treatment of all volatility events.
Key innovations include:
* A smarter ATR that reacts dynamically when price movement exceeds normal expectations.
* Envelope zones that distinguish between moderate and extreme volatility conditions.
* A long-term ATR baseline that adds historical context to current readings.
* A compression detection system that flags when the market is coiled and ready to break out.
This indicator is designed for traders who want to see volatility the way it actually behaves — contextually, asymmetrically, and with predictive power.
---
What Is This Thing?
Standard ATR (Average True Range) has limitations:
* It smooths too slowly (using Wilder's RMA), which delays detection of meaningful moves.
* It lacks context — no way to know if current volatility is high or low relative to history.
* It treats all volatility equally, regardless of scale or significance.
nsATR** was built from scratch to overcome these weaknesses by applying:
* Amplification of large True Range spikes.
* Visual envelope zones for detecting volatility regimes.
* A long-term context line to anchor current readings.
* Multi-factor compression analysis to anticipate breakouts.
---
Core Features
1. Breach Detection with Amplification
When True Range exceeds a user-defined threshold (e.g., ATR × 1.2), it is amplified using a power function to reflect nonlinear volatility. This amplified value is then smoothed and cascades into future ATR values, affecting the indicator beyond a single bar.
2. Direction Tagging
Volatility spikes are tagged as upward or downward based on basic price momentum (close vs previous close). This provides visual context for how volatility is behaving in real-time.
3. Envelope Zones
Two adaptive envelopes highlight the current volatility regime:
* Stage 1: Moderate volatility (default: ATR × 1.5)
* Stage 2: Extreme volatility (default: ATR × 2.0)
Breaching these zones signals meaningful expansion in volatility.
4. Long-Term Context Baseline
A 200-period simple moving average of the classic ATR establishes whether current readings are above or below long-term volatility expectations.
5. Multi-Signal Compression Detection
Flags potential breakout conditions when:
* ATR is below its long-term baseline
* Price Bollinger Bands are compressed
* RSI Bollinger Bands are also compressed
All three signals must align to plot a "Volatility Confluence Dot" — an early warning of potential expansion.
---
Chart Outputs
In the Indicator Pane:
* Breach Amplified ATR (Orange line)
* Classic ATR baseline (White line)
* Long-Term context baseline (Cyan line)
* Stage 1 and Stage 2 Envelopes (Purple and Yellow lines)
On the Price Chart:
* Triangles for breach direction (green/red)
* Diamonds for compression zones
* Optional background coloring for visual clarity
---
Alerts
Built-in alert conditions:
1. ATR breach detected
2. Stage 1 envelope breached
3. Stage 2 envelope breached
4. Compression zone detected
---
Customization
All components are modular. Traders can adjust:
* Display toggles for each visual layer
* Colors and line widths
* Breach threshold and amplification power
* Envelope sensitivity
* Compression sensitivity and lookback windows
Some options are disabled by default to reduce clutter but can be turned on for more aggressive signal detection.
---
Real-Time Behavior (Non-Repainting Clarification)
The indicator updates in real time on the current bar as new data comes in. This is expected behavior for live trading tools. Once a bar closes, values do not change. In other words, the indicator *does not repaint history* — but the current bar can update dynamically until it closes.
---
Use Cases
* Day traders: Use compression zones to anticipate volatility surges.
* Swing traders: Use envelope breaches for regime awareness.
* System developers: Replace standard ATR in your logic for better responsiveness.
* Risk managers: Use directional volatility signals to better model exposure.
---
About the Developer
Sherlock_MacGyver develops original trading systems that question default assumptions and solve real trader problems.
Grid TLong V1The “Grid TLong V1” strategy is based on the classic Grid strategy, but in the mode of buying and selling in favor of the trend and only on Long. This allows to take advantage of large uptrend movements to maximize profits in bull markets. For this reason, excessively sideways or bearish markets may not be very conducive to this strategy.
Like our Grid strategies in favor of the trend, you can enter and exit with the balance with controlled risk, as the distance between each grid functions as a natural and adaptable stop loss and take profit. What differentiates it from bidirectional strategies is that Short uses a minimum amount of follow-through, so that the percentage distance between the grids is maintained.
In this version of the script the entries and exits can be chosen at market or limit , and are based on the profit or loss of the current position, not on the percentage change in price.
The user may also notice that the strategy setup is risk-controlled, because it risks 5% on each trade, has a fairly standard commission and modest initial capital, all in order to protect the strategy user from unrealistic results.
As with all strategies, it is strongly recommended to optimize the parameters for the strategy to be effective for each asset and for each time frame.
Previous Highs & Lows (Customizable)Previous Highs & Lows (Customizable)
This Pine Script indicator displays horizontal lines and labels for high, low, and midpoint levels across multiple timeframes. The indicator plots levels from the following periods:
Today's session high, low, and midpoint
Yesterday's high, low, and midpoint
Current week's high, low, and midpoint
Last week's high, low, and midpoint
Last month's high, low, and midpoint
Last quarter's high, low, and midpoint
Last year's high, low, and midpoint
Features
Individual Controls: Each timeframe has separate toggles for showing/hiding high/low levels and midpoint levels.
Custom Colors: Independent color selection for lines and labels for each timeframe group.
Display Options:
Adjustable line width (1-5 pixels)
Variable label text size (tiny, small, normal, large, huge)
Configurable label offset positioning
Organization: Settings are grouped by timeframe in a logical sequence from most recent (today) to least recent (last year).
Display Logic: Lines span the current trading day only. Labels are positioned to the right of the price action. The indicator automatically removes previous drawings to prevent chart clutter.
NSE/BSE Derivative - Next Expiry Date With HolidaysNSE & BSE Expiry Tracker with Holiday Adjustments
This Pine Script is a TradingView indicator that helps traders monitor upcoming expiry dates for major Indian derivative contracts. It dynamically adjusts these expiry dates based on weekends and holidays, and highlights any expiry that falls on the current day.
⸻
Key Features
1. Tracks Expiry Dates for Major Contracts
The script calculates and displays the next expiry dates for the following instruments:
• NIFTY (weekly expiry every Thursday)
• BANKNIFTY, FINNIFTY, MIDCPNIFTY, NIFTYNXT50 (monthly expiry on the last Thursday of the month)
• SENSEX (weekly expiry every Tuesday)
• BANKEX and SENSEX 50 (monthly expiry on the last Tuesday of the month)
• Stocks in the F&O segment (monthly expiry on the last Thursday)
2. Holiday Awareness
Users can input a list of holiday dates in the format YYYY-MM-DD,YYYY-MM-DD,.... If any calculated expiry falls on one of these holidays or a weekend, the script automatically adjusts the expiry to the previous working day (Monday to Friday).
3. Customization Options
The user can:
• Choose the position of the expiry table on the chart (e.g. top right, bottom left).
• Select the font size for the expiry table.
• Enable or disable the table entirely (if implemented as an input toggle).
4. Visual Expiry Highlighting
If today is an expiry day for any instrument, the script highlights that instrument in the display. This makes it easy to spot significant expiry days, which are often associated with increased volatility and trading volume.
⸻
How It Works
• The script calculates the next expiry for each index using built-in date/time functions.
• For weekly expiries, it finds the next occurrence of the designated weekday.
• For monthly expiries, it finds the last Thursday or Tuesday of the month.
• Each expiry date is passed through a check to adjust for holidays or weekends.
• If today matches the adjusted expiry date, that row is visually emphasized.
⸻
Use Case
This script is ideal for traders who want a quick glance at which instruments are expiring soon — especially those managing options, futures, or expiry-based strategies.
Random State Machine Strategy📌 Random State Machine Strategy (Educational)
This strategy showcases a randomized entry model driven by a finite state machine, integrated with user-defined exit controls and a full-featured moving average filter.
🧠 Trade Entry Logic
Entries occur only when:
A random trigger occurs (~5% probability per bar)
The state machine accepts a new transition (sm.step())
Price is:
Above the selected MA for long entries
Below the selected MA for short entries
This ensures that entries are both stochastically driven and trend-aligned, avoiding frequent or arbitrary trades.
⚙️ How It Works
Randomized Triggers
A pseudo-random generator (seeded with time and volume) attempts to trigger state transitions.
Finite State Machine
Transitions are managed using the StateMachine from robbatt/lib_statemachine — credit to @robbatt for the modular FSM design.
Controlled Reset
The state machine resets every N bars (default: 100) if at least two transitions have occurred. This prevents stale or locked states.
Backtest Range
Define a specific test window using Start and End Date inputs.
Risk & Exits
Specify risk in points and a target risk/reward ratio. TP is auto-computed. Timed and MA-based exits can be toggled.
🧪 How to Use
Enable Long or Short trades
Choose your Moving Average type and length
Set Risk per trade and R/R ratio
Toggle TP/SL, timed exit, or MA cross exit
Adjust the State Reset Interval to suit your signal frequency
📘 Notes
Educational use only — not financial advice
Random logic is used to model structure, not predict movement
Thanks to @robbatt for the lib_statemachine integration
Volume pressure by GSK-VIZAG-AP-INDIA🔍 Volume Pressure by GSK-VIZAG-AP-INDIA
🧠 Overview
“Volume Pressure” is a multi-timeframe, real-time table-based volume analysis tool designed to give traders a clear and immediate view of buying and selling pressure across custom-selected timeframes. By breaking down buy volume, sell volume, total volume, and their percentages, this indicator helps traders identify demand/supply imbalances and volume momentum in the market.
🎯 Purpose / Trading Use Case
This indicator is ideal for intraday and short-term traders who want to:
Spot aggressive buying or selling activity
Track volume dynamics across multiple timeframes *1 min time frame will give best results*
Use volume pressure as a confirming tool alongside price action or trend-based systems
It helps determine when large buying/selling activity is occurring and whether such behavior is consistent across timeframes—a strong signal of institutional interest or volume-driven trend shifts.
🧩 Key Features & Logic
Real-Time Table Display: A clean, dynamic table showing:
Buy Volume
Sell Volume
Total Volume
Buy % of total volume
Sell % of total volume
Multi-Time frame Analysis: Supports 8 user-selectable custom time frames from 1 to 240 minutes, giving flexibility to analyze volume pressure at various granularities.
Color-Coded Volume Bias:
Green for dominant Buy pressure
Red for dominant Sell pressure
Yellow for Neutral
Intensity-based blinking for extreme values (over 70%)
Dynamic Data Calculation:
Uses volume * (close > open) logic to estimate buy vs sell volumes bar-by-bar, then aggregates by timeframe.
⚙️ User Inputs & Settings
Timeframe Selectors (TF1 to TF8): Choose any 8 timeframes you want to monitor volume pressure across.
Text & Color Settings:
Customize text colors for Buy, Sell, Total volumes
Choose Buy/Sell bias colors
Enable/disable blinking for visual emphasis on extremes
Table Appearance:
Set header color, metric background, and text size
Table positioning: top-right, bottom-right, etc.
Blinking Highlight Toggle: Enable this to visually highlight when Buy/Sell % exceeds 70%—a sign of strong pressure.
📊 Visual Elements Explained
The table has 6 rows and 10 columns:
Row 0: Headers for Today and TF1 to TF8
Rows 1–3: Absolute values (Buy Vol, Sell Vol, Total Vol)
Rows 4–5: Relative percentages (Buy %, Sell %), with dynamic background color
First column shows the metric names (e.g., “Buy Vol”)
Cells blink using alternate background colors if volume pressure crosses thresholds
💡 How to Use It Effectively
Use Buy/Sell % rows to confirm potential breakout trades or identify volume exhaustion zones
Look for multi-timeframe confluence: If 5 or more TFs show >70% Buy pressure, buyers are in control
Combine with price action (e.g., breakouts, reversals) to increase conviction
Suitable for equities, indices, futures, crypto, especially on lower timeframes (1m to 15m)
🏆 What Makes It Unique
Table-based MTF Volume Pressure Display: Most indicators only show volume as bars or histograms; this script summarizes and color-codes volume bias across timeframes in a tabular format.
Customization-friendly: Full control over colors, themes, and timeframes
Blinking Alerts: Rare visual feature to capture user attention during extreme pressure
Designed with performance and readability in mind—even for fast-paced scalping environments.
🚨 Alerts / Extras
While this script doesn’t include TradingView alert functions directly, the visual blinking serves as a strong real-time alert mechanism.
Future versions may include built-in alert conditions for buy/sell bias thresholds.
🔬 Technical Concepts Used
Volume Dissection using close > open logic (to estimate buyer vs seller pressure)
Simple aggregation of volume over custom timeframes
Table plotting using Pine Script table.new, table.cell
Dynamic color logic for bias identification
Custom blinking logic using na(bar_index % 2 == 0 ? colorA : colorB)
⚠️ Disclaimer
This indicator is a tool for analysis, not financial advice. Always backtest and validate strategies before using any indicator for live trading. Past performance is not indicative of future results. Use at your own risk and apply proper risk management.
✍️ Author & Signature
Indicator Name: Volume Pressure
Author: GSK-VIZAG-AP-INDIA
TradingView Username: prowelltraders
Opening Range 15 minThis indicator highlights the Opening Range (OR) for the first 15 minutes (9:30–9:45 AM EST). It visually plots high/low lines and a shaded box to define this range, helping traders identify key intraday levels for potential breakout or rejection scenarios. The script also provides optional overlays for the Previous Day’s High/Low and the Extended Hours High/Low, offering a complete context for day trading setups.
Main Features:
Opening Range Detection – Automatically calculates and draws the high/low of the 9:30–9:45 AM session.
Visual Enhancements – Includes customizable lines, shaded boxes, and labels to mark the OR high (ORH) and low (ORL) levels.
Previous Day High/Low (Optional) – Plots and labels the previous day's high and low for reference during current day trading.
Extended Hours High/Low (Optional, when ETH enabled) – Displays overnight session levels for added insight into early volatility (4:00 AM to 9:30 AM EST).
User Customization – Easily adjust colors, label styles, and visibility for all plotted levels and regions.
EMA CCI SSL BUY SELL Signal [THANHCONG]EMA CCI SSL BUY SELL Signal
Introduction:
The EMA CCI SSL BUY SELL Signal indicator is a comprehensive technical analysis tool designed to help traders identify trends and optimal entry and exit points with clarity and reliability. By combining reputable indicators such as EMA, CCI, SSL Channel, and RSI, this indicator generates buy and sell signals based on multiple validated factors, helping to filter noise and increase accuracy.
Key Features:
Utilizes multi-timeframe SSL channel with both automatic and manual mode options, suitable for various trading strategies.
Includes an RSI filter to minimize false signals in overbought or oversold regions.
Detects volume spikes to confirm the strength of the current trend.
Integrates CCI divergence and reversal candle patterns (Hammer, Shooting Star) to enhance signal precision in spotting potential reversals.
Displays clear buy/sell signals directly on the chart and provides a live performance table showing percentage changes.
Supports linear regression channel drawing to help users easily recognize trend direction and price volatility.
Recommended Usage:
Optimal Timeframes: Best used on 5-minute, 15-minute, 1-hour, 4-hour, 12-hour, and daily (D) timeframes. Avoid using on other timeframes to maintain signal reliability.
Signal Confirmation: Combine indicator signals with SSL channel direction and regression channel slope to improve confidence.
Combined Indicators: For enhanced effectiveness and noise reduction, it is recommended to use this indicator alongside the MCDX+RSI+SMA indicator. This combined approach provides a more comprehensive market view and supports better trading decisions.
Alerts: Users can set buy/sell alerts on TradingView to receive timely notifications when signals occur.
Important Notes:
This indicator is provided as a technical analysis aid and is not financial advice or a guarantee of profit.
Indicator performance may vary depending on market conditions and the traded asset.
Users should combine multiple tools and practice proper risk management when making trading decisions.
Thank You:
Thank you for using this indicator! If you find it useful, please consider leaving positive feedback and sharing it to help build a professional, transparent, and sustainable trading community.
Disclaimer:
The author and TradingView are not responsible for any losses resulting from the use of this indicator. Please trade responsibly and carefully consider your decisions.
Wishing you successful and safe trading!
#EMA #CCI #SSLChannel #RSI #TradingView #BuySellSignals #TechnicalAnalysis #TrendFollowing #VolumeSpike #CandlePatterns #TradingTools #Forex #Stocks #Crypto #Thanhcong