Nirav - Opening Range with Breakouts & TargetsOpening Range with Breakouts & Targets that also includes capability to toggle between range including wick high/lows or just candle body high/lows.
Indicatori e strategie
Buying vs Selling Pressure**Buying vs Selling Pressure**
This indicator measures and visualizes intrabar buying and selling pressure using a normalized ATR-based formula. It helps identify which side—buyers or sellers—is currently in control.
🔍 How it works:
Buying Pressure: Calculated from the distance between the close and low, adjusted by ATR.
Selling Pressure: Calculated from the distance between the high and close, also adjusted by ATR.
Histogram bars change color based on which side is stronger:
🟢 Green = Buying pressure dominant
🔴 Red = Selling pressure dominant
🔵 Blue = Potential transition or imbalance
Includes a zero line for easy reference.
Multi-TF BOS/CHoCH Detectori am abhijit i am devloping this structure maping indicator with alert .
on dated may 12-5-2025. disclaimer-it is only for educational purpose and not giving surety of success use it by your own risk
Mervin 2025 Predictive BOS Reversal DetectorObjective of the Script
To help traders predict and confirm market reversals using a combination of candlestick alignment, BOS logic, and trend strength indicators (CCI & ATR).
How the Script Works – Step-by-Step
Step 1: Detect Body Alignment Reversal
This step checks if the current candlestick is a potential reversal, defined as:
Opposite direction to the previous candle, and
Body alignment, meaning the previous close is nearly equal to the current open within a small tolerance.
✅ Conditions:
Bullish reversal: Previous candle is red (down), current candle is green (up).
Bearish reversal: Previous candle is green (up), current candle is red (down).
Aligned: abs(prevClose - currOpen) <= tolerance
If both alignment and reversal are detected:
A potential bullish BOS or potential bearish BOS is predicted.
📍 Displayed on Chart:
🔶 Orange triangle up = predicted bullish BOS
🔶 Orange triangle down = predicted bearish BOS
Step 2: Predict and Confirm Break of Structure (BOS)
Once a reversal is predicted, the script waits for a break above or below a key level from the previous candle:
Bullish BOS confirmed if the price breaks above the previous high.
Bearish BOS confirmed if the price breaks below the previous low.
📍 Displayed on Chart:
✅ Green label up = confirmed bullish BOS
❌ Red label down = confirmed bearish BOS
Step 3: Alerts
The script includes alerts that can be turned on in TradingView:
Predict Bullish BOS – potential long opportunity
Predict Bearish BOS – potential short opportunity
Confirmed BOS Bullish – confirmation to enter or add to a long
Confirmed BOS Bearish – confirmation to enter or add to a short
Step 4: Candle Strength and Forecast Bias Table
This section provides trend strength analysis using:
Candle strength: Percentage change from open to close
CCI (Commodity Channel Index): Detects trend direction and strength
ATR (Average True Range): Measures volatility
Bias Logic:
Buy: CCI is positive, increasing, and ATR is rising.
Sell: CCI is negative, decreasing, and ATR is rising.
Wait: No clear signal.
📍 Displayed on Chart:
A table in the top-right corner shows:
Candle strength and label (Bullish/Bearish)
Bias with color coding: ✅ Lime (Buy), ❌ Red (Sell), ⚪ Gray (Wait)
🛠️ Inputs You Can Customize
Input Name Description Default
Alignment Tolerance How closely previous close should match current open to consider aligned 0.01
Predict BOS within next N bars Number of bars to watch for BOS confirmation 2
CCI Length Period for CCI calculation 20
ATR Length Period for ATR calculation 14
🧭 Trading Strategy – Steps to Use
🔍 Step 1: Watch for BOS Prediction
Look for orange triangle up/down on the chart.
This is your heads-up for a potential reversal.
✅ Step 2: Wait for BOS Confirmation
Only trade if:
Price breaks above the high (for bullish) or below the low (for bearish) of the previous bar.
You’ll see green/red labels on the chart.
🛒 Step 3: Entry
Bullish Entry (Long):
After confirmed bullish BOS
Bias table shows "Buy"
Bearish Entry (Short):
After confirmed bearish BOS
Bias table shows "Sell"
🎯 Step 4: Stop Loss and Take Profit
Use ATR to gauge volatility and set stop loss.
Example: SL = Entry ± 1.5x ATR
Consider previous swing high/low for take profit levels.
🔔 Step 5: Set Alerts
Turn on alerts in TradingView to be notified of predictions and confirmations.
FVG + OB + RSI Divergence + Volume Spikes🧠 FVG + OB + RSI Divergence + Volume Spikes – Market Structure Confluence Tool
This all-in-one indicator brings together four powerful market concepts into a single script designed to help traders identify high-probability trade setups with precision and clarity:
🔍 What It Does
✅ Fair Value Gaps (FVG)
Highlights inefficiencies in price action, showing where the market may return to “rebalance.”
✅ Order Blocks (OB)
Marks key institutional footprints — bullish and bearish order blocks based on engulfing candle structures.
✅ RSI Divergence
Detects both bullish and bearish divergences between price and RSI, signaling potential reversals.
✅ Volume Spikes
Flags bars where volume significantly exceeds the average — a common footprint of smart money.
🎯 How to Use
Use this tool to spot confluences between price inefficiencies (FVG), key reversal zones (OB), momentum shifts (RSI Divergence), and institutional interest (Volume Spikes). The best setups often occur when multiple signals align — especially at key support/resistance or trend zones.
⚙️ Inputs
RSI length (for divergence)
Volume spike sensitivity (multiplier)
Lookback for Order Blocks and FVGs
⚠️ Notes
This is a non-repainting tool.
Ideal for price action, SMC, ICT, and order flow traders.
Combine with your existing strategy and higher time frame bias for best results.
DS Gurukul RoundupRoundup (Support & Resistance Indicator) For Bank Nifty
By DS Gurukul
To be used only for Bank Nifty.
Indicator Overview
The Round Figure Indicator identifies key psychological support and resistance levels based on round numbers. These levels often act as strong turning points in price action due to trader psychology and institutional order placement.
How It Works
Key Levels:
Mid Band (Black Solid Line): Major round number
Upper Band (Green Solid Line): Mid Band (resistance)
Lower Band (Red Solid Line): Mid Band (support)
Sub-Bands (Dotted Lines): ±100 levels for tighter zones
Alerts: Triggers when price touches any band, signaling potential reversals or breakouts.
Trading Strategy
✅ Bounce Trades:
Buy near Lower Band or Mid Sub-Lower with bullish confirmation (e.g., hammer candle).
Sell near Upper Band or Mid Sub-Upper with bearish rejection (e.g., shooting star).
✅ Breakout Trades:
Enter long on a close above Upper Band with volume.
Enter short on a close below Lower Band with momentum.
⚠️ Risk Management:
Place stops just beyond the opposite sub-band.
Avoid trading if price is stuck between mid/sub-bands (choppy market).
Why It Works
Round numbers attract limit orders (support/resistance).
Institutions use these levels for stop placements and profit targets.
Works across all timeframes (scalping to swing trading).
🔔 Tip: Combine with RSI/MACD for higher-probability trades!
3MA Signal Flow📘【概要 / Overview】
3本の移動平均線(短期・中期・長期)の「並び順」と「方向」が同時に揃ったとき、シグナル(▲)を表示するシンプルなトレンド補助インジケーターです。
- 上昇シグナル:短期 > 中期 > 長期 & すべて上向き
- 下降シグナル:短期 < 中期 < 長期 & すべて下向き
- それ以外:ノーシグナル
This indicator shows a triangle signal (▲) **only when both the correct order and direction** of short/mid/long moving averages align:
- Bullish: short > mid > long **AND** all sloping upward
- Bearish: short < mid < long **AND** all sloping downward
- Otherwise: no signal
---
🔧【用途 / Use Cases】
- トレンド初動の検出
- 押し目・戻り目後の再加速ポイント確認
- MACDなど他インジとの併用で精度向上
- マルチタイム分析にも対応(1分足〜日足OK)
- Detect early trends
- Confirm trend continuation after pullbacks
- Combine with indicators like MACD
- Works on all timeframes (1min to daily)
---
🤝【他のインジケーターや裁量との併用例 / Example Combinations】
このインジケーター単体でもシンプルに使えますが、以下のような併用例が実戦的に役立ちます:
▶ **MACDヒストグラムとの組み合わせ**
シグナル出現時にMACDが拡大傾向であれば、モメンタムが伴っていると判断しやすいです。
弱ければロット調整やスルーの判断材料に。
▶ **トレンドラインブレイクとの併用(裁量)**
自分で引いたトレンドラインを明確に抜けた直後に▲シグナルが出現するケースでは、初動キャッチの根拠となりやすく、エントリー検討の優先度が高まります。
This tool works best when combined with other context:
▶ **With MACD histogram**
A strong expanding histogram reinforces the signal.
Weak or flat? Consider skipping or reducing size.
▶ **With manual trendline breaks**
If a signal appears just after your own trendline is broken, it may indicate a trend initiation zone with high reliability.
---
⚙️【カスタマイズ可能な設定 / Adjustable Settings】
- MAの期間(デフォルト:25, 75, 200)
- シグナルの色やサイズ
- ラベル表示ON/OFFなど
- MA periods (default: 25 / 75 / 200)
- Signal colors & size
- Toggle label display
---
💬【メッセージ / Final Note】
このインジケーターは私自身の経験をもとに設計していますが、手法や使い方は人それぞれです。
ご自身の視点で活用した結果などをコメント欄で共有いただけたら嬉しいです。
お互いの知見を深めるきっかけになれば幸いです。
This indicator reflects my personal trading logic, but I welcome others to explore it in their own way.
If you find a unique or effective use case, I’d be happy to hear it.
Let’s grow together as traders.
Triple EMA Bundle (50, 100, 200) - Osbrah CRG📈 Advanced EMA Indicator – 50/100/200
This custom-built indicator displays the 50, 100, and 200 Exponential Moving Averages (EMAs), giving traders a powerful visual tool to identify key trend directions, dynamic support/resistance levels, and potential market reversals.
Designed for both beginners and advanced users, this tool offers extensive customization options:
* Select which EMAs to display (50, 100, 200)
* Adjust colors, line styles, and thickness
* Choose between different price sources (close, open, hl2, etc.)
* Set custom EMA lengths to fit your strategy
Use Cases:
* Spot trend direction and strength at a glance
* Identify key zones of support and resistance
* Confirm entries/exits based on EMA crossovers or rejections
* Align your trades with higher timeframe trends
Whether you're a swing trader or a scalper, this indicator helps you stay in sync with the market by bringing clarity to long-term momentum zones.
Heikinisi Candle (With MA + Smoothing + Buy/Sell with Cooldown)This custom Heikinisi Candle (With MA + Smoothing + Buy/Sell with Cooldown) indicator combines the advantages of Heikin-Ashi candles with the flexibility of multiple moving averages and smoothing options. The built-in buy/sell signals with cooldown functionality help traders avoid overtrading while capturing trend reversals and momentum shifts. Whether you're a day trader, swing trader, or long-term investor, this indicator offers powerful tools for analyzing price action and making informed trading decisions.
Note: Disable the regular candle to get better visualization.
Key Features:
Custom Heikin-Ashi Candles:
The core feature of this script is the Heikin-Ashi candles, which are known for smoothing price action and helping traders identify market trends more clearly.
Unlike traditional Heikin-Ashi, this version adjusts the Heikin-Ashi close based on specific price action patterns, including rejection signals and engulfing patterns.
The custom Heikin-Ashi open also incorporates momentum, adjusting dynamically based on recent price changes.
Price Action Measurements:
The indicator measures key price action components, including:
Body: The absolute difference between the open and close.
Candle Range: The total range from high to low.
Upper Wick: The distance from the highest price to the maximum of open or close.
Lower Wick: The distance from the lowest price to the minimum of open or close.
These measurements help detect bullish and bearish conditions, as well as price rejection signals.
Buy/Sell Signal Logic:
Buy Signal: Triggered when the Heikin-Ashi close is above the chosen moving average (MA1), with a cooldown period to avoid too frequent signals.
Sell Signal: Triggered when the Heikin-Ashi close falls below the MA1 after a buy signal has already been issued.
The cooldown period ensures that buy and sell signals are spaced apart by a specific number of bars, preventing excessive signal generation during periods of price consolidation.
Multiple Moving Averages (MA):
This script supports up to three customizable moving averages (MA1, MA2, MA3), each of which can be set to different types and lengths, including:
Simple Moving Average (SMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Volume Weighted Moving Average (VWMA)
Volume Weighted Moving Price (VWMP)
Least Squares Moving Average (LSMA)
Hull Moving Average (HMA)
Double Exponential Moving Average (DEMA)
Triple Exponential Moving Average (TEMA)
Users can adjust the length and type of each MA for tailored analysis.
Smoothing Options for MAs:
Users can smooth the output of MAs using various types of smoothing algorithms (SMA, EMA, LSMA, WMA, Gaussian) and a customizable length. This helps to reduce noise in the moving average lines and provides clearer signals.
Gaussian Filter (Advanced Smoothing):
A Gaussian Filter is available as a smoothing option for MAs. This filter reduces noise and makes the moving averages smoother, which can be particularly helpful in volatile or choppy markets.
Alerts and Visualization:
The script allows users to plot buy and sell signals on the chart with distinctive markers. A Buy Signal is shown below the bar with a lime green marker and text "Buy," while a Sell Signal is shown above the bar with a red marker and text "Sell."
Traders can also set up alerts based on the buy/sell signals to get notified in real time.
Indicator Configuration:
Heikin-Ashi Candle Configuration:
Automatically adjusts Heikin-Ashi candles based on rejection signals, engulfing patterns, and momentum. It uses custom formulas for the Heikin-Ashi open and close, making it more sensitive to price action than standard Heikin-Ashi candles.
Moving Averages (MA) Configuration:
You can select from multiple moving average types and lengths (MA1, MA2, MA3) for trend-following analysis.
Choose between SMA, EMA, WMA, VWMA, VWMP, LSMA, HMA, DEMA, and TEMA.
Smoothing Options:
Enable or disable smoothing for the moving averages.
Select from different smoothing types, including SMA, EMA, RMA, WMA, LSMA, and Gaussian.
Cooldown Period:
Control the number of bars that must pass before a new buy/sell signal is triggered. This cooldown period helps prevent excessive trading signals in quick succession.
How to Use:
Analyze Price Action with Heikin-Ashi Candles:
The custom Heikin-Ashi candles are ideal for spotting market trends, reversals, and price rejection. Use the candle patterns to gauge the market sentiment.
Use MAs for Trend Confirmation:
The moving averages (MA1, MA2, MA3) can help identify the prevailing trend. A price above a rising MA indicates an uptrend, while a price below a falling MA suggests a downtrend.
Trigger Buy and Sell Signals:
When the Heikin-Ashi close crosses above MA1, a buy signal is triggered.
When the Heikin-Ashi close crosses below MA1 after a buy signal, a sell signal is triggered.
The cooldown period ensures that signals are spaced out, preventing overtrading.
Use Smoothing for Clearer Signals:
If you are trading in a volatile market, you can use the smoothing options to make the MAs smoother and reduce noise.
Trigger & Confirmation Zones [Daily Logic, LTF View]This indicator identifys the days that are expanding after inside days
Spread/Range Oscillator + Signal + HistogramThe Spread/Range Oscillator is a technical analysis tool designed to assess market momentum by evaluating the relationship between price movement and volatility.
Calculation
Spread: The difference between the closing and opening prices of a candle (close - open).
Range: The difference between the high and low prices of a candle (high - low).
Oscillator: The spread divided by the range (spread / range). This ratio provides a normalized measure of price movement within each candle.
Smoothed Oscillator: An Exponential Moving Average (EMA) applied to the oscillator over a user-defined period (Smoothing Length) to reduce noise.
Signal Line: An EMA of the Smoothed Oscillator over another user-defined period (Signal Line Length) to identify potential trend changes.
Histogram: The difference between the Smoothed Oscillator and the Signal Line (Smoothed Oscillator - Signal Line). Positive values suggest bullish momentum, while negative values indicate bearish momentum.
Inputs
Smoothing Length (EMA): Determines the period for smoothing the oscillator.
Signal Line Length (EMA): Sets the period for the EMA applied to the Smoothed Oscillator to generate the Signal Line.
Visual Representation
Smoothed Oscillator: Plotted as a line representing the smoothed momentum of price movements.
Signal Line: Displayed as a line serving as a reference to identify potential crossovers and trend changes.
Histogram: Rendered as bars, with positive values indicating bullish momentum and negative values indicating bearish momentum.
Zero Line: A horizontal line at zero to distinguish between bullish and bearish territories.
Applications
Momentum Analysis: Identify periods of strong buying or selling pressure based on the oscillator's position relative to the zero line.
Trend Confirmation: Use crossovers between the Smoothed Oscillator and Signal Line to confirm potential trend reversals or continuations.
Divergence Detection: Spot divergences between price action and the oscillator to anticipate possible market turning points.
This indicator is open-source and intended for educational purposes. It is recommended to use it in conjunction with other forms of analysis and risk management practices before making trading decisions.
TK47 36 ChambersTK47 36 Chambers is a precision-crafted EMA (Exponential Moving Average) tool designed to help traders align with multi-timeframe trends while keeping price action clear and uncluttered. Built around the powerful 36 EMA, this script plots the current timeframe’s high, low, and median EMAs as a visual "chamber" or cloud, giving instant feedback on intrabar dynamics.
Shoutout to Insilico, who introduced the 36 EMA as a core trend-following tool — this indicator wouldn’t exist without that spark.
How It Works
Core EMA:
The central element is the 36-period EMA, applied to close, high, and low prices on your current chart.
These three EMAs form a channel or “chamber” that acts as a dynamic zone of control.
The cloud between the high and low EMA can optionally be filled to help visualize volatility.
Higher Timeframe EMAs (HTF EMAs):
Optionally displays Daily, Weekly, 4H, and 1H EMAs (all using the same configurable EMA length, default: 36).
These are interpolated smoothly between HTF candles, creating elegant transitions and avoiding jumpy plotting.
Helps traders spot broader trend bias directly on lower timeframe charts without switching views.
Customizations
Adjustable colors for each EMA layer (current + HTFs).
Toggle cloud fill on/off.
Toggle visibility of each HTF line.
Option to show labels at the edge of the chart (e.g., “W” for Weekly) for clarity.
Use Cases
Confirming trend direction across multiple timeframes.
Identifying pullback entries or mean reversion zones.
Combining with candlestick patterns, liquidity sweeps, or oscillator divergence for high-probability entries.
Notes
All EMAs use the same configurable length to keep things clean and consistent.
Interpolation ensures the HTF EMAs remain smooth and aligned with the LTF candles.
The fill between high and low EMA gives a visual representation of the market’s breathing room — useful for spotting expansions and contractions.
Pump Detector - EMA 4H + Retest H1 (Valid 10x4H bars)📈 Pump Detector – EMA 12/21 on 4H + Retest on H1
This indicator is designed to detect sudden bullish moves ("pumps") on the 4-hour timeframe, and alert traders of potential retest entry points on the 1-hour timeframe.
🔍 Pump activation conditions (on 4H):
EMA 12 crosses above EMA 21
Current volume exceeds the 20-period SMA of volume (on 4H)
When both conditions are met, a pump alert is triggered and a time window opens.
📉 Retest detection logic (on H1):
For the next 10 bars on the 4H chart (~40 hours), the indicator monitors price behavior on the 1H timeframe
If the LOW of any H1 candle touches or drops below EMA 12 or 21 (on H1), a second alert is triggered
✅ Key Features:
Draws EMA 12/21 from the 4H timeframe directly on the chart
Enforces 4H and H1 timeframes, regardless of the chart the script is applied to
One-time detection per pump window: once the 10-bar window expires, the retest alert is disabled until a new pump is detected
Ideal for capturing momentum breakouts followed by technical pullbacks
⚠️ Recommended for:
Traders looking for scalping or swing trading setups on crypto, forex, or stocks. Helps identify post-breakout entry opportunities using a structured and disciplined approach.
MNQ VWAP + RSI Pullback Strategy (More Entries)This strategy is designed for intraday trading on the MNQ (Micro E-mini Nasdaq 100) futures market using a 5-minute timeframe. It combines trend-following logic with pullback entries around the VWAP, confirmed by momentum and volume.
🔍 Core Strategy Concept
Trend Filter: Uses the 200 EMA to ensure trades are only taken in the direction of the prevailing trend.
Mean Reversion Entry: Waits for price to pull back near VWAP, which acts as a dynamic value area.
Momentum Confirmation: Confirms entry using RSI crossovers (above 45 for longs, below 55 for shorts).
Volume Check: Ensures institutional interest by requiring volume to be above recent average.
⚙️ Risk Management
Stop-loss is volatility-based, using the ATR.
Take-profit is placed at 2:1 reward-to-risk ratio.
Trades are filtered to avoid overtrading, with a cooldown period between entries.
🎯 When It Enters Trades
Long Trade: When price is in an uptrend, pulls back near VWAP, RSI crosses up, and volume supports the move.
Short Trade: When price is in a downtrend, pulls up near VWAP, RSI crosses down, and volume confirms weakness.
📊 Ideal Use
Works best during U.S. regular trading hours (9:30 AM–4:00 PM ET).
Targets 3–5 high-quality setups per day with an emphasis on discipline and risk management.
PER x RangeThis Pine Script calculates the target price of the Nikkei Average based on the EPS (Earnings Per Share) and different PER (Price-to-Earnings Ratio) multiples ranging from 17.5x to 12x, in increments of 0.5x. It then plots these target prices on the chart.
Key Features:
Input EPS: You can manually input the current EPS value of the Nikkei Average (the example uses 2380, but you can replace it with the actual EPS).
PER Multiples Calculation: The script calculates target prices for different PER multiples (17.5x, 17x, 16.5x, ..., down to 12x).
Plotting Target Prices: The calculated target prices (EPS * PER) are plotted on the chart as blue lines, showing you different target price scenarios based on varying PER multiples.
Pulse DPO with Z-Score📌 Pulse DPO with Z-Score — Indicator Description (English)
The Pulse DPO (Detrended Price Oscillator) helps identify major market cycle tops and bottoms by removing long-term trends and focusing on shorter-term price cycles.
This enhanced version includes:
A normalized oscillator (0–100) based on recent price deviations.
A smoothed signal to reduce noise.
A Z-Score transformation, scaling the output to a range from –3 to +3, where:
–3 represents extreme oversold conditions (former normalized value = 100),
+3 represents extreme overbought conditions (former normalized value = 1).
🔍 How it works:
The indicator subtracts a delayed moving average from price to isolate short-term cycles (DPO logic).
It then normalizes the oscillator within a lookback window.
Finally, it converts this to a Z-Score scale for easier interpretation of extremes.
🟢 Suggested Usage:
Consider Long entries or Short exits when Z-Score reaches –2 to –3 (deep oversold).
Consider Short entries or Long exits when Z-Score reaches +2 to +3 (deep overbought).
Use in combination with other signals for higher-confidence setups.
Session VolumeThis script tracks and displays 30-minute volume segments during the Regular Trading Hours (RTH) session. It allows traders to visually compare each time block’s volume today vs. the same block from the previous day, helping spot early signs of strength, weakness, or divergence.
Features:
Tracks 13 blocks from 9:30 AM to 4:15 PM ET.
Compares today's volume against historical volume from the same time block yesterday.
Highlights percentage changes per block.
Summary row totals show overall volume trend today vs. yesterday.
This tool is useful for discretionary traders, auction market theorists, and anyone who incorporates market-generated information into their decision-making.
Fibonacci Retracement Strategy with Volume-Based ExtensionThis Pine Script strategy combines Fibonacci retracement levels with candlestick patterns and volume analysis to identify potential trade entries. It aims to capitalize on price reversals in the direction of the prevailing trend.
ATR BandsThe ATR (Average True Range) Bands Indicator is a technical indicator that plots ATR-based bands around the price of a security.
The purpose of this indicator is to assist users in visualizing ATR-based levels, stop losses, take profits, and trailing stop losses on the chart to speed up trade decisions and backtesting sessions.
Sideways + Buy + Sell DetectionSure! Here's the plain-language description of your script without using any code.
---
### 📘 **Script Purpose**
This script is designed to detect three different types of market conditions:
1. **Sideways (range-bound) market** — useful for non-directional strategies like strangles or straddles.
2. **Bullish trend** — provides a signal to consider buying.
3. **Bearish trend** — provides a signal to consider selling.
---
### 🔧 **Indicators Used**
* **RSI (Relative Strength Index)**: Measures market momentum. It's used to determine whether the market is in a bullish, bearish, or neutral zone.
* **ADX (Average Directional Index)** along with **DI+ and DI-**: Measures the strength and direction of a trend.
* **MACD (Moving Average Convergence Divergence)**: Confirms momentum and trend direction based on moving averages.
---
### 🟪 **Sideways Market Signal**
A sideways (non-trending) signal is shown when:
* RSI indicates the market is neither overbought nor oversold (in the middle range).
* ADX shows weak trend strength.
* The ADX value is lower than both DI+ and DI-, suggesting indecision or lack of clear trend.
A purple label appears below the bar when this condition is met.
---
### 🟩 **Buy Signal**
A buy signal is generated when:
* RSI shows strong upward momentum.
* ADX confirms there is a strong trend.
* MACD confirms bullish conditions with both the MACD and signal lines above zero and in the correct crossover direction.
A green label appears below the bar when these bullish conditions align.
---
### 🟥 **Sell Signal**
A sell signal appears when:
* RSI shows strong downward momentum.
* ADX confirms a strong trend.
* MACD confirms bearish conditions, with both MACD and signal lines below zero and in the correct crossover direction.
A red label appears — currently also plotted below the bar (which you may want to move above the bar for better clarity).
---
### ✅ **Use Case**
This script is suitable for:
* Deciding when to deploy **strangle/straddle** strategies in sideways markets.
* Identifying strong **bullish or bearish trends** for directional trades.
* Filtering out weak or indecisive conditions.
Momentum Divergence OscillatorMomentum Divergence Oscillator is a customizable oscillator that measures the percentage distance between price and a user-defined moving average (SMA, EMA, WMA, or RMA) to gauge momentum strength. The script includes two smoothed oscillator lines (Momentum and Signal) and automatically detects both bullish and bearish regular divergences based on momentum vs. price action pivots.
🔧 Features:
Selectable price basis: Close, HL2, HLC3, or OHLC4
Selectable momentum baseline type: SMA, EMA, WMA, RMA
Custom smoothing options for momentum and signal lines
Bullish and Bearish Divergence detection, with labeled plot points
Built-in alerts for regular divergences
Compatible with any timeframe or asset
Olas21 BUY SELL TREND 1. Use Only Strong Buy/Sell Signals
The script already filters for "Strong BUY" (with Supertrend support). Use only:
🚀 Strong BUY when Supertrend is downtrend (direction < 0)
☄️ Strong SELL when Supertrend is uptrend (direction > 0)
Why?
These signals are filtered and more reliable.
2. Enable Trend Confirmation: EMA Filter
Make sure you enable the EMA filter (already in the script):
plaintext
Copy
Edit
✅ Use EMA Trend Filter = True
📈 Buy only if price is above EMA200 (bull trend)
📉 Sell only if price is below EMA200 (bear trend)
This ensures you only trade with the trend.
3. Add Confirmation Indicators
Here are the top options:
Indicator Use It For Recommended Settings
RSI Avoid overbought/oversold traps RSI(14) < 70 for buy, > 30 for sell
ADX Confirm strong trend ADX > 20 or 25
MACD Confirm momentum direction MACD line > Signal line for buy
Volume Spike Confirm market interest Volume > 20-period avg volume
4. Avoid Trading in Choppy Conditions
Stay out if:
Price is sideways near EMAs
Low volume or no trend confirmation
No clear higher high / lower low structure
5. Best Timeframes for High Win Rate
Use higher timeframes for cleaner signals:
1H, 4H, 1D (especially for swing trading)
5M–15M only if scalping with strict rules and fast exits
6. Backtest and Tune Your SL/TP
Use:
SL = 0.5–1.5%
TP = 1.5–2.5%
Tight stops + quick profits = higher win rate
👉 Use the strategy.tester in TradingView and adjust these values.
🔧 Sample Confirmation Logic (Optional Additions)
You can edit the script to add confirmations like RSI or MACD:
pinescript
Copy
Edit
rsi = ta.rsi(close, 14)
rsiBuyOk = rsi < 70
rsiSellOk = rsi > 30
adx = ta.adx(14)
trendStrong = adx > 20
finalLong = longCondition and rsiBuyOk and trendStrong
finalShort = shortCondition and rsiSellOk and trendStrong
Then replace your strategy.entry conditions with:
pinescript
Copy
Edit
if finalLong
strategy.entry("Long", strategy.long)
if finalShort
strategy.entry("Short", strategy.short)
✅ Summary: Your Confirmation Checklist
Filter Confirmed?
Supertrend alignment (Strong Buy/Sell) ✅
EMA trend filter (price above/below EMA200) ✅
RSI overbought/oversold ✅
ADX showing trend strength ✅
Volume above average ✅
Enhanced Volume Trend Indicator with BB SqueezeEnhanced Volume Trend Indicator with BB Squeeze: Comprehensive Explanation
The visualization system allows traders to quickly scan multiple securities to identify high-probability setups without detailed analysis of each chart. The progression from squeeze to breakout, supported by volume trend confirmation, offers a systematic approach to identifying trading opportunities.
The script combines multiple technical analysis approaches into a comprehensive dashboard that helps traders make informed decisions by identifying high-probability setups while filtering out noise through its sophisticated confirmation requirements. It combines multiple technical analysis approaches into an integrated visual system that helps traders identify potential trading opportunities while filtering out false signals.
Core Features
1. Volume Analysis Dashboard
The indicator displays various volume-related metrics in customizable tables:
AVOL (After Hours + Pre-Market Volume): Shows extended hours volume as a percentage of the 21-day average volume with color coding for buying/selling pressure. Green indicates buying pressure and red indicates selling pressure.
Volume Metrics: Includes regular volume (VOL), dollar volume ($VOL), relative volume compared to 21-day average (RVOL), and relative volume compared to 90-day average (RVOL90D).
Pre-Market Data: Optional display of pre-market volume (PVOL), pre-market dollar volume (P$VOL), pre-market relative volume (PRVOL), and pre-market price change percentage (PCHG%).
2. Enhanced Volume Trend (VTR) Analysis
The Volume Trend indicator uses adaptive analysis to evaluate buying and selling pressure, combining multiple factors:
MACD (Moving Average Convergence Divergence) components
Volume-to-SMA (Simple Moving Average) ratio
Price direction and market conditions
Volume change rates and momentum
EMA (Exponential Moving Average) alignment and crossovers
Volatility filtering
VTR Visual Indicators
The VTR score ranges from 0-100, with values above 50 indicating bullish conditions and below 50 indicating bearish conditions. This is visually represented by colored circles:
"●" (Filled Circle):
Green: Strong bullish trend (VTR ≥ 80)
Red: Strong bearish trend (VTR ≤ 20)
"◯" (Hollow Circle):
Green: Moderate bullish trend (VTR 65-79)
Red: Moderate bearish trend (VTR 21-35)
"·" (Small Dot):
Green: Weak bullish trend (VTR 55-64)
Red: Weak bearish trend (VTR 36-45)
"○" (Medium Hollow Circle): Neutral conditions (VTR 46-54), shown in gray
In "Both" display mode, the VTR shows both the numerical score (0-100) alongside the appropriate circle symbol.
Enhanced VTR Settings
The Enhanced Volume Trend component offers several advanced customization options:
Adaptive Volume Analysis (volTrendAdaptive):
When enabled, dynamically adjusts volume thresholds based on recent market volatility
Higher volatility periods require proportionally higher volume to generate significant signals
Helps prevent false signals during highly volatile markets
Keep enabled for most trading conditions, especially in volatile markets
Speed of Change Weight (volTrendSpeedWeight, range 0-1):
Controls emphasis on volume acceleration/deceleration rather than absolute levels
Higher values (0.7-1.0): More responsive to new volume trends, better for momentum trading
Lower values (0.2-0.5): Less responsive, better for trend following
Helps identify early volume trends before they fully develop
Momentum Period (volTrendMomentumPeriod, range 2-10):
Defines lookback period for volume change rate calculations
Lower values (2-3): More responsive to recent changes, better for short timeframes
Higher values (7-10): Smoother, better for daily/weekly charts
Directly affects how quickly the indicator responds to new volume patterns
Volatility Filter (volTrendVolatilityFilter):
Adjusts significance of volume by factoring in current price volatility
High volume during high volatility receives less weight
High volume during low volatility receives more weight
Helps distinguish between genuine volume-driven moves and volatility-driven moves
EMA Alignment Weight (volTrendEmaWeight, range 0-1):
Controls importance of EMA alignments in final VTR calculation
Analyzes multiple EMA relationships (5, 10, 21 period)
Higher values (0.7-1.0): Greater emphasis on trend structure
Lower values (0.2-0.5): More focus on pure volume patterns
Display Mode (volTrendDisplayMode):
"Value": Shows only numerical score (0-100)
"Strength": Shows only symbolic representation
"Both": Shows numerical score and symbol together
3. Bollinger Band Squeeze Detection (SQZ)
The BB Squeeze indicator identifies periods of low volatility when Bollinger Bands contract inside Keltner Channels, often preceding significant price movements.
SQZ Visual Indicators
"●" (Filled Circle): Strong squeeze - high probability setup for an impending breakout
Green: Strong squeeze with bullish bias (likely upward breakout)
Red: Strong squeeze with bearish bias (likely downward breakout)
Orange: Strong squeeze with unclear direction
"◯" (Hollow Circle): Moderate squeeze - medium probability setup
Green: With bullish EMA alignment
Red: With bearish EMA alignment
Orange: Without clear directional bias
"-" (Dash): Gray dash indicates no squeeze condition (normal volatility)
The script identifies squeeze conditions through multiple methods:
Bollinger Bands contracting inside Keltner Channels
BB width falling to bottom 20% of recent range (BB width percentile)
Very narrow Keltner Channel (less than 5% of basis price)
Tracking squeeze duration in consecutive bars
Different squeeze strengths are detected:
Strong Squeeze: BB inside KC with tight BB width and narrow KC
Moderate Squeeze: BB inside KC with either tight BB width or narrow KC
No Squeeze: Normal market conditions
4. Breakout Detection System
The script includes two breakout indicators working in sequence:
4.1 Pre-Breakout (PBK) Indicator
Detects potential upcoming breakouts by analyzing multiple factors:
Squeeze conditions lasting 2-3 bars or more
Significant price ranges
Strong volume confirmation
EMA/MACD crossovers
Consistent price direction
PBK Visual Indicators
"●" (Filled Circle): Detected pre-breakout condition
Green: Likely upward breakout (bullish)
Red: Likely downward breakout (bearish)
Orange: Direction not yet clear, but breakout likely
"-" (Dash): Gray dash indicates no pre-breakout condition
The PBK uses sophisticated conditions to reduce false signals including minimum squeeze length, significant price movement, and technical confirmations.
4.2 Breakout (BK) Indicator
Confirms actual breakouts in progress by identifying:
End of squeeze or strong expansion of Bollinger Bands
Volume expansion
Price moving outside Bollinger Bands
EMA crossovers with volume confirmation
MACD crossovers with significant price range
BK Visual Indicators
"●" (Filled Circle): Confirmed breakout in progress
Green: Upward breakout (bullish)
Red: Downward breakout (bearish)
Orange: Unusual breakout pattern without clear direction
"◆" (Diamond): Special breakout conditions (meets some but not all criteria)
"-" (Dash): Gray dash indicates no breakout detected
The BK indicator uses advanced filters for confirmation:
Requires consecutive breakout signals to reduce false positives
Strong volume confirmation requirements (40% above average)
Significant price movement thresholds
Consistency checks between price action and indicators
5. Market Metrics and Analysis
Price Change Percentage (CHG%)
Displays the current percentage change relative to the previous day's close, color-coded green for positive changes and red for negative changes.
Average Daily Range (ADR%)
Calculates the average daily percentage range over a specified period (default 20 days), helping traders gauge volatility and set appropriate price targets.
Average True Range (ATR)
Shows the Average True Range value, a volatility indicator developed by J. Welles Wilder that measures market volatility by decomposing the entire range of an asset price for that period.
Relative Strength Index (RSI)
Displays the standard 14-period RSI, a momentum oscillator that measures the speed and change of price movements on a scale from 0 to 100.
6. External Market Indicators
QQQ Change
Shows the percentage change in the Invesco QQQ Trust (tracking the Nasdaq-100 Index), useful for understanding broader tech market trends.
UVIX Change
Displays the percentage change in UVIX, a volatility index, providing insight into market fear and potential hedging activity.
BTC-USD
Shows the current Bitcoin price from Coinbase, useful for traders monitoring crypto correlation with equities.
Market Breadth (BRD)
Calculates the percentage difference between ATHI.US and ATLO.US (high vs. low securities), indicating overall market direction and strength.
7. Session Analysis and Volume Direction
Session Detection
The script accurately identifies different market sessions:
Pre-market: 4:00 AM to 9:30 AM
Regular market: 9:30 AM to 4:00 PM
After-hours: 4:00 PM to 8:00 PM
Closed: Outside trading hours
This detection works on any timeframe through careful calculation of current time in seconds.
Buy/Sell Volume Direction
The script analyzes buying and selling pressure by:
Counting up volume when close > open
Counting down volume when close < open
Tracking accumulated volume within the day
Calculating intraday pressure (up volume minus down volume)
Enhanced AVOL Calculation
The improved AVOL calculation works in all timeframes by:
Estimating typical pre-market and after-hours volume percentages
Combining yesterday's after-hours with today's pre-market volume
Calculating this as a percentage of the 21-day average volume
Determining buying/selling pressure by analyzing after-hours and pre-market price changes
Color-coding results: green for buying pressure, red for selling pressure
This calculation is particularly valuable because it works consistently across any timeframe.
Customization Options
Display Settings
The dashboard has two customizable tables: Volume Table and Metrics Table, with positions selectable as bottom_left or bottom_right.
All metrics can be individually toggled on/off:
Pre-market data (PVOL, P$VOL, PRVOL, PCHG%)
Volume data (AVOL, RVOL Day, RVOL 90D, Volume, SEED_YASHALGO_NSE_BREADTH:VOLUME )
Price metrics (ADR%, ATR, RSI, Price Change%)
Market indicators (QQQ, UVIX, Breadth, BTC-USD)
Analysis indicators (Volume Trend, BB Squeeze, Pre-Breakout, Breakout)
These toggle options allow traders to customize the dashboard to show only the metrics they find most valuable for their trading style.
Table and Text Customization
The dashboard's appearance can be customized:
Table background color via tableBgColor
Text color (White or Black) via textColorOption
The indicator uses smart formatting for volume and price values, automatically adding appropriate suffixes (K, M, B) for readability.
MACD Configuration for VTR
The Volume Trend calculation incorporates MACD with customizable parameters:
Fast Length: Controls the period for the fast EMA (default 3)
Slow Length: Controls the period for the slow EMA (default 9)
Signal Length: Controls the period for the signal line EMA (default 5)
MACD Weight: Controls how much influence MACD has on the volume trend score (default 0.3)
These settings allow traders to fine-tune how momentum is factored into the volume trend analysis.
Bollinger Bands and Keltner Channel Settings
The Bollinger Bands and Keltner Channels used for squeeze detection have preset (hidden) parameters:
BB Length: 20 periods
BB Multiplier: 2.0 standard deviations
Keltner Length: 20 periods
Keltner Multiplier: 1.5 ATR
These settings follow standard practice for squeeze detection while maintaining simplicity in the user interface.
Practical Trading Applications
Complete Trading Strategies
1. Squeeze Breakout Strategy
This strategy combines multiple components of the indicator:
Wait for a strong squeeze (SQZ showing ●)
Look for pre-breakout confirmation (PBK showing ● in green or red)
Enter when breakout is confirmed (BK showing ● in same direction)
Use VTR to confirm volume supports the move (VTR ≥ 65 for bullish or ≤ 35 for bearish)
Set profit targets based on ADR (Average Daily Range)
Exit when VTR begins to weaken or changes direction
2. Volume Divergence Strategy
This strategy focuses on the volume trend relative to price:
Identify when price makes a new high but VTR fails to confirm (divergence)
Look for VTR to show weakening trend (● changing to ◯ or ·)
Prepare for potential reversal when SQZ begins to form
Enter counter-trend position when PBK confirms reversal direction
Use external indicators (QQQ, BTC, Breadth) to confirm broader market support
3. Pre-Market Edge Strategy
This strategy leverages pre-market data:
Monitor AVOL for unusual pre-market activity (significantly above 100%)
Check pre-market price change direction (PCHG%)
Enter position at market open if VTR confirms direction
Use SQZ to determine if volatility is likely to expand
Exit based on RVOL declining or price reaching +/- ADR for the day
Market Context Integration
The indicator provides valuable context for trading decisions:
QQQ change shows tech market direction
BTC price shows crypto market correlation
UVIX change indicates volatility expectations
Breadth measurement shows market internals
This context helps traders avoid fighting the broader market and align trades with overall market direction.
Timeframe Optimization
The indicator is designed to work across different timeframes:
For day trading: Focus on AVOL, VTR, PBK/BK, and use shorter momentum periods
For swing trading: Focus on SQZ duration, VTR strength, and broader market indicators
For position trading: Focus on larger VTR trends and use EMA alignment weight
Advanced Analytical Components
Enhanced Volume Trend Score Calculation
The VTR score calculation is sophisticated, with the base score starting at 50 and adjusting for:
Price direction (up/down)
Volume relative to average (high/normal/low)
Volume acceleration/deceleration
Market conditions (bull/bear)
Additional factors are then applied, including:
MACD influence weighted by strength and direction
Volume change rate influence (speed)
Price/volume divergence effects
EMA alignment scores
Volatility adjustments
Breakout strength factors
Price action confirmations
The final score is clamped between 0-100, with values above 50 indicating bullish conditions and below 50 indicating bearish conditions.
Anti-False Signal Filters
The indicator employs multiple techniques to reduce false signals:
Requiring significant price range (minimum percentage movement)
Demanding strong volume confirmation (significantly above average)
Checking for consistent direction across multiple indicators
Requiring prior bar consistency (consecutive bars moving in same direction)
Counting consecutive signals to filter out noise
These filters help eliminate noise and focus on high-probability setups.
MACD Enhancement and Integration
The indicator enhances standard MACD analysis:
Calculating MACD relative strength compared to recent history
Normalizing MACD slope relative to volatility
Detecting MACD acceleration for stronger signals
Integrating MACD crossovers with other confirmation factors
EMA Analysis System
The indicator uses a comprehensive EMA analysis system:
Calculating multiple EMAs (5, 10, 21 periods)
Detecting golden cross (10 EMA crosses above 21 EMA)
Detecting death cross (10 EMA crosses below 21 EMA)
Assessing price position relative to EMAs
Measuring EMA separation percentage
Recent Enhancements and Evolution
Version 5.2 includes several improvements:
Enhanced AVOL to show buying/selling direction through color coding
Improved VTR with adaptive analysis based on market conditions
AVOL display now works in all timeframes through sophisticated estimation
Removed animal symbols and streamlined code with bright colors for better visibility
Improved anti-false signal filters throughout the system
Optimizing Indicator Settings
For Different Market Types
Range-Bound Markets:
Lower EMA Alignment Weight (0.2-0.4)
Higher Speed of Change Weight (0.8-1.0)
Focus on SQZ and PBK signals for breakout potential
Trending Markets:
Higher EMA Alignment Weight (0.7-1.0)
Moderate Speed of Change Weight (0.4-0.6)
Focus on VTR strength and BK confirmations
Volatile Markets:
Enable Volatility Filter
Enable Adaptive Volume Analysis
Lower Momentum Period (2-3)
Focus on strong volume confirmation (VTR ≥ 80 or ≤ 20)
For Different Asset Classes
Equities:
Standard settings work well
Pay attention to AVOL for gap potential
Monitor QQQ correlation
Futures:
Consider higher Volume/RVOL weight
Reduce MACD weight slightly
Pay close attention to SQZ duration
Crypto:
Higher volatility thresholds may be needed
Monitor BTC price for correlation
Focus on stronger confirmation signals
Integrated Visual System for Trading Decisions
The colored circle indicators create an intuitive visual system for quick market assessment:
Progression Sequence: SQZ (Squeeze) → PBK (Pre-Breakout) → BK (Breakout)
This sequence often occurs in order, with the squeeze leading to pre-breakout conditions, followed by an actual breakout.
VTR (Volume Trend): Provides context about the volume supporting these movements.
Color Coding: Green for bullish conditions, red for bearish conditions, and orange/gray for neutral or undefined conditions.