Red to Green / Green to Red Tracker# Red to Green / Green to Red Tracker - Quick Reference
## Core Concept
```
PRIOR CLOSE = Yesterday's closing price = The "zero line" for today
Above Prior Close = 🟢 GREEN (profitable for yesterday's buyers)
Below Prior Close = 🔴 RED (losing for yesterday's buyers)
```
---
## The Two Key Moves
### 🟢 Red to Green (R2G)
```
OPEN: Below prior close (RED)
↓
CROSS: Price moves above prior close
↓
RESULT: Now GREEN - Bullish signal
```
**Why it matters:**
- Bears who shorted get squeezed
- Creates FOMO buying
- Momentum often continues
---
### 🔴 Green to Red (G2R)
```
OPEN: Above prior close (GREEN)
↓
CROSS: Price moves below prior close
↓
RESULT: Now RED - Bearish signal
```
**Why it matters:**
- Longs who bought get trapped
- Triggers stop losses
- Panic selling follows
---
## Signals Explained
| Signal | Shape | Location | Meaning |
|--------|-------|----------|---------|
| R2G | ▲ Green Triangle | Below bar | Crossed to green |
| G2R | ▼ Red Triangle | Above bar | Crossed to red |
---
## Level Lines
| Line | Color | Style | What It Is |
|------|-------|-------|------------|
| Prior Close | Orange | Solid | KEY R2G/G2R level |
| Prior High | Green | Dashed | Yesterday's high |
| Prior Low | Red | Dashed | Yesterday's low |
| Today Open | White | Dotted | Gap reference |
---
## Info Table Reference
| Field | What It Shows |
|-------|---------------|
| Status | 🟢 GREEN / 🔴 RED / ⚪ FLAT |
| Day Change | % change from prior close |
| Prior Close | The key level price |
| Distance | How far from prior close |
| Opened | Did today open green or red |
| R2G | R2G status + price if triggered |
| G2R | G2R status + price if triggered |
| Rel Vol | Current relative volume |
| Prior High | Yesterday's high + distance |
| Prior Low | Yesterday's low + distance |
---
## Trading R2G (Long Setup)
### Entry Checklist
- Stock opened RED (below prior close)
- R2G cross signal triggered (green triangle)
- Volume confirmation (1.5x+ preferred, 2x+ ideal)
- Price holding above prior close
- Overall market not tanking
### Entry Method
1. **Aggressive:** Enter immediately on R2G cross
2. **Conservative:** Wait for pullback to prior close (now support)
### Stop Loss
- Below the R2G cross candle low
- OR below prior close (tighter)
### Target
- Prior day high (first target)
- 2:1 risk-reward minimum
---
## Trading G2R (Short Setup)
### Entry Checklist
- Stock opened GREEN (above prior close)
- G2R cross signal triggered (red triangle)
- Volume confirmation
- Price staying below prior close
- Overall market not ripping
### Entry Method
1. **Aggressive:** Enter immediately on G2R cross
2. **Conservative:** Wait for bounce to prior close (now resistance)
### Stop Loss
- Above the G2R cross candle high
- OR above prior close (tighter)
### Target
- Prior day low (first target)
- Gap fill (if gapped up)
---
## Signal Quality
### High Quality R2G ✓
- Opened significantly red (-2% or more)
- Strong volume on cross (2x+)
- First R2G of the day
- Market trending up
- News catalyst present
### Low Quality R2G ✗
- Opened barely red (-0.5%)
- Low volume cross
- Multiple R2G/G2R already today (choppy)
- Fighting market direction
- No clear catalyst
---
## Common Patterns
### Clean R2G (Best)
```
Open red → Steady climb → Cross prior close → Continue higher
```
### Failed R2G (Avoid/Exit)
```
Open red → Cross to green → Immediately fail back to red
```
### Choppy R2G/G2R (Avoid)
```
Multiple crosses back and forth = Indecision, no clear direction
```
---
## First Cross Rule
**The FIRST R2G or G2R of the day is usually the most significant.**
Why?
- Catches traders off guard
- Largest reaction from market
- Sets tone for rest of day
If you miss the first cross, be more selective on subsequent crosses.
---
## Volume Guide
| Rel Volume | Quality | Action |
|------------|---------|--------|
| < 1.0x | Weak | Skip or small size |
| 1.0-1.5x | Average | Standard position |
| 1.5-2.0x | Good | Full position |
| 2.0x+ | Strong | High conviction |
---
## Settings Recommendations
### Default (Balanced)
```
Require Opposite Open: ON
Require Volume: ON (1.5x)
Candle Close Confirm: OFF
Min Cross %: 0
```
### Conservative (Fewer, Better Signals)
```
Require Opposite Open: ON
Require Volume: ON (2.0x)
Candle Close Confirm: ON
Min Cross %: 0.5
```
### Aggressive (More Signals)
```
Require Opposite Open: OFF
Require Volume: OFF
Candle Close Confirm: OFF
Min Cross %: 0
```
---
## Alert Setup
### Essential Alerts
1. **First R2G of Day** - Highest value alert
2. **R2G with Strong Volume** - High conviction
### How to Set
1. Right-click chart → Add Alert
2. Condition: R2G/G2R Tracker
3. Select alert type
4. Set notification method
---
## Combining with Other Indicators
| Indicator | How to Use |
|-----------|------------|
| **Gap & Go** | R2G on gap-down stock = strong reversal |
| **Bull Flag** | Look for bull flag after R2G confirmation |
| **Float Rotation** | R2G + high rotation = explosive potential |
| **VWAP** | R2G above VWAP = strongest setup |
---
## Common Mistakes
❌ **Chasing late R2G**
- If price is already 3-5% green, you missed the move
- Wait for pullback or next setup
❌ **Ignoring volume**
- Low volume R2G often fails
- Always check relative volume
❌ **Fighting the market**
- R2G in a tanking market often fails
- G2R in a ripping market often fails
❌ **No stop loss**
- Failed R2G can reverse hard
- Always have a defined stop
❌ **Overtrading choppy stocks**
- Multiple R2G/G2R = no clear direction
- Skip stocks that keep crossing back and forth
---
## Quick Decision Framework
```
1. Did it open opposite color? (Red for R2G, Green for G2R)
- NO → Lower probability, be cautious
- YES → Continue
2. Is volume confirming? (1.5x+ relative volume)
- NO → Skip or small size
- YES → Continue
3. Is this the first cross of the day?
- YES → Higher probability
- NO → Be more selective
4. Is market direction supportive?
- NO → Skip
- YES → Take the trade
5. Can you define risk? (Clear stop level)
- NO → Skip
- YES → Execute
```
---
## Key Takeaways
1. **Prior close is THE key level** - everyone watches it
2. **First cross matters most** - sets daily tone
3. **Volume confirms** - low volume crosses often fail
4. **Failed crosses reverse hard** - always use stops
5. **Don't overtrade choppy action** - multiple crosses = stay out
---
Happy Trading! 🟢🔴
Search in scripts for "chart"
Bull Flag & Flat Top Breakout DetectorBull Flag & Flat Top Detector - Quick Reference Guide
Pattern Overview
🚩 Bull Flag
╱╲
╱ ╲ ← Pullback (2-5 red candles)
╱ ╲
╱ ╲____
╱ ╲
│ │
│ THE POLE │ ← Strong upward move (3+ green candles)
│ │
└──────────────┘
What to look for:
Strong initial move (the "pole") - 3+ green candles, 3%+ move
Brief pullback - 2-5 candles, less than 50% retracement
Pullback should "drift" lower, not crash
Entry on first candle to make new high after pullback
📊 Flat Top Breakout
════════════════ ← Resistance (multiple touches)
↑ ↑ ↑
╱╲ ╱╲ ╱╲
╱ ╲╱ ╲╱ ╲ ← Consolidation
╱ ╲
╱ ╲
What to look for:
Multiple touches of same resistance level (2+)
Tight consolidation range
Each failed breakout builds pressure
Entry on convincing break above resistance with volume
Signal Types
SignalShapeColorMeaningBull Flag Breakout▲ TriangleLimeEntry signal - go longFlat Top Breakout◆ DiamondAquaEntry signal - go longBear Flag Breakout▼ TriangleRedShort entry (if enabled)Pattern Forming🚩 FlagFaded GreenBull flag developingPattern Forming■ SquareFaded BlueFlat top developing
Level Lines Explained
LineColorStyleMeaningEntryLimeSolidBreakout trigger priceStop LossRedDashedExit if price falls hereTarget 1AquaDottedFirst profit target (2R)Target 2YellowDottedSecond profit target (3R)
Info Table Reference
FieldWhat It ShowsBull FlagScanning / Forming 🚩 / Breakout ✓Flat TopScanning / Forming 📊 / Breakout ✓PullbackCandle count + retracement %Rel VolumeCurrent bar vs averageEMA 20Above ✓ or Below ✗VWAPAbove ✓ or Below ✗Green StreakConsecutive green candles (pole)ResistanceTouch count for flat top
Trading Checklist
Before Entry ✅
Pattern status shows "FORMING" or "BREAKOUT"
Price above EMA (table shows ✓)
Price above VWAP (table shows ✓)
Relative volume 1.5x+ (ideally 2x+)
Stock is in play (up 5%+ on day, has catalyst)
Market direction supportive (not fighting trend)
Entry Execution
Wait for breakout candle to form
Confirm volume spike on breakout
Enter as close to entry line as possible
Set stop loss at red dashed line
Know your target levels
Trade Management
If no immediate follow-through → consider exit ("breakout or bailout")
Take 50% off at Target 1
Move stop to breakeven
Let remainder run toward Target 2
Exit fully if price returns below entry
Bull Flag Quality Checklist
Pole Quality:
FactorIdealAcceptableAvoidGreen candles5+3-4Less than 3Move size10%+3-10%Less than 3%VolumeIncreasingSteadyDecliningCandle bodiesLargeMediumSmall/doji
Pullback Quality:
FactorIdealAcceptableAvoidCandle count2-34-56+RetracementUnder 38%38-50%Over 50%VolumeDecliningSteadyIncreasingCharacterOrderly driftChoppySharp drop
Flat Top Quality Checklist
FactorGood SetupWeak SetupTouches3+ at same levelOnly 2, widely spacedToleranceVery tight (0.2%)Loose (1%+)Duration5-15 barsToo short or too longVolumeDrying upErraticPrior trendUpSideways/down
Common Mistakes to Avoid
❌ Entering too early
Wait for actual breakout, not anticipation
"Forming" ≠ "Breakout"
❌ Ignoring volume
No volume = likely false breakout
Require 1.5x+ relative volume minimum
❌ Fighting the trend
Check EMA and VWAP status
Both should be ✓ for high probability
❌ Wide stops
Stop should be below pullback low
If stop is too wide, skip the trade
❌ Holding losers
"Breakout or bailout" - if it doesn't work, exit
Failed breakouts often reverse hard
❌ Chasing extended moves
If you missed entry, wait for next pattern
Don't chase 5+ candles after breakout
Risk Management Rules
Position Sizing
Risk Amount = Account × Risk % (typically 1-2%)
Position Size = Risk Amount ÷ (Entry - Stop)
Example:
Account: $25,000
Risk: 1% = $250
Entry: $5.00
Stop: $4.70
Risk per share: $0.30
Position Size: $250 ÷ $0.30 = 833 shares
Risk-Reward Targets
TargetR MultipleExample (risk $0.30)Target 12:1+$0.60 ($5.60)Target 23:1+$0.90 ($5.90)
Timeframe Guide
TimeframeProsConsBest For1-minMore patterns, precise entryNoisy, false signalsScalping5-minGood balance, cleaner patternsFewer signalsDay trading15-minHigh quality patternsMiss fast movesSwing entries
Settings Quick Reference
Default Settings (Balanced)
Pole: 3 candles, 3% move
Pullback: 2-5 candles, 50% max retrace
Volume: 1.5x required
Filters: EMA + VWAP ON
Aggressive Settings
Pole: 2 candles, 2% move
Pullback: 2-6 candles, 60% max retrace
Volume: 1.2x required
Filters: VWAP OFF
Conservative Settings
Pole: 4 candles, 5% move
Pullback: 2-4 candles, 40% max retrace
Volume: 2.0x required
Filters: Both ON
Alert Setup
Recommended Alerts
"Bull Flag Forming"
Get early warning as pattern develops
Prepare your position size and levels
"Bull Flag Breakout"
Primary entry alert
React quickly when triggered
"Any Bullish Breakout"
Catch both bull flags and flat tops
Good for watchlist scanning
Alert Setup Steps
Right-click chart → Add Alert
Condition: Select "Bull Flag & Flat Top Breakout Detector"
Choose alert type from dropdown
Set expiration and notification method
Troubleshooting
Q: Patterns not detecting?
Lower the Min Pole Move % setting
Reduce Min Pole Candles requirement
Check that price is in acceptable range
Q: Too many false signals?
Increase volume multiplier to 2.0x
Enable both EMA and VWAP filters
Increase Min Pole Move %
Q: Levels not showing?
Enable "Show Entry Line", "Show Stop Loss", "Show Targets"
Check "Max Patterns to Display" setting
Q: Info table not visible?
Enable "Show Info Table" in settings
Try different table position
Pattern Combinations
Best Setups (A+ Quality)
Bull flag on a gap day (Gap & Go → Bull Flag)
Flat top at pre-market high resistance
Pattern forming above VWAP with 5x+ volume
Avoid These
Bull flag below VWAP
Flat top in downtrending stock
Low volume patterns
Patterns late in the day (after 2pm)
Daily Routine
Pre-Market (7-9am)
Build watchlist of gappers (5%+, high volume)
Apply indicator to top 3-5 candidates
Note pre-market levels
Market Open (9:30-10:30am)
Watch for "FORMING" status on watchlist
Prepare entries as patterns develop
Execute on breakout signals
Manage trades according to plan
Midday (10:30am-2pm)
Look for second-wave patterns
Be more selective (less momentum)
Consider tighter stops
Close (2-4pm)
Generally avoid new patterns
Manage existing positions
Review day's trades
Orderbook Table1. Indicator Name
Orderbook Table
This is an order book style trading volume map
that upgraded the price from my first script to label
2. One-line Introduction
A visual heatmap-style orderbook simulator that displays volume and delta clustering across price levels.
3. Overall Description
Orderbook Table is a powerful visual tool designed to replicate an on-chart approximation of a traditional order book.
It scans historical candles within a specified lookback window and accumulates traded volume into price "bins" or levels.
Each level is color-coded based on total volume and directional bias (delta), offering a layered view of where market interest was concentrated.
The indicator approximates order flow by analyzing each candle's directional volume, separating bullish and bearish volume.
With adjustable parameters such as level depth, price bin density, delta sensitivity, and opacity, it provides a highly customizable visualization.
Displayed directly on the chart, each level shows the volume at that price zone, along with a price label, offset to the right of the current bar.
Traders can use this tool to detect high liquidity zones, support/resistance clusters, and volume imbalances that may precede future price movements.
4. Key Benefits (Title + Description)
✅ On-Chart Volume Heatmap
Shows volume distribution across price levels in real-time directly on the price chart, creating a live “orderbook” view.
✅ Delta-Based Bias Coloring
Color changes based on net buying/selling pressure (delta), making aggressive demand/supply zones easy to spot.
✅ High Customizability
Users can adjust lookback bars, price bins, opacity levels, and delta usage to fit any market condition or asset class.
✅ Lightweight Simulation
Approximates orderbook depth using candle data without needing L2 feed access—works on all assets and timeframes.
✅ Clear Visual Anchoring
Volume quantities and price levels are offset to the right for easy viewing without cluttering the active chart area.
✅ Fast Market Context Recognition
Quickly identify price levels where volume concentrated historically, improving decision-making for entries/exits.
5. Indicator User Guide
📌 Basic Concept
Orderbook Table analyzes a configurable number of past bars and distributes traded volume into price "bins."
Each bin shows how much volume occurred around that price level, optionally adjusted for bullish/bearish candle direction.
⚙️ Settings Overview
Lookback Bars: Number of candles to scan for volume history
Levels (Total): Number of price levels to display around the current price
Price Bins: Granularity of price segmentation for volume distribution
Shift Right: How far to offset labels to the right of the current bar
Max/Min Opacity: Controls visual strength of volume coloring
Use Candle Delta Approx.: If enabled, colors the volume based on candle direction (green for up, red for down)
📈 Example Timing
Look for green clusters (bullish bias) below current price → possible strong demand zones
Price enters a high-volume level with previously aggressive buyers (green), suggesting support
📉 Example Timing
Red clusters (bearish bias) above current price can act as resistance or supply zones
Price stalling at a red-heavy volume band may indicate exhaustion or reversal opportunity
🧪 Recommended Use
Use as a support/resistance mapping tool in ranging and trending markets
Pair with candlestick analysis or momentum indicators for refined entry/exit points
Combine with VWAP or volume profile for multi-dimensional volume insight
🔒 Cautions
This is an approximation, not a true L2 orderbook—volume is based on historical candles, not actual limit order data
In low-volume markets or higher timeframes, bin granularity may be too coarse—adjust "Price Bins" accordingly
Delta calculation is based on open-close direction and does not reflect true buy/sell volume splits
Avoid overinterpreting low-opacity (light color) zones—they may indicate low interest rather than true resistance/support
+++
Directional Positional Option Selling Modelif you want to go dictional selling use it on 1 day or 4 hr chart
RSI Rate of Change (ROC of RSI)The RSI Rate of Change (ROC of RSI) indicator measures the speed and momentum of changes in the RSI, helping traders identify early trend shifts, strength of price moves, and potential reversals before they appear on the standard RSI.
While RSI shows overbought and oversold conditions, the ROC of RSI reveals how fast RSI itself is rising or falling, offering a deeper view of market momentum.
How the Indicator Works
1. RSI Calculation
The indicator first calculates the classic Relative Strength Index (RSI) using the selected length (default 14). This measures the strength of recent price movements.
2. Rate of Change (ROC) of RSI
Next, it computes the Rate of Change (ROC) of the RSI over a user-defined period.
This shows:
Positive ROC → RSI increasing quickly → strong bullish momentum
Negative ROC → RSI decreasing quickly → strong bearish momentum
ROC crossing above/below 0 → potential early trend shift
What You See on the Chart
Blue Line: RSI
Red Line: ROC of RSI
Grey dotted Zero Line: Momentum reference
Why Traders Use It
The RSI ROC helps you:
Detect momentum reversals early
Spot bullish and bearish accelerations not visible on RSI alone
Identify exhaustion points before RSI reaches extremes
Improve entry/exit precision in trend and swing trading
Validate price breakouts or breakdowns with momentum confirmation
Best For
Swing traders
Momentum traders
Reversal traders
Trend-following systems needing early confirmation signals
Structural Liquidity ZonesTitle: Structural Liquidity Zones
Description:
This script is a technical analysis system designed to map market structure (Liquidity) using dynamic, volatility-adjusted zones, while offering an optional Trend Confluence filter to assist with trade timing.
Concept & Originality:
Standard support and resistance indicators often clutter the chart with historical lines that are no longer relevant. This script solves that issue by utilizing Pine Script Arrays and User-Defined Types to manage the "Lifecycle" of a zone. It automatically detects when a structure is broken by price action and removes it from the chart, ensuring traders only see valid, fresh levels.
By combining this structural mapping with an optional EMA Trend Filter, the script serves as a complete "Confluence System," helping traders answer both "Where to trade?" (Structure) and "When to trade?" (Trend).
Key Features:
1. Dynamic Structure (The Array Engine)
Pivot Logic: The script identifies major turning points using a customizable lookback period.
Volatility Zones: Instead of thin lines, zones are projected using the ATR (Average True Range). This creates a "breathing room" for price, visualizing potential invalidation areas.
Active Management: The script maintains a memory of active zones. As new bars form, the zones extend forward. If price closes beyond a zone, the script's garbage collection logic removes the level, keeping the chart clean.
2. Trend Confluence (Optional)
EMA System: Includes a Fast (9) and Slow (21) Exponential Moving Average module.
Signals: Visual Buy/Sell labels appear on crossover events.
Purpose: This allows for "Filter-based Trading." For example, a trader can choose to take a "Buy" bounce from a Support Zone only if the EMA Trend is also bullish.
Settings:
Structure Lookback: Controls the sensitivity of the pivot detection.
Max Active Zones: Limits the number of lines to optimize performance.
ATR Settings: Adjusts the width of the zones based on volatility.
Enable Trend Filter: Toggles the EMA lines and signals on/off.
Usage:
This tool is intended for structural analysis and educational purposes. It visualizes the relationship between price action pivots and momentum trends.
Momentum Grid 2.1 + Top Stocks📊 MOMENTUM GRID 2.1 + TOP STOCKS
Overview
A multi-timeframe confirmation system specifically designed for NIFTY 50 and BANK NIFTY index options trading. This script combines 8 independent technical indicators into a weighted scoring model to generate high-probability CE (Call) and PE (Put) signals, while simultaneously tracking the top 5 constituent stocks for sector-wide momentum validation.
________________________________________
🎯 Core Methodology
1. 8-Factor Confirmation System
Unlike traditional single-indicator approaches, this script requires multiple confirmations before generating signals. Each factor votes independently:
Trend Alignment (3 votes):
• C1: Price above/below EMA 9 (immediate trend)
• C2: EMA 9 above/below EMA 20 (short-term momentum)
• C3: EMA 20 above/below EMA 50 (intermediate trend)
Oscillator Confirmation (3 votes):
• C4: RSI above/below 50 (momentum strength)
• C5: Stochastic K above/below D (entry timing)
• C6: MACD Histogram positive/negative (momentum direction)
Advanced Momentum (2 votes):
• C7: Parabolic SAR position (trend continuation)
• C8: Squeeze Momentum direction (volatility expansion)
Mathematical Logic:
Bullish Score = C1 + C2 + C3 + C4 + C5 + C6 + C7 + C8
Signal Triggered when Score ≥ Threshold (default: 5/8)
Why This Works: By requiring 5+ confirmations, the script filters out false signals that occur when only 1-2 indicators align by chance. This dramatically reduces whipsaws in choppy markets.
________________________________________
📈 Constituent Stock Analysis System
Real-Time Top 5 Stocks Tracking
The script fetches live data from the most heavily-weighted stocks in the selected index:
NIFTY 50 Constituents:
• Reliance Industries
• HDFC Bank
• Infosys
• ICICI Bank
• TCS
BANK NIFTY Constituents:
• HDFC Bank
• ICICI Bank
• Kotak Mahindra Bank
• State Bank of India
• Axis Bank
Stock Scoring Algorithm (0-6 Scale):
For each stock, the script calculates a momentum score based on:
1. Price vs EMA 9 position
2. EMA 9 vs EMA 20 relationship
3. EMA 20 vs EMA 50 hierarchy
4. RSI above/below 50
5. MACD histogram direction
6. Intraday price change direction
Signal Interpretation:
• 🚀🔥 Strong Bullish: Score ≥5 + Day Change >0.5%
• ⚠️❄️ Strong Bearish: Score ≤1 + Day Change <-0.5%
• 📈 Moderate Bullish: Score ≥3 + Positive change
• 📉 Moderate Bearish: Score ≤3 + Negative change
Why Track Constituents?
Index options are a weighted average of their components. When 4 out of 5 top stocks show strong bullish signals but the index signal is neutral, it indicates:
• Sector rotation is happening
• Underlying strength not yet reflected in index
• Early warning for potential index breakout
________________________________________
🎨 Visual Dashboard System
1. Main Momentum Grid (Middle Right)
Real-time status of all 8 confirmation factors:
• Individual indicator values
• Bullish/Bearish status per indicator
• Cumulative Bull Score and Bear Score
• Visual color coding (Green = Bullish, Red = Bearish)
2. Top Stocks Status Panel (Top Right)
Live tracking table showing:
• LTP (Last Traded Price): Current stock price
• Day Change %: Intraday movement from open
• Status: Overall bullish/bearish trend
• EMA Status: Position relative to EMA 9
• Signal Emoji: Visual strength indicator
3. Scenario Guide (Bottom Right)
Auto-calculates trade parameters based on current signal:
• Side: CE (Call) or PE (Put) recommendation
• Strike Reference: Current index price
• Trigger Level: Entry confirmation level (high/low of signal bar)
• Risk Limit: Stop loss using 1.5x ATR
• Price Objective: Target using 2.5x ATR
ATR-Based Risk Management: Average True Range (14-period) adapts stop-loss and targets to current volatility, ensuring consistent risk-reward ratios across different market conditions.
________________________________________
🚨 Signal Generation Logic
CE (Call) Signal Triggers When:
1. Bullish Score ≥ Threshold (5/8 default)
2. Previous bar Bullish Score < Threshold
3. Confirmation candle closes above EMA 9
4. Background turns light green
PE (Put) Signal Triggers When:
1. Bearish Score ≥ Threshold (5/8 default)
2. Previous bar Bearish Score < Threshold
3. Confirmation candle closes below EMA 9
4. Background turns light red
Signal Validation: Labels appear only when a new qualifying bar completes, preventing repainting. The tooltip shows the exact score and entry price for record-keeping.
________________________________________
🔧 Customization Options
Parameter Purpose Recommendation
Index Selection Choose NIFTY 50 or BANK NIFTY Match to your trading instrument
EMA Periods Adjust trend sensitivity Default (9/20/50/100) suits 5-15 min
Signal Threshold Min confirmations required 5/8 (balanced), 6/8 (conservative)
RSI Length Momentum calculation period 14 (standard), 21 (smoother)
MACD Settings Fast/Slow/Signal periods 12/26/9 (industry standard)
________________________________________
📊 Technical Indicator Details
Exponential Moving Averages (EMA)
• Why EMA vs SMA: Exponential weighting gives more importance to recent price action, making it more responsive to trend changes in fast-moving index options.
Relative Strength Index (RSI)
• Measures momentum on 0-100 scale
• 50 level acts as bull/bear dividing line
• Used for confirmation, not overbought/oversold
Stochastic Oscillator
• Compares closing price to recent range
• K line crossing above D line = bullish momentum shift
• Sensitive to short-term reversals
MACD (Moving Average Convergence Divergence)
• Histogram shows momentum acceleration/deceleration
• Positive histogram = increasing bullish momentum
• Used as tiebreaker when other signals conflict
Parabolic SAR
• Tracks stop-and-reverse points
• Dots below price = uptrend, above = downtrend
• Adds trend-following confirmation
Squeeze Momentum
• Identifies periods of low volatility (consolidation)
• Bollinger Bands inside Keltner Channels = "squeeze"
• Positive momentum during squeeze = bullish breakout setup
________________________________________
💡 What Makes This Script Unique
1. Index-Specific Design: Unlike generic multi-timeframe indicators, this is purpose-built for NIFTY/BANKNIFTY options with constituent stock correlation analysis.
2. Multi-Layer Validation: Combines price action (EMAs), momentum (RSI/Stoch/MACD), and volatility (Squeeze) for comprehensive market assessment.
3. Smart Constituent Tracking: Automatically switches stock universe based on selected index, providing sector-level context that single-chart indicators miss.
4. Adaptive Risk Management: ATR-based stop-loss and targets adjust to market volatility automatically, unlike fixed-point systems.
5. No Repainting: All calculations use confirmed bars with lookahead=barmerge.lookahead_off parameter, ensuring historical backtesting accuracy.
________________________________________
📚 Best Practices
Timeframe Selection:
• 5 min: Scalping (high frequency, tight stops)
• 15 min: Intraday swing trades (balanced)
• 1 hour: Positional option trades (overnight holds)
Trade Execution:
1. Wait for CE/PE label to appear
2. Check Top Stocks Status - look for 3+ stocks confirming index direction
3. Verify Scenario Guide shows acceptable risk-reward (min 1:1.5)
4. Enter on next candle open or use trigger level for limit orders
5. Place stop-loss at "Risk Limit" level
6. Scale out at "Price Objective" or trail with Parabolic SAR
False Signal Filters:
• Avoid signals during first 15 minutes of market open (high volatility)
• Skip signals when Top Stocks show conflicting directions (3 bull, 2 bear)
• Increase threshold to 6/8 during major news events
• Disable trading 30 minutes before important announcements
________________________________________
⚠️ Limitations & Considerations
• Index Options Specific: Optimized for NIFTY/BANKNIFTY - may need recalibration for other instruments
• Not Suitable for Trending Markets: Works best in swing/range conditions; reduce threshold in strong trends
• Constituent Data Dependency: Relies on accurate real-time stock data; verify broker data quality
• Options Greeks Ignored: Script doesn't account for theta decay, IV changes - user must manage option selection
________________________________________
🔔 Built-In Alerts
Set alerts for:
• CE Signal Generated: Bullish score crosses threshold
• PE Signal Generated: Bearish score crosses threshold
Alert messages include ticker symbol and entry price for quick execution.
________________________________________
📈 Performance Optimization Tips
1. Score Correlation Check: If Bull Score and Bear Score are both high (6+/8), market is conflicted - wait for resolution.
2. Stock Divergence Strategy: When 4/5 stocks are bullish but index shows PE signal, it often indicates a false breakdown - counter-trend opportunity.
3. Squeeze Breakout Combo: Strongest signals occur when Squeeze changes from "ON" to "OFF" simultaneously with CE/PE trigger.
4. EMA Stacking: Maximum confidence signals have all three EMAs in proper order (9>20>50 for bull, reverse for bear).
________________________________________
🎓 Educational Context
This methodology synthesizes:
• Multi-Timeframe Analysis: EMAs represent different trend horizons
• Oscillator Convergence: Multiple momentum tools reduce false positives
• Index Arbitrage Concepts: Constituent tracking exploits pricing inefficiencies
• Adaptive Volatility: ATR-based risk scales with market conditions
The 8-factor system mirrors institutional decision frameworks where analysts require consensus across multiple models before position changes.
________________________________________
📋 Quick Reference
Bullish Setup Checklist: ✅ Bull Score ≥ 5/8
✅ Green background color
✅ 3+ top stocks showing 📈 or 🚀
✅ Price above EMA 9
✅ MACD Histogram positive
Bearish Setup Checklist: ✅ Bear Score ≥ 5/8
✅ Red background color
✅ 3+ top stocks showing 📉 or ⚠️
✅ Price below EMA 9
✅ MACD Histogram negative
________________________________________
⚖️ Disclaimer
This indicator is a decision support tool, not an automated trading system. Index options involve substantial risk and can result in total loss of premium paid. The constituent stock analysis provides context but does not guarantee index price movement. Users must:
• Understand options Greeks (delta, theta, vega)
• Use proper position sizing (max 2-3% capital per trade)
• Never trade based on signals alone without market context
• Comply with SEBI regulations and broker policies
Past performance of signals does not guarantee future results.
________________________________________
Version: Pine Script v6
Supported Indices: NIFTY 50, BANK NIFTY
Resource Usage: Moderate (Multi-security data requests)
Update Frequency: Real-time on current timeframe
________________________________________
For support or suggestions, please comment below. If this script helps your trading, please like and follow for updates! 🚀📊
Filter Wave1. Indicator Name
Filter Wave
2. One-line Introduction
A visually enhanced trend strength indicator that uses linear regression scoring to render smoothed, color-shifting waves synced to price action.
3. General Overview
Filter Wave+ is a trend analysis tool designed to provide an intuitive and visually dynamic representation of market momentum.
It uses a pairwise comparison algorithm on linear regression values over a lookback period to determine whether price action is consistently moving upward or downward.
The result is a trend score, which is normalized and translated into a color-coded wave that floats above or below the current price. The wave's opacity increases with trend strength, giving a visual cue for confidence in the trend.
The wave itself is not a raw line—it goes through a three-stage smoothing process, producing a natural, flowing curve that is aesthetically aligned with price movement.
This makes it ideal for traders who need a quick visual context before acting on signals from other tools.
While Filter Wave+ does not generate buy/sell signals directly, its secure and efficient design allows it to serve as a high-confidence trend filter in any trading system.
4. Key Advantages
🌊 Smooth, Dynamic Wave Output
3-stage smoothed curves give clean, flowing visual feedback on market conditions.
🎨 Trend Strength Visualized by Color Intensity
Stronger trends appear with more solid coloring, while weak/neutral trends fade visually.
🔍 Quantitative Trend Detection
Linear regression ordering delivers precise, math-based trend scoring for confidence assessment.
📊 Price-Synced Floating Wave
Wave is dynamically positioned based on ATR and price to align naturally with market structure.
🧩 Compatible with Any Strategy
No conflicting signals—Filter Wave+ serves as a directional overlay that enhances clarity.
🔒 Secure Core Logic
Core algorithm is lightweight and secure, with minimal code exposure and strong encapsulation.
📘 Indicator User Guide
📌 Basic Concept
Filter Wave+ calculates trend direction and intensity using linear regression alignment over time.
The resulting wave is rendered as a smoothed curve, colored based on trend direction (green for up, red for down, gray for neutral), and adjusted in transparency to reflect trend strength.
This allows for fast trend interpretation without overwhelming the chart with signals.
⚙️ Settings Explained
Lookback Period: Number of bars used for pairwise regression comparisons (higher = smoother detection)
Range Tolerance (%): Threshold to qualify as an up/down trend (lower = more sensitive)
Regression Source: The price input used in regression calculation (default: close)
Linear Regression Length: The period used for the core regression line
Bull/Bear Color: Customize the color for bullish and bearish waves
📈 Timing Example
Wave color changes to green and becomes more visible (less transparent)
Wave floats above price and aligns with an uptrend
Use as trend confirmation when other signals are present
📉 Timing Example
Wave shifts to red and darkens, floating below the price
Regression direction down; price continues beneath the wave
Acts as bearish confirmation for short trades or risk-off positioning
🧪 Recommended Use Cases
Use as a trend confidence overlay on your existing strategies
Especially useful in swing trading for detecting and confirming dominant market direction
Combine with RSI, MACD, or price action for high-accuracy setups
🔒 Precautions
This is not a signal generator—intended as a trend filter or directional guide
May respond slightly slower in volatile reversals; pair with responsive indicators
Wave position is influenced by ATR and price but does not represent exact entry/exit levels
Parameter optimization is recommended based on asset class and timeframe
FTAP PRO TREND This indicator plots the 20- and 200-period exponential moving averages on the chart with a coloring rule and an entry signal based on the start bar of the FTAP method
Filter Cross1. Indicator Name
Filter Cross Indicator
2. One-line Introduction
A multi-filtered crossover strategy that enhances classic moving average signals with trend, volatility, volume, and momentum confirmation.
3. General Overview
The Filter Cross indicator builds upon the traditional golden/dead cross concept by incorporating additional market filters to evaluate the quality of each signal. It uses two key moving averages (50-period and 200-period SMA) to identify crossovers, while adding four advanced metrics:
Linear regression trend ordering,
ATR-based volatility positioning,
Volume pressure,
Price positioning relative to fast MA.
These components are individually scored and averaged to calculate a Confidence %, which is displayed on the chart alongside each crossover signal. Visual cues such as dynamic color changes reflect the current trend direction and strength, making it intuitive for both novice and experienced traders.
The indicator is especially effective in swing trading and trend-following strategies, where false signals can be filtered out through the additional logic.
Security measures are applied to ensure that the core logic remains protected, making it safe for proprietary use.
4. Key Advantages
✅ Multi-factor Signal Validation
Evaluates each signal using four key market filters to improve reliability over classic crossovers.
📉 Confidence Score Display
Each signal is accompanied by a Confidence % label to help traders assess entry/exit quality.
🎨 Dynamic Color Feedback
Automatically adjusts chart color based on trend intensity and direction, aiding visual clarity.
🔍 Linear Regression Trend Logic
Uses pairwise comparison of regression data to quantify trend alignment across lookback periods.
📈 Reduced False Signals
Minimizes noise and weak signals during sideways markets using adaptive thresholds.
📘 Indicator User Guide
📌 Basic Concept
Filter Cross enhances moving average crossover signals using four additional market-based filters.
These include trend alignment, volatility range, volume strength, and price momentum.
Final signals are graded with a Confidence % score, showing how favorable the conditions are for action.
⚙️ Settings Explained
Fast MA Length: Short-term moving average period (default: 50)
Slow MA Length: Long-term moving average period (default: 200)
Linear Regression Length: Period used to assess price trend alignment
Trend Lookback / Threshold: Sensitivity controls for trend scoring
Volume Lookback / ATR Length: Defines volatility and volume filters
Bull/Bear Color: Customize visual colors for bullish and bearish signals
📈 Buy Timing Example
Golden Cross occurs (50 MA crosses above 200 MA)
Confidence % is above 70%
Trend color turns green, volume is rising, price above fast MA → Strong entry signal
📉 Sell Timing Example
Dead Cross occurs (50 MA crosses below 200 MA)
Confidence % above 60% indicates a reliable bearish setup
Regression trend down, color turns red → Valid exit or short opportunity
🧪 Recommended Use Cases
Combine with RSI or MACD for timing confirmation in swing trades
Use Confidence % to filter out weak crossover signals during sideways trends
Effective in medium-to-long term trading with volatile assets
🔒 Precautions
Confidence % reflects current conditions—not future prediction—use with discretion
May produce delayed signals in ranging markets; test before real application
Best results achieved when combined with other indicators or price action context
Always optimize parameters based on the specific market or asset being traded
+++
Fib+BOS/CHOCH+OB# ⭐ 1) **What This Indicator Does**
The indicator combines 4 major concepts:
### **1️⃣ Market Structure (Swing High/Low)**
* Detects major swing highs and lows using pivot logic
* Determines whether the market is **Bullish** or **Bearish**
### **2️⃣ BOS / CHOCH (Break of Structure / Change of Character)**
* **BOS:** continuation of trend
* **CHOCH:** early signal of trend reversal
* Only the **last 5** levels are displayed → keeps chart clean
### **3️⃣ Order Blocks (OB)**
* Detects last opposite candle before BOS/CHOCH
* Displays only **the latest 3 OB zones**
* Ideal for identifying high-probability pullbacks
Supply and Demand Zones [Clean v6]Supply and Demand Zones
Overview
The Supply and Demand Zones indicator is an automated market structure tool designed to identify high-probability Points of Interest (POI) on any asset or timeframe. Built using Pine Script v6, this script focuses on clarity and performance, providing traders with a clutter-free view of where institutional buying and selling pressure has previously occurred.
Unlike crowded indicators that overwhelm the chart, this script dynamically manages zones—drawing new ones as structure forms and automatically removing invalid zones as price breaks through them.
Key Features
Automated Zone Detection: Automatically identifies Supply (Resistance) and Demand (Support) zones based on Swing Highs and Swing Lows.
Dynamic Zone Management: Active zones extend to the right until price interacts with them.
Break of Structure (BOS) Logic: When price violates a zone (closes beyond the invalidation level), the zone is automatically removed and marked as "Broken" to keep the chart clean.
Zig Zag Structure: Includes an optional Zig Zag overlay to visualize market flow, Higher Highs, and Lower Lows.
ATR-Based Sizing: Zone width is calculated using the Average True Range (ATR), ensuring zones adapt to the asset's current volatility.
Pine Script v6: Optimized using the latest array and method functions for speed and stability.
How It Works
Zone Creation: The script looks for Pivot Highs and Lows based on your defined Swing Length.
Supply Zones (Red): Created at Swing Highs.
Demand Zones (Blue): Created at Swing Lows.
Zone Width: The height of the box is determined by the ATR multiplied by your Zone Width setting. This ensures the zone covers the "wick" area or the volatility range of the pivot.
Invalidation: If the price closes past the outer edge of a zone (the top of a Supply zone or bottom of a Demand zone), the script detects a break, removes the filled box, and leaves a subtle trace of the broken structure.
How to Use
Trend Following: Use the Zig Zag lines to identify the trend direction. Look for Long entries in Demand zones during an uptrend, and Short entries in Supply zones during a downtrend.
Reversals: Watch for price to react at older, unfilled zones (POIs) that align with major support/resistance levels.
Stop Loss Placement: The outer edge of the zone acts as a natural invalidation point. If price closes beyond it, the setup is typically invalidated.
Settings Guide
Swing Length: Determines the sensitivity of the pivot detection. Lower numbers find more local zones (scalping); higher numbers find major structural zones (swing trading).
Max Zones to Keep: Limits the number of historic zones displayed to prevent chart clutter.
Zone Width (ATR): Adjusts how thick the zones are. Increase this value if you want to capture wider wicks.
Visual Settings: Fully customizable colors for Supply, Demand, Borders, and Zig Zag lines.
Disclaimer
This tool is for informational and educational purposes only. It visualizes past price action and does not guarantee future performance. Always manage your risk appropriately.
Swing High-Low Line ConnectorSwing High-Low Line Connector is a simple and intuitive tool that automatically detects swing highs and swing lows using fractal-style pivot logic and connects them with clean, continuous lines. This indicator helps traders visualize market structure, trend shifts, and swing-based support/resistance levels at a glance.
The script identifies each confirmed swing point based on a user-defined lookback window (left/right bars). When a new swing is confirmed, the indicator updates the previous leg or creates a new one, effectively drawing the classic “zigzag-style” connections used in discretionary trading and price-action analysis.
A dynamic tail extension is included to show the most recent swing extending toward the current price. By default, the tail follows a ZigZag-style logic—extending upward after a swing low and downward after a swing high—but users can also anchor it to Close, High, Low, or HL2.
Features
Automatic detection of swing highs and swing lows
Clean line connections between swings (similar to discretionary market-structure mapping)
Proper consolidation handling: weaker highs/lows are ignored
Optional ZigZag-style dynamic tail extension
Fully customizable lookback window, line color, and line width
Works on any market and timeframe
Use Cases
Identifying market structure (HH, HL, LH, LL)
Visualizing trend transitions
Spotting breakout levels and swing-based support/resistance
Aiding discretionary swing trading, trend following, or pattern recognition
This indicator keeps the logic simple and visual—ideal for traders who prefer clean chart structure without unnecessary noise.
HTF Hollow Candle overlayoverlays HTF candle ontop of price so you can watch m1 chart filling up an h4 bar
Steff- OBX- DTA OBX – US Open 15-Minute Zone Indicator
This indicator highlights the first 15 minutes of the U.S. stock market opening, also known as the OBX (Opening Balance Extension).
It is designed specifically for Nasdaq and S&P 500, which open at 09:30 New York time — corresponding to 15:30 Danish time.
What this indicator does:
• Marks the price range from 09:30–09:45 (U.S. time) as a zone on your chart
• Automatically adjusts to your local timezone, so the zone always aligns with Danish time
• Extends the zone to the right so you can track how price interacts with OBX throughout the day
• Draws all historical OBX zones so you can analyze previous reactions
• Rebuilds zones automatically when switching timeframes
• Detects breakouts from the zone
• Tracks balancing time only after a real breakout occurs
• Can automatically remove a zone if price spends a continuous amount of time inside it after the breakout (you set the minutes yourself)
• Allows full customization of OBX start time, duration, and behavior
• Individual zones can be manually deleted without being redrawn by the indicator
Why the OBX matters:
The OBX represents one of the most influential time windows in intraday trading because it reflects:
• The first injection of liquidity after the U.S. market opens
• Institutional positioning and algorithmic adjustments
• Early volatility and directional bias
• Common zones for reversals, breakouts, or mean reversion
• Key high-probability reaction levels used by professional traders
This indicator gives you a clear visual representation of when the market reacts to the U.S. open and how price interacts with the opening range throughout the session.
Turtle System 1 Long & Short (Donchian + N-Stop) + MTF Table V6 Turtle Trading Long & Short (System 1 – 20/10 Donchian + True 2N Trailing Stop) + Multi-Timeframe Dashboard – Pine Script v6This indicator is a 100 % faithful implementation of the famous original Turtle Trading System 1 (Richard Dennis & William Eckhardt) with the following genuine rules:Entry: 20-period Donchian Channel breakout (using the high/low of the previous completed bars only → )
Exit: Classic 10-period Donchian opposite breakout OR hit of the volatility-based stop
Risk Management: True 2N trailing stop (N = 20-period ATR). The stop is pulled tighter on every new favorable extreme (real Turtle trailing – not fixed!)
Fully dynamic position tracking (Long / Short / Flat) on the chart’s timeframe
Visual signals: green/red triangles for entries, diamonds for exits, trailing stop line, entry labels with current N and stop price
Unique Feature – Multi-Timeframe (MTF) Status Table
A clean table in the top-right corner instantly shows the current Turtle position status on five higher timeframes simultaneously:Turtle MTF
1H
4H
8H
1D
1W
Status
LONG / SHORT / FLAT (color-coded)
This allows you to see at a glance whether higher timeframes are already in a Turtle trend – perfect for trend confirmation, filtering, or multi-timeframe trading.Key Visual ElementsLime upper Donchian line (20-period high)
Red lower Donchian line (10-period low)
Gray channel fill
Fuchsia trailing 2N stop line (moves only in favorable direction)
Entry labels showing current N-value and exact stop price
Arrows and diamonds for entries/exits
Alerts
Two ready-to-use alert conditions:“Turtle Long Entry”
“Turtle Short Entry”
Works on any market and any chart timeframe (stocks, forex, futures, crypto).
Completely written and tested in Pine Script version 6.A true, clean, no-nonsense Turtle System 1 with real trailing volatility stops and a powerful higher-timeframe dashboard – exactly how the original Turtles traded (only better visualized)! Enjoy the trends!
920 Order Flow SATY ATR//@version=6
indicator("Order-Flow / Volume Signals (No L2)", overlay=true)
//======================
// Inputs
//======================
rvolLen = input.int(20, "Relative Volume Lookback", minval=5)
rvolMin = input.float(1.1, "Min Relative Volume (× avg)", step=0.1)
wrbLen = input.int(20, "Wide-Range Lookback", minval=5)
wrbMult = input.float(1, "Wide-Range Multiplier", step=0.1)
upperCloseQ = input.float(0.60, "Close near High (0-1)", minval=0.0, maxval=1.0)
lowerCloseQ = input.float(0.40, "Close near Low (0-1)", minval=0.0, maxval=1.0)
cdLen = input.int(25, "Rolling CumDelta Window", minval=5)
useVWAP = input.bool(true, "Use VWAP Bias Filter")
showSignals = input.bool(true, "Show Long/Short OF Triangles")
//======================
// Core helpers
//======================
rng = high - low
tr = ta.tr(true)
avgTR = ta.sma(tr, wrbLen)
wrb = rng > wrbMult * avgTR
// Relative Volume
volAvg = ta.sma(volume, rvolLen)
rvol = volAvg > 0 ? volume / volAvg : 0.0
// Close location in bar (0..1)
clo = rng > 0 ? (close - low) / rng : 0.5
// VWAP (session) + SMAs
vwap = ta.vwap(close)
sma9 = ta.sma(close, 9)
sma20 = ta.sma(close, 20)
sma200= ta.sma(close, 200)
// CumDelta proxy (uptick/downtick signed volume)
tickSign = close > close ? 1.0 : close < close ? -1.0 : 0.0
delta = volume * tickSign
cumDelta = ta.cum(delta)
rollCD = cumDelta - cumDelta
//======================
// Signal conditions
//======================
volActive = rvol >= rvolMin
effortBuy = wrb and clo >= upperCloseQ
effortSell = wrb and clo <= lowerCloseQ
cdUp = ta.crossover(rollCD, 0)
cdDown = ta.crossunder(rollCD, 0)
biasBuy = not useVWAP or close > vwap
biasSell = not useVWAP or close < vwap
longOF = barstate.isconfirmed and volActive and effortBuy and cdUp and biasBuy
shortOF = barstate.isconfirmed and volActive and effortSell and cdDown and biasSell
//======================
// Plot ONLY on price chart
//======================
// SMAs & VWAP
plot(sma9, title="9 SMA", color=color.orange, linewidth=3)
plot(sma20, title="20 SMA", color=color.white, linewidth=3)
plot(sma200, title="200 SMA", color=color.black, linewidth=3)
plot(vwap, title="VWAP", color=color.new(color.aqua, 0), linewidth=3)
// Triangles with const text (no extra pane)
plotshape(showSignals and longOF, title="LONG OF",
style=shape.triangleup, location=location.belowbar, size=size.tiny,
color=color.new(color.green, 0), text="LONG OF")
plotshape(showSignals and shortOF, title="SHORT OF",
style=shape.triangledown, location=location.abovebar, size=size.tiny,
color=color.new(color.red, 0), text="SHORT OF")
// Alerts
alertcondition(longOF, title="LONG OF confirmed", message="LONG OF confirmed")
alertcondition(shortOF, title="SHORT OF confirmed", message="SHORT OF confirmed")
//────────────────────────────
// End-of-line labels (offset to the right)
//────────────────────────────
var label label9 = na
var label label20 = na
var label label200 = na
var label labelVW = na
if barstate.islast
// delete old labels before drawing new ones
label.delete(label9)
label.delete(label20)
label.delete(label200)
label.delete(labelVW)
// how far to move the labels rightward (increase if needed)
offsetBars = input.int(3)
label9 := label.new(bar_index + offsetBars, sma9, "9 SMA", style=label.style_label_left, textcolor=color.white, color=color.new(color.orange, 0))
label20 := label.new(bar_index + offsetBars, sma20, "20 SMA", style=label.style_label_left, textcolor=color.black, color=color.new(color.white, 0))
label200 := label.new(bar_index + offsetBars, sma200, "200 SMA", style=label.style_label_left, textcolor=color.white, color=color.new(color.black, 0))
labelVW := label.new(bar_index + offsetBars, vwap, "VWAP", style=label.style_label_left, textcolor=color.black, color=color.new(color.aqua, 0))
//────────────────────────────────────────────────────────────────────
//────────────────────────────────────────────
// Overnight High/Low + HOD/LOD (no POC)
//────────────────────────────────────────────
sessionRTH = input.session("0930-1600", "RTH Session (exchange tz)")
levelWidth = input.int(2, "HL line width", minval=1, maxval=5)
labelOffsetH = input.int(10, "HL label offset (bars to right)", minval=0)
isRTH = not na(time(timeframe.period, sessionRTH))
rthOpen = isRTH and not isRTH
// --- Track Overnight High/Low during NON-RTH; freeze at RTH open
// --- Track Overnight High/Low during NON-RTH; freeze at RTH open
var float onHigh = na
var float onLow = na
var int onHighBar = na
var int onLowBar = na
var float onHighFix = na
var float onLowFix = na
var int onHighFixBar = na
var int onLowFixBar = na
if not isRTH
if na(onHigh) or high > onHigh
onHigh := high
onHighBar := bar_index
if na(onLow) or low < onLow
onLow := low
onLowBar := bar_index
if rthOpen
onHighFix := onHigh
onLowFix := onLow
onHighFixBar := onHighBar
onLowFixBar := onLowBar
onHigh := na, onLow := na
onHighBar := na, onLowBar := na
// ──────────────────────────────────────────
// Candle coloring + labels for 9/20/VWAP crosses
// ──────────────────────────────────────────
showCrossLabels = input.bool(true, "Show cross labels")
// Helpers
minAll = math.min(math.min(sma9, sma20), vwap)
maxAll = math.max(math.max(sma9, sma20), vwap)
// All three lines
goldenAll = open <= minAll and close >= maxAll
deathAll = open >= maxAll and close <= minAll
// 9/20 only (exclude cases that also crossed VWAP)
dcUpOnly = open <= math.min(sma9, sma20) and close >= math.max(sma9, sma20) and not goldenAll
dcDownOnly = open >= math.max(sma9, sma20) and close <= math.min(sma9, sma20) and not deathAll
// Candle colors (priority: all three > 9/20 only)
var color cCol = na
cCol := goldenAll ? color.yellow : deathAll ? color.black :dcUpOnly ? color.lime :dcDownOnly ? color.red : na
barcolor(cCol)
// Labels
plotshape(showCrossLabels and barstate.isconfirmed and goldenAll, title="GOLDEN CROSS",
style=shape.labelup, location=location.belowbar, text="GOLDEN CROSS",
color=color.new(color.yellow, 0), textcolor=color.black, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and deathAll, title="DEATH CROSS",
style=shape.labeldown, location=location.abovebar, text="DEATH CROSS",
color=color.new(color.black, 0), textcolor=color.white, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and dcUpOnly, title="DC UP",
style=shape.labelup, location=location.belowbar, text="DC UP",
color=color.new(color.lime, 0), textcolor=color.black, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and dcDownOnly, title="DC DOWN",
style=shape.labeldown, location=location.abovebar, text="DC DOWN",
color=color.new(color.red, 0), textcolor=color.white, size=size.tiny)
// ──────────────────────────────────────────
// Audible + alert conditions
// ──────────────────────────────────────────
alertcondition(goldenAll, title="GOLDEN CROSS", message="GOLDEN CROSS detected")
alertcondition(deathAll, title="DEATH CROSS", message="DEATH CROSS detected")
alertcondition(dcUpOnly, title="DC UP", message="Dual Cross UP detected")
alertcondition(dcDownOnly,title="DC DOWN", message="Dual Cross DOWN detected")
Macketings 1min ScalpingThis is a hyper-reactive scalping strategy designed for the 1-minute chart. It utilizes a strict four-EMA hierarchy (80/90/340/500) to ensure trades are only taken in the strongest aligned market trend. The strategy is built to be extremely tight on risk and focuses on capturing the immediate, high-momentum swing that follows a confirmed EMA retest or breakout.
Key Mechanics (How it Works):
Strict Trend Alignment: Entry is only permitted when the faster EMA band (80/90) and the price action are correctly aligned with the slow trend (340/500).
Long: EMA 80/90 must be above EMA 340/500, AND EMA 340 must be above EMA 500. (And vice-versa for Short.)
Expanded Retest Entry: The strategy waits for the price to retest or briefly enter the 80/90 band, then immediately enters upon the confirmed momentum breakout from that band.
Dynamic Risk Management (Tight Ride): The strategy is engineered to ride the wave aggressively while protecting capital immediately:
Extremely Tight Initial Stop Loss (0.2% default): Limits initial risk instantly.
Break-Even Security: Once profit hits 0.3%, the Stop Loss is automatically trailed to secure 0.2% profit (a risk-free trade).
Aggressive Exit Logic: Positions are closed not only upon hitting the Take Profit target (2.5%) but also immediately if the 80/90 EMA band crosses the 340 EMA, signaling a critical loss of momentum.
Disclaimer:
This strategy requires high-liquidity instruments and is best used on low timeframes (1-minute) due to its dependency on fast momentum shifts and tight stops. Backtesting and forward testing are crucial before deployment.
Weekly price boxWeekend Trap / Custom Timebox Analyzer
This indicator allows traders to define a specific time window (e.g., the "Weekend Trap" period from Friday to Sunday, or a full weekly range) and automatically draws a box highlighting the price action during that session. It is designed to help visualize gaps, ranges, and trend direction over specific timeframes.
Key Features
Dynamic Range Detection: automatically draws a box connecting the Highest High and Lowest Low occurring between your start and end times.
Trend Visualization: The box changes color dynamically based on price performance:
Bullish (Blue): Close is higher than the Open of the defined period.
Bearish (Red): Close is lower than the Open of the defined period.
Smart Labeling: Displays a customizable label (default: "Box") along with the real-time Percentage Change of the period. The label is positioned intelligently outside the box to avoid cluttering the price action.
Flexible Timing:
Supports standard intraday sessions (e.g., Mon 09:00 to Mon 17:00).
Supports "wrap-around" sessions (e.g., Friday 23:00 to Sunday 17:00).
New: Supports full-week monitoring (e.g., Friday to Friday) by handling start times that are later than end times on the same day.
Fully Customizable:
Configure specific Bullish and Bearish colors (Border, Background, Text).
Adjust line styles (Solid, Dashed, Dotted) and widths.
Select days via easy-to-use dropdown menus.
How to Use
Time Settings:
Select your Start Day and Time (e.g., Friday 23:00).
Select your End Day and Time (e.g., Sunday 17:00).
Note: Times are based on the Chart/Exchange time.
Visual Settings:
Go to the settings menu to define your preferred colors for Bullish and Bearish scenarios.
Toggle the Label on/off and adjust text size.
Use Cases
Weekend Gaps: Monitor price action that occurs during off-hours or between market close and open.
Opening Range Breakouts: Define the first hour of trading to see the initial range.
Weekly Profiles: Set the start and end day to the same day (e.g., Friday to Friday) to visualize the entire week's range and net performance.
Built with Pine Script™ v6
Forever ModelForever Model is a comprehensive trading framework that visualizes market structure through Fair Value Gaps (FVGs), Smart Money Technique (SMT) divergences, and order block confirmations. The indicator identifies potential price rotations by tracking internal liquidity zones, correlation breaks between assets, and confirmation signals across multiple timeframes.
Designed for clarity and repeatability, the model presents a structured visual logic that supports manual analysis while maintaining flexibility across different assets and timeframes. All components are non-repainting, ensuring historical accuracy and reliable backtesting.
Description
The model operates through a three-part sequence that forms the visual foundation for identifying potential market rotations:
Fair Value Gaps (FVGs)
FVGs are price imbalances detected on higher timeframes—areas where price moved rapidly between candles, leaving an inefficiency that may be revisited. The indicator identifies both bullish and bearish FVGs, displaying them with color-coded levels that extend until mitigated.
: Chart showing FVG detection with colored lines indicating bullish (green) and bearish (red) gaps
Smart Money Technique (SMT)
SMT detects divergence between the current chart asset and a correlated pair. When one asset makes a higher high while the other forms a lower high (or vice versa), it indicates a potential shift in delivery. The indicator draws visual lines connecting these divergence points and can filter SMTs to only display those occurring within FVG ranges.
: Chart showing SMT divergence lines between two correlated assets with labels indicating the pair name]
Order Block Confirmations (OB)
When price confirms a signal by crossing a pivot level, an Order Block is created. The confirmation line extends from the pivot point, labeled as "OB+" for bullish signals or "OB-" for bearish signals. The latest OB extends to the current bar, while previous OBs remain fixed at their confirmation points.
: Chart showing OB confirmation lines with OB+ and OB- labels at confirmation points]
Key Features
Higher Timeframe (HTF) Detection
FVGs are detected on a higher timeframe than the current chart, with automatic HTF selection based on the current timeframe or manual override options. This ensures that internal liquidity zones are identified from the appropriate structural context.
External Range Liquidity (ERL)
Tracks the latest higher timeframe pivot highs and lows, marking external liquidity levels that may be revisited. ERL levels are displayed as horizontal lines with optional labels, providing context for potential continuation targets.
: Chart showing ERL lines at recent HTF pivot points
Signal Creation and Confirmation System
The model creates pending signals when FVG levels are mitigated. Signals confirm when price closes beyond a pivot level, creating the OB confirmation line. Stop levels are automatically calculated from the maximum (bearish) or minimum (bullish) price between signal creation and confirmation.
SMT Filtering Options
Display all SMTs or only those within FVG ranges
Require SMT for signal confirmation (optional filter)
Automatic or manual SMT pair selection
Support for both correlated and inverse correlated pairs
Directional Bias Filter
Filter FVG detection to show only bullish bias, bearish bias, or both. This allows analysts to align with higher timeframe structure or focus on unidirectional setups.
Confirmation Line Management
Toggle to extend only the latest confirmation line or all confirmation lines
Transparent label backgrounds with colored text (red for bearish, green for bullish)
Automatic cleanup of old confirmation lines (keeps last 50)
Labels positioned at line end (latest) or middle (older lines)
Position Sizing Calculator
Optional position sizing based on account balance, risk percentage or fixed amount, and instrument-specific contract sizes. Supports prop firm calculations and can display position size, entry, and stop levels in the dashboard.
Information Dashboard
A customizable floating table displays:
Current timeframe and HTF
Remaining time in current bar
Current bias direction
Latest confirmed signal details (type, size, entry, stop)
Pending signal status
The dashboard can be repositioned, resized, and styled to match your preferences.
Special Range Creation
When signals confirm, the model can automatically create special range levels from stop prices. These levels persist on the chart as important reference points, even after mitigation, serving as potential reversal zones for future signals.
Label and Visualization Controls
Toggle FVG labels on/off
Toggle confirmation lines on/off
Customizable colors for bullish and bearish FVGs
ERL color customization
SMT line width adjustment
Order Flow Integration (Optional)
The indicator includes optional Open Interest (OI) based special range detection, allowing integration with order flow analysis for enhanced context.
Technical Notes
All components are non-repainting—once formed, they remain on the chart
FVGs cannot be mitigated on their creation bar
Signal-based special ranges persist even after mitigation (important stop levels)
SMT detection supports both HTF and chart timeframe modes
Maximum 50 confirmation lines are maintained for performance
The model is designed to work across all asset classes and timeframes, providing a consistent framework for identifying potential market rotations through the interaction of internal liquidity, correlation breaks, and confirmation signals, this does not constitute as trading advice, past performance is no indication of future performance , this is entirely done for entertainment and educational purposes
ITM EMA Scalper (9/15) + Dual Index ConfirmationITM EMA Scalper (9/15) + Dual Index Confirmation is a precision scalping tool designed for traders who want high-probability entries, tight risk, and clean momentum trades using ITM options on NIFTY & BANKNIFTY.
This indicator combines price action, EMA trend filters, momentum candle logic, and a dual-index confirmation system to eliminate fake signals and catch only high-quality moves.
🔥 Core Logic
This indicator uses:
9 EMA & 15 EMA for trend direction
EMA angle filter (≥30°) to ensure strong directional momentum
Momentum candle detection (Pin Bar, Big Body, Rejection Candle)
EMA touch/rejection logic for precision entries
Dual index alignment (NIFTY + BANKNIFTY) for institutional-level confirmation
Trades occur only when both indices agree, dramatically reducing false setups.
🎯 Entry Conditions
A BUY signal appears when:
9 EMA > 15 EMA
Both EMAs have strong upward slope
Momentum candle forms while touching/near EMAs
Candle closes bullish
Confirmation index (e.g., BankNifty) also bullish
A SELL signal is the exact opposite.
🛡 Risk Management Built-In
For every valid setup, the indicator automatically plots:
Entry level (break of candle high/low)
Stop-loss level (low/high of signal candle)
1:2 Risk–Reward Target
These lines extend until target or SL is hit (or are cleared automatically after N bars).
🧠 Why ITM Options?
Using ITM options gives:
Higher delta
Faster momentum capture
Lower time decay impact
Cleaner correlation with spot movement
Perfect for scalping.
📈 Ideal Timeframe
Designed for 5-minute charts
Works for both NIFTY and BANKNIFTY
⚡ Alerts Included
BUY Alert
SELL Alert
These alerts trigger exactly when the strategy identifies a high-probability setup.
🚫 Avoid False Signals
This indicator prevents trades if:
Trend is flat
EMAs lose angle
Opposite index contradicts the setup
Candle lacks momentum
Market is choppy or sideways
💡 Perfect For
Scalpers
Index option traders
ITM directional traders
Algo traders needing clean signal logic
Momentum strategy users
Delta Zones Buy/Sell Pressure UT Plus Delta Zones Buy/Sell Pressure: All-in-One Smart Trading Indicator
💡 Summary: This Indicator is designed as a powerful All-in-One analysis tool, consolidating 4 crucial trading strategies: Delta Zones (Extreme Pressure), Orderblocks & Breaker Blocks (Market Structure), Multi-Indicator Signals (RSI/CCI/Stoch), and UT Bot Alerts (Trend Signals). It provides a comprehensive trading setup on a single chart.
🔎 Key Features:
Delta Zones (Extreme Buy/Sell Pressure): Utilizes Standard Deviation to spot candles with abnormal Buy/Sell Pressure, often indicating institutional activity or stop hunts.
Orderblocks & Breaker Blocks: Automatically analyzes Market Structure Shifts (MSS) to draw Orderblocks and convert them into Breaker Blocks, serving as key support/resistance zones.
Multi-Indicator Signals (RSI/CCI/Stoch): Provides confirmed Buy/Sell signals when RSI, CCI, and Stochastic are in Oversold/Overbought conditions and show reversal action (Users can select the combination).
UT Bot Alerts: Includes a ATR-based Trailing Stop system and secondary Buy/Sell signals for trend confirmation.
🚀 How to Use:
Use the "BUY/SELL" signals from the Multi-Indicator section as the primary trigger.
Use the Delta Zones or Orderblocks/Breaker Blocks as high-confidence confirmation zones for entry/exit, and as precise Stop Loss placement areas.
⚠️ Note on Performance: This Indicator uses complex logic (especially Array and Box drawing functions) and may be resource-intensive on lower timeframes.






















