byquan RSI Divergence (OB/OS + RSI MA Base)byquan RSI Divergence (OB/OS + RSI MA Base)
Description
byquan RSI Divergence is a technical analysis indicator designed to visualize RSI-based divergence patterns within clearly defined overbought and oversold zones, enhanced with an optional RSI moving average baseline.
The script focuses on structural divergence detection rather than signal prediction, providing visual reference points to help users study momentum behavior and price–oscillator relationships.
This indicator is intended for educational and analytical purposes only.
Conceptual Overview
The core idea of this indicator is based on a widely accepted technical principle:
When price structure and momentum structure diverge, market behavior may be transitioning rather than continuing impulsively.
Instead of reacting to every fluctuation, this script identifies well-defined divergence formations that occur:
At RSI pivot points
Within controlled lookback ranges
Inside overbought or oversold zones
Indicator Components
1. RSI Oscillator
The indicator uses a standard Relative Strength Index (RSI):
User-defined period
User-defined source price
RSI values are plotted directly in the pane for transparency and clarity.
2. RSI Base Moving Average
An optional RSI baseline is calculated using a selectable moving average type:
SMA
EMA
RMA
WMA
This baseline is intended to provide additional context for momentum direction and smoothing, not as a signal trigger.
3. Overbought / Oversold Zones
Customizable horizontal levels define:
Overbought conditions
Oversold conditions
Divergences are evaluated only when RSI is located inside the corresponding zone, helping reduce irrelevant signals.
4. Pivot-Based Divergence Detection
The script detects RSI pivot highs and lows using configurable left/right lookback values.
Based on these pivots, it evaluates four divergence types:
Regular Bullish Divergence
Hidden Bullish Divergence
Regular Bearish Divergence
Hidden Bearish Divergence
Each divergence type is plotted independently and can be enabled or disabled by the user.
5. Lookback Range Control
To avoid excessive or outdated comparisons, divergence evaluation is constrained within a user-defined bar range.
This helps ensure that only structurally relevant divergences are displayed.
Visualization
Divergence lines are plotted directly on the RSI pane
Labels are used to distinguish divergence types
Regular and hidden divergences are visually differentiated using color transparency
The indicator prioritizes clarity and interpretability over signal density.
Alert Logic
An alert condition is provided when any divergence type is detected.
Alerts are informational and do not imply direction, timing, or outcome.
Intended Use
This indicator is designed to be used as:
A momentum structure study tool
A visual divergence reference
A supporting component within broader technical analysis
It is not intended to:
Predict market tops or bottoms
Serve as a standalone trading system
Provide financial or investment advice
Technical Notes
The script uses pivot-based confirmation and therefore does not repaint
All calculations are deterministic and rule-based
Divergences are identified only after pivots are confirmed
Results may vary across assets and timeframes
Attribution & Transparency
This script represents a custom implementation and adaptation of commonly documented RSI divergence techniques, including:
Pivot-based divergence logic
Overbought / oversold filtering
RSI smoothing via moving averages
These concepts are widely used in technical analysis.
The specific parameterization, visualization, and filtering structure reflect a personal analytical approach, without claiming exclusivity over the underlying methods.
Disclaimer
This indicator is provided for educational and analytical purposes only.
It does not constitute financial advice, trading recommendations, or performance guarantees.
Past behavior does not imply future results.
Penunjuk dan strategi
byquan AlphaTrend + Supertrend ComboAlphaTrend + Supertrend Combo (Confirmation-Based Indicator)
Description
AlphaTrend + Supertrend Combo is a confirmation-based technical indicator that combines momentum-sensitive trend tracking with ATR-based trend structure.
The script is designed to highlight situations where two independent trend-following methods agree within a short time window, helping users visually identify moments of potential trend alignment.
This indicator is intended for technical analysis and educational use only.
Conceptual Idea
The core concept of this indicator is confirmation, not prediction.
Instead of relying on a single signal source, the script observes:
A volatility-adjusted trend line (AlphaTrend)
A price-structure-based trend switch (Supertrend)
A signal is displayed only when both methods confirm each other within a limited number of bars.
Indicator Components
1. AlphaTrend Module
AlphaTrend is calculated using:
ATR-based dynamic levels
Momentum evaluation via:
Money Flow Index (MFI), or
RSI when volume data is unavailable
This module adapts its direction based on market momentum and volatility, producing trend transition events rather than continuous signals.
2. Supertrend Module
The Supertrend component uses:
ATR-based bands
Price crossing logic to define trend direction changes
Supertrend acts as a structural trend confirmation layer, reacting to changes in price behavior relative to volatility.
3. Confirmation Window Logic
Rather than requiring both indicators to trigger on the exact same bar, the script introduces a bar-based confirmation window:
When one indicator produces a signal
The script waits up to a user-defined number of bars
If the second indicator confirms within this window, the signal is considered valid
This approach allows for natural timing differences between indicators while avoiding long-delayed confirmations.
Signal Logic Summary
BUY confirmation
AlphaTrend signals bullish direction
Supertrend confirms bullish direction within the waiting window
SELL confirmation
AlphaTrend signals bearish direction
Supertrend confirms bearish direction within the waiting window
Signals are displayed only when both conditions are satisfied.
Inputs Overview
Confirmation Bars
Defines how many bars the script waits for the second indicator to confirm
AlphaTrend Settings
Period, multiplier, source, and volume handling options
Supertrend Settings
ATR period, multiplier, and calculation method
All parameters are user-adjustable to support different instruments and timeframes.
Intended Use
This indicator is designed to be used as:
A confirmation or alignment tool
A visual aid for studying trend behavior
A supporting layer within a broader analysis framework
It is not intended to:
Predict market direction
Serve as a complete trading system
Replace risk management or personal judgment
Technical Notes
The script is rule-based and deterministic
No repainting logic is used
Signals depend strictly on historical and current bar data
Results may vary across symbols, sessions, and timeframes
Attribution & Transparency
This script represents a custom integration and modification of widely known technical analysis concepts, including:
AlphaTrend-style volatility-adjusted trend tracking
Supertrend ATR-based trend logic
These methods are commonly documented in technical analysis literature.
The implementation, parameter structure, and confirmation logic reflect a personal adaptation and combination, not a claim of originality over the underlying concepts.
Disclaimer
This indicator is provided for educational and analytical purposes only.
It does not constitute financial advice, investment recommendations, or an invitation to trade.
Past behavior does not guarantee future outcomes.
byquan GP maxmin+SPtrendGP MaxMin SRSI + SSPtrend
Description
GP MaxMin SRSI + SSPtrend is a composite technical indicator designed to combine momentum context analysis with trend confirmation.
The script integrates:
A multi-source, multi-timeframe Stochastic RSI context layer
A standard Supertrend-based trend switch
A time-based signal validation window to reduce isolated or out-of-context signals
This indicator is intended for market observation and educational analysis, not as a standalone trading system.
Conceptual Overview
The core idea behind this indicator is simple:
Strong trend reversals or continuations are more meaningful when they occur after the market reaches extreme momentum conditions across multiple timeframes.
Instead of triggering signals immediately at overbought or oversold levels, this script:
Detects momentum extremes first
Waits for a structural trend confirmation
Allows signals only within a limited context window
Indicator Structure
1. Multi-Source Stochastic RSI Context
The script computes Stochastic RSI values based on four price sources:
Open
High
Low
Close
From these values, the script extracts:
The minimum momentum reading (deepest oversold condition)
The maximum momentum reading (strongest overbought condition)
This approach aims to reflect momentum dispersion, rather than relying on a single price input.
2. Multi-Timeframe Aggregation
Momentum values are evaluated across multiple higher timeframes (configurable by the user).
The aggregated values are normalized into a unified 0–100 scale, producing:
A composite oversold context
A composite overbought context
These conditions define market context only, not entry signals.
3. Trend Confirmation Using Supertrend
A conventional Supertrend calculation is used to detect trend state changes:
Trend transitions define potential directional shifts
Supertrend acts as the only trigger mechanism
No signal is generated solely from momentum values.
4. Context Validation Window
Once an overbought or oversold context is detected:
A configurable bar-based window is opened
Supertrend signals occurring within this window are considered valid
Signals outside the window are ignored
This design helps avoid delayed or unrelated confirmations.
Signal Logic Summary
BUY context
Oversold momentum detected → Supertrend turns bullish within the allowed window
SELL context
Overbought momentum detected → Supertrend turns bearish within the allowed window
Only signals satisfying both context and confirmation are displayed.
Intended Use
This indicator is designed to be used as:
A confirmation or filtering tool
A context layer alongside other analysis methods
A visual aid for studying market structure and momentum behavior
It is not intended to:
Predict future price movements
Replace risk management
Provide trading advice or signals with guaranteed outcomes
Important Notes
This script does not repaint
All calculations are rule-based and deterministic
Results may vary across symbols and timeframes
Users are encouraged to evaluate the logic independently
Past behavior does not imply future performance.
Attribution & Transparency
This script is a custom integration and modification of commonly used technical concepts such as:
Stochastic RSI
Supertrend
Multi-timeframe analysis
While the underlying ideas are widely known, the combination, parameterization, and signal-filtering logic reflect a personal implementation approach.
Disclaimer
This script is provided for educational and analytical purposes only.
It does not constitute financial advice, investment recommendations, or solicitation to trade.
byquan Indicator A - EMA20 Early Retest BUY (Trend Filter)Indicator A – EMA20 Early Retest (Trend-Filtered Buy Setup)
Overview
Indicator A – EMA20 Early Retest is a trend-following tool designed to identify early pullback buy opportunities using only EMA structure, without relying on candlestick patterns.
The indicator focuses on:
EMA alignment
EMA momentum
Controlled pullbacks
Early retests before a full breakout
It is designed to generate one signal per trend leg, helping reduce noise and repeated entries.
⚠️ This indicator is intended for educational and analytical purposes only. It does not provide trading advice or guarantee any performance.
Core Concept
The logic behind Indicator A is based on a simple observation:
In a healthy uptrend, EMA20 often pulls back after a strong move, then retests near its previous peak before continuing.
Instead of waiting for a breakout or reacting late, this indicator attempts to highlight early retest zones, where momentum may resume while risk remains relatively controlled.
EMA Structure Used
The indicator uses three exponential moving averages:
EMA20 → short-term momentum
EMA50 → medium-term trend
EMA100 → higher timeframe structure
Only the EMA values themselves are used.
No candle shapes, wicks, or price patterns are involved.
Buy Conditions (High-Level)
A BUY signal is considered only when all of the following steps occur in sequence:
1. EMA20 Crosses Up
EMA20 must cross above EMA50 or EMA100, signaling the start of a potential bullish momentum phase.
This event initializes a new setup.
2. EMA20 Builds a Peak
After the cross:
EMA20 continues rising
The indicator tracks the highest EMA20 value
The peak is considered valid only after EMA20 starts declining for more than one step, helping avoid minor fluctuations
3. Deep Pullback Requirement
EMA20 must pull back by a minimum percentage of the total move from:
the cross point → to the EMA20 peak
This pullback depth is configurable (default: 25%).
Shallow pullbacks are ignored.
4. Early Retest Zone
After a valid pullback, the indicator waits for EMA20 to rise again and reach approximately 90% of the previous EMA20 peak.
This is called an early retest:
The peak does not need to be broken
Momentum resumption is detected before a full breakout
5. Trend Filter (Critical)
A BUY signal is allowed only if:
EMA50 is above EMA100
This filter ensures that signals are aligned with the broader trend structure and helps avoid counter-trend setups.
If the early retest occurs while this condition is not met, the setup is discarded permanently.
Signal Behavior
Only one BUY signal is generated per EMA20 trend cycle
After a signal (or a discarded setup), the indicator locks and waits for a new EMA20 cross
This design prevents repeated or clustered signals
Inputs Explained
Pullback Depth (%)
Defines how deep EMA20 must retrace from its peak before a retest is considered.
Early Retest Ratio
Defines how close EMA20 must return to its previous peak (default: 90%).
These parameters allow users to adapt the indicator to different timeframes or market conditions.
How to Use the Indicator
Indicator A is best used as:
A trend continuation confirmation tool
A confluence layer, combined with:
Higher timeframe analysis
Risk management rules
Personal trading plans
It is not designed to:
Predict market direction
Replace risk management
Act as a standalone trading system
Timeframes & Markets
The indicator can be applied to:
Forex
Crypto
Indices
Stocks
Performance and behavior may vary depending on:
Market volatility
Timeframe
EMA sensitivity
Users are encouraged to observe and test the indicator in their own environment.
Final Notes
This script is intentionally designed to be:
Rule-based
Conservative
Noise-resistant
All logic is deterministic and transparent.
There are no repainting elements.
Always evaluate indicators as part of a broader analytical framework.
Past behavior does not imply future results.
Bear & Bull Builder // visual strategy builderAre you a trend follower?
Trend following systems have been a cornerstone of trading since the first candlestick charts were invented in 18th-century Japan by Munehisa Homma (or Honma), a legendary rice merchant who used them to analyze market sentiment and predict price movements. Since then, legendary traders like Richard Dennis and Dr. David Paul have used technical analysis—the study of turning points and trends of candlestick charts—to develop an edge and strategy for trading equity, commodity, and forex markets.
How to Utilize the Bear & Bull Builder
This script is a way to pick and choose technical methods like SMAs and EMAs to define trend exits and entries. Additionally, you can specify an ATR (Average True Range) calculated stop loss based on your individual strategy and trading plan. Within the settings panel, you can set up this script to display only Long Position values, zones, and levels—or configure it for shorts, or both.
What Makes This Original
Unlike most trend-following indicators that lock you into a single approach, this script lets you combine different indicator types (RSI, WaveTrend, CCI, EMA, SMA) across three separate trend timeframes. The originality comes from the flexibility: you can test whether momentum-based trends (like RSI) work better than moving averages for your timeframe, or experiment with mixing them together. The script also bridges the gap between manual trading and automation by providing visual position values and fill zones that show exactly where signals generate versus where orders execute—critical information most scripts ignore.
Getting Started
For this quick and easy setup example, I built a strategy that is long-only, displays only long positional data and values, and uses a 21 & 55 period exponential moving average for the short and medium-term trend in addition to an 89 period simple moving average for my longer-term outlook. I have set my ATR-based multiplier to 0.75, and have left the fill zone display turned on to help visualize when to set up the built-in alerts for automating my strategy. I have made this the default settings of the script.
Positional Values
GREEN NUMBERS → Entry signal price
YELLOW NUMBERS → Stop loss price
BLUE NUMBERS → Exit signal price
IMPORTANT
I cannot describe how useful it is to use TradingView's built-in Long and Short position tools! The whole reason for this script is that it is as manually friendly as it is automated—especially for backtesting. You can use the long position tool to measure exact profits and losses on individual trades for the strategies you build. This can really help you see clearly if you have built a system with positive expectancy.
Tables
1. Settings Display Table
Displays the trend types that are configurable in the settings panel. Shows if positional values for longs and shorts are currently displayed.
2. Back testing Table
Displays the total amount of long and short entry signals since the first bar of the chart. Additionally, it displays the average amount of bars per trade (time in trade).
Alerts & Automation
There are 4 built-in alerts for automating your strategy to an external server:
1.Long Entries
2.Long Exits
3.Short Entries
4.Short Exits
Since this script uses confirmed bar states for alert generation (to avoid repainting), all alerts and displayed position values (the green, yellow, and blue numbers) will be sent on the closing price. Each alert has a placeholder preset for further customization.
Technical Details
How the trend detection works:
Bullish state triggers when close > all three selected trends
Bearish state triggers when close < all three selected trends
Uses barstate.isconfirmed to prevent repainting
Stop loss calculation:
Long stops: highest_trend - (ATR × multiplier)
Short stops: lowest_trend + (ATR × multiplier)
ATR period is fixed at 20 bars, multiplier is user-adjustable
Entry placement logic:
Long entries execute at the highest value among the three selected trends
Short entries execute at the lowest value among the three selected trends
This ensures entries occur near the support/resistance created by the trend lines
Why calculate all indicators upfront:
The script calculates all five indicator types (EMA, SMA, RSI, CCI, WaveTrend) for all three trend lengths on every bar, then selectively uses the ones you choose in settings. This prevents Pine Script consistency warnings while maintaining flexibility.
Sachin EMA Cloud 10/30 & 200 Low/High 2026)Modified EMA cloud with entry and buy signals. my first script for year 2026
ATR Momentum StatusThis indicator measures whether volatility (ATR) is increasing or decreasing, and classifies momentum strength into four clear states:
- WEAK
- STRONG
- EXPANSION
- DECREASING
It helps traders avoid fake moves and only trade when real participation enters the market, especially when used together with FVG CE Acceptance (SMC).
ATR Momentum States (Very Important)
Status Meaning Market Condition
WEAK Small ATR increase Low participation
STRONG Healthy ATR increase Real buyers/sellers entering
EXPANSION Large ATR spike Aggressive momentum / breakout
DECREASING ATR falling Momentum dying / trap risk
What This Indicator Is NOT
❌ Not a buy/sell signal
❌ Not direction bias
❌ Not entry by itself
👉 It is a trade quality filter
✅ Best Use Case (SMC / FVG Traders)
This indicator shines when combined with:
- FVG
- CE (Consequent Encroachment)
- Liquidity Sweep
- Acceptance Candle
Important Risk Filter (Golden Rule):
ATR Status Trade Quality
EXPANSION + Acceptance ⭐⭐⭐⭐⭐ (Best)
STRONG + Acceptance ⭐⭐⭐⭐
WEAK + Acceptance ❌ Avoid
DECREASING ❌ No Trade
Why This Works (Conceptually):
- FVG CE acceptance = price is accepted
- ATR expansion = participation is real
- Together = institutional momentum, not retail noise
Quantum RCI FusionDescription:
Overview: The Quantum Momentum Engine Quantum RCI Fusion is a sophisticated momentum oscillator designed to solve the #1 problem of classic indicators: false signals in sideways markets. At the core of this script is the Rank Correlation Index (RCI), a powerful statistical tool based on Spearman’s correlation. Unlike RSI or Stochastic which only look at price levels, the RCI evaluates the "quality" of a trend by measuring the temporal correlation of price ranks.
This script is not just a line drawing: it is a complete trading ecosystem that fuses three RCI timeframes, volatility filters, and a real-time Risk Management simulation.
🛠 How It Works: The "Fusion" Logic
The strength of this indicator lies in the synergy between its components. It is not a simple mashup, but a filtered logical system:
Triple RCI Engine (Fast, Mid, Slow):
Fast (13) & Mid (18): These generate the Crossover signal for precise entry timing.
Slow (30) - The "Trend Shield": The true innovation. It acts as a directional shield; if the baseline is bullish, the script protects Long positions by ignoring premature exit signals, allowing you to ride the full trend.
HMA Smoothing: Raw price data passes through a Hull Moving Average before the RCI calculation. This drastically reduces market "noise" without sacrificing the responsiveness typical of the RCI.
Intelligent Filters (Anti-Whipsaw):
ADX Integration: Signals are blocked if the ADX is below the threshold (default 20), preventing trading in flat/ranging markets.
Momentum Impulse: Requires a minimum variation (Delta) in the RCI to confirm that the move has real drive and is not just random fluctuation.
🛡 Risk Management & Simulation
Since timing is useless without risk management, Quantum RCI Fusion includes a Dashboard and sophisticated exit logic:
Multiple Exits:
Take Profit / Stop Loss: Based on dynamic ATR multipliers.
Shield Break: Safety exit if the underlying trend (Slow RCI) changes direction.
Emergency: Immediate close if momentum sharply reverses across the zero line.
Live Dashboard: Monitors Win Rate, virtual PnL, and Trade Status (Long/Short/Scanning) in real-time directly on the chart, removing the need for external backtesters.
🚀 How to Use It
Setup: Add the script to a separate pane below your price chart.
Entry Signals:
LONG (Green Triangle): RCI Fast crosses Mid upwards + Oversold Zone (< -80) + ADX > 20 + Bullish Shield.
SHORT (Red Triangle): RCI Fast crosses Mid downwards + Overbought Zone (> 80) + ADX > 20 + Bearish Shield.
Customization:
Scalping: Reduce RCI lengths (e.g., 8/12/20) and disable the "Trend Shield" for quick entries and exits.
Swing Trading: Keep defaults and use the ATR Trailing logic to manage positions on H4 or Daily timeframes.
⚖️ Notes & Credits
Originality: This script enhances the standard RCI by implementing Array-based calculations (optimized for Pine v6), proprietary HMA smoothing, and unique "Trend Shield" logic.
Open Source: The code is released under the MPL 2.0 license. Credits to the Pine community for the foundational mathematical formulas of Spearman's correlation.
Disclaimer: The statistics shown in the dashboard are simulations based on live data and do not guarantee future profits. You are responsible for your own trading decisions.
🖼 Instructions for the Publication Chart (Preview)
To ensure your script gets approved and attracts users, follow these steps for the cover image:
Symbol: Use a volatile and liquid asset, e.g., BTCUSD or XAUUSD (Gold), on a 1H or 4H timeframe.
Clean Layout: Remove all other indicators from the chart (no Moving Averages on price, no Bollinger Bands). The focus must be solely on your script in the bottom pane.
Visualization:
Ensure the Dashboard (stats table) is clearly visible and does not obscure the most recent candle.
The chart should show at least one clear BUY and one clear SELL signal, ideally with the exit icons (the "X" or flags) visible to demonstrate the exit logic.
My script_DetailedThis is a daily screener for swing trading using the latest screener functionality from trading view. I have been using this for a few months for a fantastic results. I have traded 100 trades with a profit potentiality of 80 percent.
What a way to trade. I use the daily timeframe.
Weekly ATR 8W Contraction (35%)to identify the reduction in average true range of the stock . there by identifying the compression
My scriptThis is a daily screener for swing trading using the latest screener functionality from trading view. I have been using this for a few months for a fantastic results. I have traded 100 trades with a profit potentiality of 80 percent.
What a way to trade. I use the daily timeframe.
ORB with Range Context📌 What This Indicator Does
This indicator plots the Opening Range (OR) — the high and low established during a user-defined session window at market open — and provides context on the range's significance by comparing it to recent volatility.
After the opening range session completes, the indicator displays:
• ORB High and Low as horizontal reference levels
• Optional Midline (often acts as intraday support/resistance)
• Target projections at customizable multiples when breakout occurs
• Range Quality classification (Narrow / Normal / Wide)
🔬 How It Works
Step 1: Opening Range Capture
During the session window (default: 09:15–09:20 IST for Indian markets), the indicator tracks the highest high and lowest low. These become the day's Opening Range boundaries.
Step 2: Range Quality Analysis
This is where this indicator differs from standard ORB tools. It compares today's range to the instrument's Average True Range (ATR) and classifies it:
• NARROW — Range is less than 0.5× ATR
Interpretation: Price compression. The market opened in a tight range relative to recent volatility. Compression often precedes expansion — breakouts from narrow ranges can be more directional.
• NORMAL — Range is between 0.5× and 1.2× ATR
Interpretation: Typical opening behavior. Standard breakout expectations apply.
• WIDE — Range is greater than 1.2× ATR
Interpretation: The market opened with unusual volatility — possibly due to gaps, news events, or overnight developments. Wide ranges may indicate that much of the day's move has already occurred.
Step 3: Breakout Detection
A breakout is confirmed when price closes beyond the ORB High or Low (not just wicks through). The indicator tracks the first breakout direction each day.
Step 4: Target Projection
On confirmed breakout, targets are calculated using the ORB range as the measurement unit:
• Target 1 = Breakout Level ± (Range × 1.0)
• Target 2 = Breakout Level ± (Range × 1.5)
• Target 3 = Breakout Level ± (Range × 2.0)
⚙️ Settings Guide
Opening Range Settings
• ORB Session Window — Time window for capturing the range. Default: 0915-0920 (first 5 min for NSE/BSE) or 0915-10:00(first 45 mins for NSE/BSE. US Markets: 0930-0935 or 0930-0945.
• Show Midline — Toggle the range midpoint display
Target Projection
• Target 1/2/3 (x Range) — Multipliers for profit targets. Default values (1.0, 1.5, 2.0) follow classical ORB methodology.
Range Quality Analysis
• ATR Period — Lookback for ATR calculation (default: 14)
• Narrow Threshold — Ranges below this ATR multiple are classified as narrow (default: 0.5)
• Wide Threshold — Ranges above this ATR multiple are classified as wide (default: 1.2)
📈 How to Use This Indicator
1. Apply to an intraday chart (1-min to 5-min recommended)
2. Wait for the ORB session to complete — levels appear after the time window ends
3. Check Range Quality in the info panel
4. Watch for breakout confirmation — price must close beyond ORB High or Low
5. Use projected targets for trade management
💡 Practical Tips
• Narrow Range Days: Often produce cleaner breakout trades. Tight opening suggests indecision that typically resolves directionally.
• Wide Range Days: If range exceeds 1.5× ATR, consider whether the instrument has already made its daily move.
• Midline Usage: After breakout, the midline often acts as a pullback level for re-entry or confirmation.
📊 Why Range Quality Matters
Most ORB indicators plot static levels without context. A 100-point range on NIFTY might be significant on a quiet day but trivial on a volatile day.
By normalizing against ATR, this indicator answers: "Is today's opening range tight or loose relative to what this instrument normally does?"
This helps traders:
• Calibrate profit expectations
• Assess risk appropriately
• Avoid mechanical trading without market context
🔔 Alerts Available
• ORB Bullish Breakout
• ORB Bearish Breakout
• Target 1 Hit
• Target 2 Hit
⚠️ Notes
• Works on intraday timeframes only
• Best suited for liquid instruments with defined opening sessions
• Range Quality is contextual guidance, not a standalone signal
• Always use appropriate risk management
deKoder | Structural Flow [SF]deKoder | SF | Structural Flow - Swing/Pivot Structure Charting
Strips away the noise of standard candlestick charts and reveals the true underlying swing structure through clean, connected pivot lines.
Beneath the storm of wicks / Silent structure whispers truth
Extreme Noise Reduction
Replaces cluttered price action with a minimalist pivot based line chart. The user-defined Window length lets you control sensitivity: shorter for more detail on lower timeframes, longer for cleaner structure on higher timeframes.
Accurate Swing Detection
Only stronger pivots are accepted. Weaker same side pivots are ignored, preserving the true extreme highs and lows without distortion.
Real Time Extension
The final incomplete leg dynamically follows the current close until the next confirmed pivot forms.
Optional Directional Colouring
Enable Directional Colouring to automatically colour confirmed legs with the user defined bull and bear colours on upward and downward swings.
Adjustable Background Candles
Candles with adjustable transparency may be displayed on the chart. Adjust the visibility setting to find the perfect balance between full raw candle data and clean structure
Practical Uses
Instantly reveals classic chart patterns — head & shoulders, double tops/bottoms, triangles, flags with unmistakable clarity
Becomes simple to spot Wyckoff springs, upthrusts, and phase transitions inside trading ranges
Provides a clean foundation for manual Elliott Wave counting . Clear swing structure makes labeling impulses and corrections much easier
Makes trend changes and potential reversals stand out without second-guessing every wick
Excellent for higher-timeframe structural analysis — the longer window setting produces exceptionally clean swing views
Ideal for creating clean educational screenshots and annotated posts - the chart speaks for itself
Reduces emotional noise by shifting focus from every candle to meaningful swing structure
Well suited for swing and price action traders, Wyckoff and Elliott Wave analysis, and anyone who prefers calm, uncluttered charts over constant visual chaos.
Clean charts. Clear sight.
☠ FR33FA11 | deKoder ☠
Released January 2025 | Open Source
If this open-source script (or any of its free companions) has saved you time or helped you read the market better, a coffee or a few sats helps to keep the Pine coming ❤️
Solana: 2N8HWPAHSC7Z8SLyneMrZp234UAP9HCtQX7wNXw7LKQC
Ethereum: 0xE770D254DC579d1db7bA2fe74376b7009527356B
Bitcoin: bc1qd8j3awht5yrjtnvt5dagxldzhaesc83sftype3
Polygon: 0xE770D254DC579d1db7bA2fe74376b7009527356B
Hype: 0xE770D254DC579d1db7bA2fe74376b7009527356B
LBMA London Gold Fix Times [Auto DST]## Overview
This lightweight indicator automatically marks the **LBMA Gold Price Fixing** times on your chart using vertical lines. It is designed specifically for **XAUUSD (Gold)** traders who need to monitor institutional liquidity and volatility shifts during the London session.
The indicator tracks the two key daily fixing moments:
* **AM Fix:** 10:30 (London Time)
* **PM Fix:** 15:00 (London Time)
## Key Features
* **🌍 Auto Daylight Saving Time (DST):** Built with the `Europe/London` timezone parameter. It automatically adjusts to British Summer Time (BST) and GMT, so you never have to manually change the UTC offset settings.
* **⚡ Minimalist Design:** Draws clean vertical lines without cluttering your chart with text labels.
* **🎨 Fully Customizable:** You can adjust the line color, width, and style (Solid, Dashed, Dotted) for both AM and PM sessions independently.
## Why are these times important?
The London Gold Fix (LBMA Gold Price) is the global benchmark for physical gold settlement. Major institutions, central banks, and mining companies settle contracts at these times. Consequently, **10:30** and **15:00** (London time) often witness:
1. Significant spikes in volatility.
2. Trend reversals or accelerations.
3. Massive volume injection.
## Usage Tips
* **Timeframe:** This indicator works best on **Intraday Timeframes** (1-minute to 30-minute charts).
* *Note:* It may not be visible on H1 (1-hour) charts or higher because the fix times (e.g., 10:30) occur in the middle of an hourly candle.
* **Setup:** Simply add it to your chart. No timezone configuration is required; the script calculates London time internally.
## Settings
* **AM Fix Color:** Default is Blue (London Morning).
* **PM Fix Color:** Default is Red (London Afternoon/US Morning overlap).
* **Line Style:** Choose between Solid, Dashed, or Dotted lines.
概述 (Overview)
这是一个轻量级的辅助指标,通过垂直线在图表上自动标记 LBMA 伦敦金定盘价(LBMA Gold Price Fixing) 的时刻。它是专为 XAUUSD(黄金) 交易者设计的,旨在帮助大家捕捉伦敦时段内机构流动性和市场波动的关键节点。
该指标会自动锁定每天两个核心的定盘时间:
上午定盘 (AM Fix): 10:30 (伦敦时间)
下午定盘 (PM Fix): 15:00 (伦敦时间)
主要功能 (Key Features)
🌍 自动识别夏令时 (Auto DST): 代码内置 Europe/London 时区参数。无论英国处于夏令时 (BST) 还是冬令时 (GMT),指标都会自动精准对齐,无需用户手动调整时区设置。
⚡ 极简主义设计: 仅绘制干净的垂直线,不显示任何文字标签,避免遮挡K线或干扰视线。
🎨 高度可定制: 您可以独立调整上午和下午定盘线的颜色、粗细以及样式(实线、虚线或点线)。
为什么要关注这两个时间点?
LBMA 伦敦金定盘价是全球实物黄金结算的基准价格。大型金融机构、中央银行和金矿公司通常会在这个时间点集中进行合约结算。因此,在伦敦时间 10:30 和 15:00 前后,市场经常会出现:
波动率瞬间激增。
短期趋势的反转或加速。
巨量成交量的涌入。
使用建议 (Usage Tips)
适用周期: 建议在 日内分时图(1分钟、5分钟、15分钟或30分钟)上使用。
注意: 在 1小时 (H1) 或更大的周期上,线条可能无法显示,因为定盘时间(如 10:30)发生在整点K线的内部,无法被单独标记。
设置方法: 加载指标即可使用。无论您本地电脑的时间设置如何,脚本内部会自动计算正确的伦敦时间。
参数设置 (Settings)
AM Fix Color: 上午定盘线颜色(默认为蓝色)。
PM Fix Color: 下午定盘线颜色(默认为红色,此时往往也是美盘初期的波动高峰)。
Line Style: 线条样式选择(实线、虚线、点线)。
ADR% Ext MAThis indicator is designed for aggressive short-term momentum swing traders who want to filter out "dead money" and avoid chasing extended stocks. It helps you objectively measure velocity (ADR%) and risk (Extension from 50MA) to identify the hottest setups before they become overextended.
The core philosophy behind this script is simple:
Velocity: We only want stocks that move fast enough to reward us quickly.
Safety: We want to enter near the "launchpad" (50SMA), not when the move is already stretched.
Timing: We want to ensure the stock hasn't already used up its daily fuel.
Key Features
1. ADR% (Average Daily Range %)
Concept: Measures the velocity of the stock.
Function: Calculates the average daily percentage move over a set period (default 20 days).
Logic: If a stock's ADR is too low (e.g., < 3%), it is considered "dead money" and ignored. The indicator highlights the background in BLUE only when the ADR% meets your minimum threshold.
2. Extension from 50 SMA (measured in ATR)
Concept: Measures how stretched the price is from its trend baseline.
Function: Calculates the distance between the Close and the 50 SMA, expressed as multiples of ATR.
Logic: High momentum plays require a base. If the price is extended more than 4x ATR from the 50 SMA, the risk/reward is skewed (rubber band effect). The blue highlight turns off if the price is too extended.
3. Daily Range Used (Intraday Timing)
Concept: Measures how much of the expected daily move has already happened today.
Function: Compares the current day's range (High - Low) against the ATR.
Display: Used: ATR x 0.50 means the stock has only moved 50% of its average range. If it exceeds 1.0 (100%), the text turns RED, warning you that the move might be exhausted for the day.
Visual Guide
Blue Background Highlight: The "Green Light" zone. It appears only when:
ADR% is high enough (High Momentum).
Price is above 50 SMA (Up Trend).
Price is NOT overextended (Safe Entry Zone).
Dashboard Box (Top Right):
ADR: Shows the raw velocity percentage.
Ext: Shows extension from 50SMA in ATR multiples. (Turns RED if > 4.0).
Used: Shows intraday range consumption. (Turns RED if > 1.0).
MA: Displays the 50 SMA value.
Settings
ADR Length & Threshold: Customize the lookback period and minimum % required (Default: 3%).
Extension Limit: Set the maximum ATR multiple allowed from the 50 SMA (Default: 4x).
Visuals: Customize text size and box position.
Disclaimer: This tool is for educational purposes and trend analysis only. Always manage your risk.
Adaptive Bull Ratio Strategy█ Overview: Why This Strategy
Most option strategies fall into two traps:
They are too rigid: A "Call Ratio Spread" works great in slow markets but gets destroyed if the market rallies hard.
They are too simple: A simple "Buy Call" suffers from time decay (Theta) if the market chops sideways.
The Adaptive Bull Ratio Strategy solves both . It is a living strategy that "shifts gears" based on price action.
It is called "Adaptive" because it morphs its structure three times during a trade. It starts conservative to harvest Time Decay, but if the market explodes upwards, it "uncaps" itself to ride the trend aggressively.
█ The Entry Philosophy: Why Supertrend?
The default setting uses the Supertrend indicator as the trigger. This is intentional:
Volatility Awareness: Supertrend adapts to market noise using ATR. In high volatility, bands widen to prevent false entries.
Trend Confirmation: Since Phase 1 involves selling options, entering "too early" against a falling market is dangerous. Supertrend forces patience, waiting for a confirmed reversal (Close > Trend Line), ensuring the momentum is actually in your favor before you commit capital.
The "Drift" Benefit: This strategy excels in markets that "drift" upwards. Supertrend identifies these trends while filtering out short-term chop.
Flexibility with External Sources:
While Supertrend is the default, the strategy is designed to be flexible. You can enable the 'Enable External Source' option in the settings to plug in any custom indicator (e.g., Moving Averages, Parabolic SAR, or a proprietary trendline).
The Golden Rule for External Sources: The script interprets a Bullish Signal whenever your External Source line is below the Close price (Ext Source < Close).
Compatibility: As long as your custom indicator behaves like a support line in an uptrend (plotting below the candles), it will work seamlessly with this strategy's logic.
█ The "Long Only" Rationale: Avoiding the Volatility Trap
Why not trade this on the short side (Puts) during crashes?
The Volatility Trap (Vega Risk): In Bull markets, Implied Volatility (IV) usually drops, helping your sold options decay faster. In Bear markets, IV explodes (panic). Selling OTM Puts during a crash is dangerous as their value skyrockets, neutralizing gains.
Velocity Risk: Bear markets crash fast ("Elevator Down"). Prices can blow through adjustment levels faster than the strategy can safely roll down, causing slippage.
Structural Skew: OTM Puts are inherently more expensive. Buying expensive ITM Puts and selling expensive OTM Puts shifts the breakeven further away, making V-shape recoveries painful.
█ How It Works & Stands Out
This strategy actively transforms risk profiles based on market movement:
Phase 1: The "Safe" Start (Entry)
Setup: Initiates a Call Ratio Spread (Buy 2 ITM, Sell 4 OTM) + Protective Puts.
Logic: Profits from sideways drift or slow rallies via Time Decay (Theta). The sold options finance the trade.
Phase 2: The "Shift" (Adjustment Level 1)
Trigger: Market moves above Leg 2 (3 OTM Call).
Action: Rolls Up the position. Exits initial legs, enters new higher legs, and adds a Short Put to finance the roll.
Impact: Aggressive. You bet the trend is strong enough to support the added downside risk of the short put.
Phase 3: The "Uncap" (Adjustment Level 2)
Trigger: Market moves above Leg 3 (4 OTM Call).
Action: Exits all Sold Calls.
Impact: Uncaps profit potential. The trade becomes a Net Long position (Long Calls + Short Puts), allowing you to ride a massive rally without a ceiling.
Phase 4: The "Lock-In" (Optional Trail Adjustment)
Trigger: The market goes parabolic (price rises X levels above Leg 3, configurable in settings).
Action (If Enabled):
Call Adj: Exits the Phase 3 calls and buys fresh 1-OTM calls (Rolling Up to lock profits).
Put Adj: Exits all Put legs (Removing downside risk completely).
Impact: Maximum Safety. This phase is about "banking" the windfall from a massive rally and leaving a smaller, risk-free runner to capture any final extension.
█ How to Start: A Quick Setup Guide
Step 1: Map Expiry Dates
Manually input your trading expiry dates in Settings -> Expiry Management.
Format: YYYY-MM-DD (e.g., 2025-12-25). Strict adherence required for DhanHQ.
Step 2: Configure Symbol & Size
Exchange/Symbol: Enter NSE and NIFTY (or your ticker).
Lot Multiplier: Default is 1. Set to 2 to double all quantities (e.g., Buy 2 becomes Buy 4).
Step 3: Understand Visuals
Entry Window (Light Blue): Strategy is scanning for new trades.
Non-Entry Window (Dark Blue): Trading blocked (Day before Expiry & Expiry Day). Only management allowed.
Green Box: Valid Late Entry Zone.
Red Dashed Line: Invalidation Level (if price touches this, no late entry).
Fuchsia Line: Trigger level for Special Trail Adjustments (Phase 4).
IMPORTANT: Broker & Technology Heads-Up:
The alerts generated by this script ({"secret": "...", "alertType": "multi_leg_order"...}) are specifically formatted for the DhanHQ webhook structure.
Dhan Users: Plug-and-play.
Other Brokers: You need middleware (NextLevelBot, Quantiply) to parse the JSON.
█ Risk Disclaimer & Advice
Trading options involves substantial risk.
The Whipsaw Risk: In Phase 2, you are Long Calls and Short Puts. A sharp reversal causes losses on both sides.
Margin: Selling options requires significant margin. Keep a 15-20% cash buffer to handle adjustments instantly.
Testing: This strategy is optimized for NIFTY Weekly Options. Effectiveness on BankNifty or Stocks is untested and may require parameter tuning.
Advice:
Backtest: Use TradingView Replay.
Paper Trade: Run for at least one expiry cycle before live deployment.
Consult: Seek professional financial advice before trading.
Practical Tips for Smooth Execution
For a new trader deploying this system, these operational tips are vital:
Capital Buffer: Do not trade at your limit. Always keep 10-15% free cash in your broker account. Adjustments (specifically Phase 2, where you sell an extra Put) require additional margin instantly. If margin is short, the order fails, and your hedge breaks.
Liquidity Awareness : The script trades "Far Deep OTM" options (Leg 4) to reduce margin. On indices like Nifty/BankNifty, this is fine. On individual stocks, these deep strikes might be illiquid. Check the option chain volume before deploying on stocks.
Trust the Process (but Verify) : While the algo drives, you are the pilot.
Check your API connection every morning.
Ensure the "Entry Window" background color on the chart matches your real-world date.
Verify that your broker executed all legs of a multi-leg order (partial fills are rare but possible).
The "Human" Stop: If major news breaks (e.g., unexpected election results, war announcements), volatility can expand faster than any algo can react. It is acceptable—and smart—to pause the strategy during known "Black Swan" events or earnings releases.
█ Timeframe Selection: The 30-Minute Standard
Critical Requirement: This indicator must be applied to a 30-minute chart.
Why?
Noise Filtering: The Supertrend logic is tuned to capture multi-day trends. Lower timeframes (5m, 15m) are full of "noise"—random fluctuations that look like trend changes but aren't.
Execution Logic (The Hybrid Engine): The script has a built-in "Dual Timeframe" architecture.
Decision Layer (30m): Uses the chart timeframe to decide when to be Bullish or Bearish.
Execution Layer (5m): Internally fetches 5-minute data to manage the how (Adjustments, Late Entries, and precise invalidation).
The Risk of Lower Timeframes: If you run the main chart on 5-minutes, you destroy this hierarchy. You will get too many signals, pay too much brokerage, and the internal logic may behave erratically.
Recommendation: Always keep your TradingView chart interval at 30m. Do not switch to lower timeframes expecting "faster" signals; you will likely just get "false" signals.
█ Testing Scope, Feedback
⚠️ Important Note on Asset Classes:
This strategy logic and the associated strike step calculations have been rigorously tested ONLY on NIFTY Index Options with Weekly Expiry.
BankNifty / Sensex / FinNifty: The volatility characteristics (ATR) and strike intervals of these instruments differ significantly from NIFTY. The effectiveness of this strategy on these other scripts has not been verified and may require different parameter tuning (e.g., strike_step or ATR Length).
Stocks: Individual stock options often lack the liquidity required for the "Deep OTM" legs, leading to potential execution failures.
We encourage traders to backtest this logic on other indices and share their findings! If you find a robust parameter set for BankNifty or observe unique behaviors on other scripts, please let us know in the comments below so we can improve the algorithm for everyone. Your feedback is appriciated.
StrategyMatrixLibLibrary "StrategyMatrixLib"
render_matrix(posStr, digits, bgCol, headBg, headTxt, valCol, valTxt)
Renders a strategy performance matrix (table) using strategy.* and strategy.closedtrades.*
Parameters:
posStr (string) : Table anchor position: "Top Left" | "Top Right" | "Bottom Left" | "Bottom Right"
digits (int) : Decimal places for numeric formatting
bgCol (color) : Background color for non-header cells
headBg (color) : Background for header rows
headTxt (color) : Text color for header rows
valCol (color) : Background for value cells
valTxt (color) : Text color for value cells
Returns: table id The created/updated table ID
STD DEV ZONESA Statistical Road Map for price action. You can see exactly how the price interacts with these historical volatility "speed limits."
1. The "Pivot" (Yellow Level 0)
What you see: The horizontal yellow line marks the start of the session's "value."
The Strategy: This is your anchor. When price is above this, you are in "Long Territory." When price breaks decisively below the yellow line, it signals the shift to "Short Territory."
2. The "Exit Zones" (Teal and Red Shaded Areas)
3. "Zone" vs. "Line"
Notice the shaded transparency around each line. The script is programmed to show a "Volatility Buffer."
The Script (Horizontal Zones): Provides the "Where." It tells you where price is likely to run out of breath (Targets/Exits) and where the trend bias changes (The Pivot).
Supply & Demand (10-MTF) | StableThe Supply & Demand (10-MTF) indicator is a sophisticated technical analysis tool designed to identify high-probability institutional "buy" and "sell" zones across ten different timeframes simultaneously.
Core Functionality
The indicator works by scanning for displacement—sharp, aggressive price movements that leave behind "unfilled orders."
Zone Identification: It identifies a "Base" (the candle before the move) and a "Leg-out" (the momentum candles). If the leg-out meets your momentum strength requirements, a zone is drawn.
Multi-Timeframe Aggregation: Instead of switching between charts, a trader can see 1H Supply, 4H Demand, and Daily Supply zones all layered on a 5-minute chart.
Real-Time Invalidation: The indicator tracks whether price has "mitigated" (broken) a zone. Once a zone is breached by a wick or a close (depending on your settings), it can be hidden or marked as historic.
Why It’s Useful for Traders
1. Confluence Mapping (The "Nest" Strategy)
The most powerful use of this tool is finding Nested Zones. When a 15-minute Demand zone resides inside a 4-hour Demand zone, the probability of a reversal is significantly higher. This indicator makes these high-confluence areas visually obvious.
2. Institutional Footprint Tracking
Institutions do not buy or sell everything at once; they leave footprints in the form of supply and demand imbalances. This tool helps retail traders avoid "buying the top" or "selling the bottom" by showing where the big money actually entered the market.
3. Dynamic Stop Loss & Take Profit
Stop Loss: Traders can place stops just outside the structural boundary of a zone.
Take Profit: Traders can use the opposing HTF (Higher Timeframe) supply zone as a natural target for a long trade.
4. Time Efficiency
Managing 10 timeframes manually is mentally exhausting. This indicator automates the "top-down analysis" process, allowing you to focus on execution rather than chart flipping.
Friendly IT Algo System_2026Friendly IT Algo System V1 is a comprehensive trend-following system that combines SMC (Smart Money Concepts) order blocks with powerful volume filters.
🧠 Key Features:
Smart Trend Signals: EMA 7/20 crossover filtered by market energy.
SMC Order Blocks: Automated key supply/demand zones.
Regular Divergence: RSI-based trend reversal tracking.
Auto Fib & Pivot: Displays 0.618 golden level and pivot S/R.
Sideways Filter: ADX-based gray background to avoid choppy markets.
TIME BOX//@version=5
indicator("Time box", overlay=true)
// 데이터 호출
= request.security(syminfo.tickerid, 'D', [high , low ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '480', [high , low ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '240', [high , low ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, '60', [high , low ], lookahead=barmerge.lookahead_on)
// 중간값 계산
d_mid = (d_high + d_low) / 2
h8_mid = (h8_high + h8_low) / 2
h4_mid = (h4_high + h4_low) / 2
h1_mid = (h1_high + h1_low) / 2
// 사용자 옵션
group_daily = "───── 일봉 설정🕛─────"
show_dbox = input.bool(true, "일봉 박스 보이기", group=group_daily)
dbox_color = input.color(color.new(#f5f0f0, 90), "일봉 박스 배경색", group=group_daily)
dborder_color = input.color(color.rgb(248, 248, 248), "일봉 박스 테두리색", group=group_daily)
show_dmid = input.bool(true, "일봉 중간선 보이기", group=group_daily)
dmid_color = input.color(color.rgb(255, 255, 255), "일봉 중간선 색상", group=group_daily)
group_8h = "───── 8시간봉 설정🕗 ─────"
show_h8box = input.bool(true, "8H 박스 보이기", group=group_8h)
h8box_color = input.color(color.new(#e59696, 95), "8H 박스 배경색", group=group_8h)
h8border_color = input.color(color.rgb(235, 207, 207), "8H 박스 테두리색", group=group_8h)
show_h8mid = input.bool(true, "8H 중간선 보이기", group=group_8h)
h8mid_color = input.color(color.red, "8H 중간선 색상", group=group_8h)
group_4h = "───── 4시간봉 설정🕓 ─────"
show_h4box = input.bool(true, "4H 박스 보이기", group=group_4h)
h4box_color = input.color(color.new(#fac104, 95), "4H 박스 배경색", group=group_4h)
h4border_color = input.color(color.rgb(252, 235, 7), "4H 박스 테두리색", group=group_4h)
show_h4mid = input.bool(true, "4H 중간선 보이기", group=group_4h)
h4mid_color = input.color(color.yellow, "4H 중간선 색상", group=group_4h)
group_1h = "───── 1시간봉 설정🕐─────"
show_h1box = input.bool(true, "1H 박스 보이기", group=group_1h)
h1box_color = input.color(color.new(#fd0303, 95), "1H 박스 배경색", group=group_1h)
h1border_color = input.color(color.rgb(250, 5, 5), "1H 박스 테두리색", group=group_1h)
show_h1mid = input.bool(true, "1H 중간선 보이기", group=group_1h)
h1mid_color = input.color(color.rgb(255, 2, 2, 1), "1H 중간선 색상", group=group_1h)
// 박스 및 선 선언
var box dBox = na, var line dMidLine = na
var box h8Box = na, var line h8MidLine = na
var box h4Box = na, var line h4MidLine = na
var box h1Box = na, var line h1MidLine = na
// 박스 생성함수
f_drawBox(res, high, low, bgcol, bcol) =>
startTime = request.security(syminfo.tickerid, res, time , lookahead=barmerge.lookahead_on)
endTime = request.security(syminfo.tickerid, res, time, lookahead=barmerge.lookahead_on)
box.new(startTime, high, endTime, low, bgcolor=bgcol, border_color=bcol, extend=extend.right, xloc=xloc.bar_time)
// 중간선 생성함수
f_drawMid(res, mid, col) =>
startTime = request.security(syminfo.tickerid, res, time , lookahead=barmerge.lookahead_on)
endTime = request.security(syminfo.tickerid, res, time, lookahead=barmerge.lookahead_on)
line.new(startTime, mid, endTime, mid, color=col, style=line.style_dashed, extend=extend.right, xloc=xloc.bar_time)
// 타임프레임 변경 감지
newDay = ta.change(time('D'))
new8H = ta.change(time('480'))
new4H = ta.change(time('240'))
new1H = ta.change(time('60'))
if newDay
if not na(dBox)
box.delete(dBox)
if not na(dMidLine)
line.delete(dMidLine)
if show_dbox
dBox := f_drawBox('D', d_high, d_low, dbox_color, dborder_color)
if show_dmid
dMidLine := f_drawMid('D', d_mid, dmid_color)
if new8H
if not na(h8Box)
box.delete(h8Box)
if not na(h8MidLine)
line.delete(h8MidLine)
if show_h8box
h8Box := f_drawBox('480', h8_high, h8_low, h8box_color, h8border_color)
if show_h8mid
h8MidLine := f_drawMid('480', h8_mid, h8mid_color)
if new4H
if not na(h4Box)
box.delete(h4Box)
if not na(h4MidLine)
line.delete(h4MidLine)
if show_h4box
h4Box := f_drawBox('240', h4_high, h4_low, h4box_color, h4border_color)
if show_h4mid
h4MidLine := f_drawMid('240', h4_mid, h4mid_color)
if new1H
if not na(h1Box)
box.delete(h1Box)
if not na(h1MidLine)
line.delete(h1MidLine)
if show_h1box
h1Box := f_drawBox('60', h1_high, h1_low, h1box_color, h1border_color)
if show_h1mid
h1MidLine := f_drawMid('60', h1_mid, h1mid_color)
// 타임프레임 라벨 추가 함수 (이전 라벨 자동 삭제 추가)
var label dLabel = na
var label h8Label = na
var label h4Label = na
var label h1Label = na
f_drawLabel(yloc, txt, txt_color) =>
label.new(bar_index, yloc, txt, xloc=xloc.bar_index, color=color.new(color.white, 100), style=label.style_none, textcolor=txt_color, size=size.small)
// 새 박스 생성 시 이전 라벨 삭제 및 현재 박스에만 라벨 표시
if newDay and show_dbox
if not na(dLabel)
label.delete(dLabel)
dLabel := f_drawLabel(d_high, 'Daily', dborder_color)
if new8H and show_h8box
if not na(h8Label)
label.delete(h8Label)
h8Label := f_drawLabel(h8_high, '8H', h8border_color)
if new4H and show_h4box
if not na(h4Label)
label.delete(h4Label)
h4Label := f_drawLabel(h4_high, '4H', h4border_color)
if new1H and show_h1box
if not na(h1Label)
label.delete(h1Label)
h1Label := f_drawLabel(h1_high, '1H', h1border_color)
Momentum Trend & Ignition DashboardDescription
Rationale & Originality Traders often struggle with chart clutter, needing separate indicators for Moving Averages, Volume anomalies, and Fundamental stats (like 52-week highs or Float). This script solves this problem by creating a unified "Momentum Dashboard." It is not just a collection of averages; it is a purpose-built tool for Breakout and Trend Following strategies (such as CAN SLIM or VCP).
The uniqueness of this script lies in its "Confluence Logic": it allows a trader to instantly validate a setup by checking three pillars simultaneously without changing tabs:
Trend: Are the key MAs (20, 50, 100, 200) stacked correctly?
Ignition: Is there a "Power Play" (Big Price Move + Heavy Volume) occurring right now?
Stats: Is the stock near its 52-week high, and does it have a supportive Up/Down Volume Ratio?
How It Works (Detailed Calculations)
1. Custom Trend Ribbon (4x MA Mix):
The script plots 4 independent Moving Averages.
Innovation: Unlike standard inputs, each MA can be individually toggled between SMA (Simple) or EMA (Exponential). This allows traders to mix "Fast" trend lines (e.g., 10 or 20 EMA) with "Slow" institutional lines (e.g., 50 or 200 SMA) in one overlay.
2. "Purple Dot" Ignition Detection:
This features a custom detection algorithm for "Ignition Bars."
Logic: It compares the current candle's Close to the previous Close. If the move exceeds a user-defined threshold (default 5%) AND the Volume exceeds a fixed liquidity threshold (default 500k), a Purple Dot is plotted.
This filters out "low volume drift" and highlights true institutional participation.
3. Relative Volume (RVol) Engine:
Calculates the ratio of Current Volume to the 50-period SMA of Volume.
Visuals: If the ratio exceeds the user threshold (e.g., 1.5x average), the dashboard highlights the data, and optionally the chart bars, alerting the trader to unusual activity.
4. Statistical Dashboard (Data Panel):
Using request.security, the panel fetches daily timeframe data regardless of the chart view.
52-Week & 13-Week H/L: Calculates the percentage distance from these key levels to gauge overhead supply.
U/D Ratio: Calculates the sum of volume on "Up Days" vs. "Down Days" over 50 periods. A value > 1.0 suggests institutional accumulation.
Float %: (Stocks Only) Fetches financial data to show the percentage of shares available for trading.
How to Use This Script
This script is designed for Trend Following and Breakout Trading:
The Setup: Use the Data Panel to find stocks with a U/D Ratio > 1.0 and price within 15% of the 52-Week High.
The Trend: Ensure price is above the MA 2 (set to 50 SMA) and MA 4 (set to 200 SMA) to confirm a Stage 2 uptrend.
The Trigger: Watch for the Purple Dot.
If a Purple Dot appears as price breaks out of a consolidation (base), it confirms institutional buying.
Use the RVol panel to confirm that volume is at least 1.5x normal levels.
Risk Management: Use the MA 1 (set to 20 EMA) as a trailing stop-loss during strong trends.
Settings & Configuration
MAs: Fully adjustable Length and Type (SMA/EMA).
Big Move (Purple Dot): Adjust the % Move based on asset volatility (e.g., use 3% for Large Caps, 10% for Crypto).
Table: The data panel is fully dynamic. You can toggle specific rows (like Float or SMA distance) On/Off to save screen space, and position it anywhere on the chart.
Credits & References
The concept of Relative Volume (RVol) and U/D Ratio is derived from standard Volume Analysis used by William O'Neil.
The "Big Move" combined with Volume thresholds is based on standard Volume Spread Analysis (VSA) concepts regarding "Effort vs. Result."
Financial data fetch (Float) utilizes TradingView's built-in financial() library.






















