cd_correlation_analys_Cxcd_correlation_analys_Cx 
 General: 
This indicator is designed for correlation analysis by classifying stocks (487 in total) and indices (14 in total) traded on Borsa İstanbul (BIST) on a sectoral basis.
Tradingview's sector classifications (20) have been strictly adhered to for sector grouping.
Depending on user preference, the analysis can be performed within sectors, between sectors, or manually (single asset).
Let me express my gratitude to the code author, @fikira, beforehand; you will find the reason for my thanks in the context.
 Details: 
First, let's briefly mention how this indicator could have been prepared using the classic method before going into details.
Classically, assets could be divided into groups of forty (40), and the analysis could be performed using the built-in function:
ta.correlation(source1, source2, length) → series float.
I chose sectoral classification because I believe there would be a higher probability of assets moving together, rather than using fixed-number classes.
In this case, 21 arrays were formed with the following number of elements: 
(3, 11, 21, 60, 29, 20, 12, 3, 31, 5, 10, 11, 6, 48, 73, 62, 16, 19, 13, 34 and indices (14)). 
However, you might have noticed that some arrays have more than 40 elements. This is exactly where @Fikira's indicator came to the rescue. When I examined their excellent indicator, I saw that it could process 120 assets in a single operation. (I believe this was the first limit overrun; thanks again.)
It was amazing to see that data for 3 pairs could be called in a single request using a special method.
You can find the details here: 
When I adapted it for BIST, I found it sufficient to call data for 2 pairs instead of 3 in a single go. Since asset prices are regular and have 2 decimal places, I used a fixed multiplier of $10^8$ and a fixed decimal count of 2 in Fikira's formulas.
With this method, the (high, low, open, close) values became accessible for each asset.
The summary up to this point is that instead of the ready-made formula + groups of 40, I used variable-sized groups and the method I will detail now.
Correlation/harmony/co-movement between assets provides advantages to market participants. Coherent assets are expected to rise or fall simultaneously.
Therefore, to convert co-movement into a mathematical value, I defined the possible movements of the current candle relative to the previous candle bar over a certain period (user-defined). These are:
 Up  := high > high  and low > low 
 Down  := high < high  and low < low 
 Inside  := high <= high  and low >= low 
 Outside  := high >= high  and low <= low  and NOT Inside.
 Ignore  := high = low = open = close
If both assets performed the same movement, 1 was added to the tracking counter.
If (Up-Up), (Down-Down), (Inside-Inside), or (Outside-Outside), then counter := counter + 1.
If the period length is 100 and the counter is 75, it means there is 75% co-movement.
Corr = counter / period ($75/100$)
Average = ta.sma(Corr, 100) is obtained.
The highest coefficients recorded in the array are presented to the user in a table.
From the user menu options, the user can choose to compare:
•	With assets in its own sector
•	With assets in the selected sector
•	By activating the confirmation box and manually entering a single asset for comparison.
Table display options can be adjusted from the Settings tab.
  
In the attached examples:
Results for AKBNK stock from the Finance sector compared with GARAN stock from the same sector:
Timeframe: Daily, Period: 50 => Harmony 76% (They performed the same movement in 38 out of 50 bars)
Comment: Opposite movements at swing high and low levels may indicate a change in the direction of the price flow (SMT).
  
Looking at ASELS from the Electronic Technology sector over the last 30 daily candles, they performed the same movements by 40% with XU100, 73.3% (22/30) with XUTEK (Technology Index), and 86.9% according to the averages.
Comment: It is more appropriate to follow ASELS stock with XUTEK (Technology index) instead of the general index (XU100). Opposite movements at swing high and low levels may indicate a change in the direction of the price flow (SMT).
  
Again, when ASELS stock is taken on H1 instead of daily, and the length is 100 instead of 30, the harmony rate is seen to be 87%.
  
Please share your thoughts and criticisms regarding the indicator, which I prepared with a bit of an educational purpose specifically for BIST.
Happy trading.
Cari dalam skrip untuk "欧元汇率走势30天"
Supertrend with Coppock Curve and Dynamic Time WindowOverview
This indicator combines the **Supertrend** trend-following system with the **Coppock Curve** momentum oscillator to generate high-probability buy and sell signals. An additional **dynamic time window filter** ensures trades only occur during your specified trading hours, making it ideal for intraday traders who want to avoid low-liquidity periods.
How It Works
**Signal Generation:**
- **BUY Signal** (Green label below bar): Triggered when the Coppock Curve crosses above zero, the Supertrend confirms an uptrend, and the current time is within your specified trading window
- **SELL Signal** (Purple label above bar): Triggered when the Coppock Curve crosses below zero, the Supertrend confirms a downtrend, and the current time is within your specified trading window
**Triple Confirmation System:**
1. **Coppock Curve** - Identifies momentum shifts using rate-of-change calculations
2. **Supertrend** - Confirms the prevailing trend direction to filter false signals
3. **Time Window** - Ensures trades only occur during high-liquidity hours
 Input Parameters
**Supertrend Settings:**
- **ATR Length** (Default: 19) - Period for calculating the Average True Range
- **Factor** (Default: 3.0) - Multiplier for ATR to determine Supertrend sensitivity
**Time Window Settings (Tehran Time UTC+3:30):**
- **Start Hour/Minute** (Default: 10:30) - Beginning of active trading window
- **End Hour/Minute** (Default: 22:30) - End of active trading window
 Best Practices
- Works best on **trending markets** due to the Supertrend filter
- Recommended timeframes: **15min, 30min, 1H, 4H**
- Lower the Factor value (2.0-2.5) for more signals in volatile markets
- Increase the Factor value (3.5-4.0) for fewer, higher-quality signals in ranging markets
- Adjust the time window to match your market's peak liquidity hours
 Risk Disclaimer
This indicator is for educational purposes only. Always use proper risk management, position sizing, and combine with your own analysis before making trading decisions.
Dual Table Dashboard - Correct V3add RSI Data## 📈 Trading Applications
### 1. Trend Following Strategy
```
1. Check TABLE 1 for trend direction (AnEMA29 + PDMDR)
2. If both green → Look for longs
3. If both red → Look for shorts
4. Use TABLE 2 for entry levels
```
### 2. Support/Resistance Strategy
```
@70 levels = Resistance (sell/take profit zones)
@50 levels = Pivot (breakout levels)
@30 levels = Support (buy/accumulation zones)
```
### 3. Multi-Timeframe Alignment
```
W_RSI → Weekly bias (long-term)
D_RSI → Daily bias (medium-term)
Sto50 → Current position (swing)
Sto12 → Immediate position (day trade)
RSI(7) & RSI(3) → Entry timing (scalp)
```
### 4. Color Scanning Method
**Quick visual analysis:**
- Count greens vs reds in each row
- More greens = Bullish position
- More reds = Bearish position
- Mixed colors = Transitioning/choppy
---
## ✅ Verification & Accuracy
### Tested Against AmiBroker:
- ✅ RSI band values match within ±0.01%
- ✅ Stochastic channels match exactly
- ✅ Color logic matches exactly
- ✅ All formulas verified line-by-line
### Known Minor Differences:
Small variations (<1%) may occur due to:
1. **Platform calculation precision** - Different floating-point engines
2. **Historical data feeds** - Slight variations in past prices
3. **Weekly bar boundaries** - TradingView vs AmiBroker week definitions
4. **Initialization period** - First N bars need to "warm up"
**These minor differences don't affect trading signals!**
---
## ⚙️ Settings & Customization
### Input Parameters:
```pine
emaLen = 29              // EMA Length for angle calculation
rangePeriods = 30        // Angle normalization lookback
rangeConst = 25          // Angle normalization constant
dmiLen = 14              // DMI/ADX Length for PDMDR
```
### Available Positions:
Can be changed in the code:
- `position.top_left`
- `position.top_center`
- `position.top_right`
- `position.middle_left` (Table 2 default)
- `position.middle_center`
- `position.middle_right`
- `position.bottom_left` (Table 1 default)
- `position.bottom_center`
- `position.bottom_right`
### Text Sizes:
- `size.tiny`
- `size.small` (current default)
- `size.normal`
- `size.large`
- `size.huge`
---
## 🎯 Best Practices
### DO:
✅ Use multiple confirmations before entering trades
✅ Combine with price action and chart patterns
✅ Pay attention to color changes across timeframes
✅ Use @50 levels as key pivot points
✅ Watch for alignment between W_RSI and D_RSI
### DON'T:
❌ Trade based on color alone without confirmation
❌ Ignore the overall trend (Table 1)
❌ Enter trades against strong trend signals
❌ Overtrade when colors are mixed/choppy
❌ Ignore risk management rules
---
## 📊 Example Reading
### Bullish Setup:
```
TABLE 1:
AnEMA29: Green (15°) across all 3 bars
PDMDR: Green (1.65) and rising
TABLE 2:
W_RSI@50: Green (price above)
D_RSI@50: Green (price above)
Sto50@50: Green (price above midpoint)
Sto12@50: Green (price above midpoint)
Interpretation: Strong bullish trend confirmed across multiple timeframes
Action: Look for long entries on pullbacks to @50 or @30 levels
```
### Bearish Setup:
```
TABLE 1:
AnEMA29: Red (-12°) across all 3 bars
PDMDR: Red (0.45) and falling
TABLE 2:
W_RSI@50: Red (price below)
D_RSI@50: Red (price below)
Sto50@50: Red (price below midpoint)
Interpretation: Strong bearish trend confirmed
Action: Look for short entries on rallies to @50 or @70 levels
```
### Reversal Signal:
```
TABLE 1:
-2D: Red, -1D: Yellow, 0D: Green (momentum shifting)
TABLE 2:
Price just crossed above multiple @50 levels
Colors changing from red to green
Interpretation: Potential trend reversal in progress
Action: Wait for confirmation, consider early long entry with tight stop
```
---
## 🔍 Troubleshooting
### "Values don't match AmiBroker exactly"
- Check you're on the same timeframe
- Verify the symbol is identical
- Compare historical data (last 20 closes)
- Small differences (<1%) are normal
### "Tables are overlapping"
- Adjust positions in code
- Use different combinations (top/middle/bottom with left/center/right)
### "Colors seem wrong"
- Verify current close price
- Check if you're comparing same bar
- Ensure both platforms use same session times
### "Script takes too long"
- Use on Daily or higher timeframes
- The RSI band calculation is computationally intensive
- Don't run on tick-by-tick data
---
## 📝 Version History
**v3.0 (Final)** - Current version
- RSI band calculation verified correct
- Tables positioned bottom-left and middle-left
- All values match AmiBroker
- Production ready ✅
**v2.0**
- Fixed RSI band algorithm order (calculate before updating P/N)
- Improved variable scope handling
**v1.0**
- Initial implementation
- Had incorrect RSI band calculation
---
## 📄 Files in Package
Hidden Impulse═══════════════════════════════════════════════════════════════════
HIDDEN IMPULSE - Multi-Timeframe Momentum Detection System
═══════════════════════════════════════════════════════════════════
OVERVIEW
Hidden Impulse is an advanced momentum oscillator that combines the Schaff Trend Cycle (STC) and Force Index into a comprehensive multi-timeframe trading system. Unlike standard implementations of these indicators, this script introduces three distinct trading setups with specific entry conditions, multi-timeframe confirmation, and trend filtering.
═══════════════════════════════════════════════════════════════════
ORIGINALITY & KEY FEATURES
This indicator is original in the following ways:
1. DUAL-TIMEFRAME STC ANALYSIS
   Standard STC implementations work on a single timeframe. This script 
   simultaneously analyzes STC on both your trading timeframe and a higher 
   timeframe, providing trend context and filtering out low-probability signals.
2. FORCE INDEX INTEGRATION
   The script combines STC with Force Index (volume-weighted price momentum) 
   to confirm the strength behind price moves. This combination helps identify 
   when momentum shifts are backed by genuine buying/selling pressure.
3. THREE DISTINCT TRADING SETUPS
   Rather than generic overbought/oversold signals, the indicator provides 
   three specific, rule-based setups:
   - Setup A: Classic trend-following entries with multi-timeframe confirmation
   - Setup B: Divergence-based reversal entries (highest probability)
   - Setup C: Mean-reversion bounce trades at extreme levels
4. INTELLIGENT FILTERING
   All signals are filtered through:
   - 50 EMA trend direction (prevents counter-trend trades)
   - Higher timeframe STC alignment (ensures macro trend agreement)
   - Force Index confirmation (validates volume support)
═══════════════════════════════════════════════════════════════════
HOW IT WORKS - TECHNICAL EXPLANATION
SCHAFF TREND CYCLE (STC) CALCULATION:
The STC is a cyclical oscillator that combines MACD concepts with stochastic 
smoothing to create earlier and smoother trend signals.
Step 1: Calculate MACD
   - Fast MA = EMA(close, Length1) — default 23
   - Slow MA = EMA(close, Length2) — default 50
   - MACD Line = Fast MA - Slow MA
Step 2: First Stochastic Smoothing
   - Apply stochastic calculation to MACD
   - Stoch1 = 100 × (MACD - Lowest(MACD, Smoothing)) / (Highest(MACD, Smoothing) - Lowest(MACD, Smoothing))
   - Smooth result with EMA(Stoch1, Smoothing) — default 10
Step 3: Second Stochastic Smoothing
   - Apply stochastic calculation again to the smoothed stochastic
   - This creates the final STC value between 0-100
The dual stochastic smoothing makes STC more responsive than MACD while 
being smoother than traditional stochastics.
FORCE INDEX CALCULATION:
Force Index measures the power behind price movements by incorporating volume:
   Force Raw = (Close - Close ) × Volume
   Force Index = EMA(Force Raw, Period) — default 13
Interpretation:
   - Positive Force Index = Buying pressure (bulls in control)
   - Negative Force Index = Selling pressure (bears in control)
   - Force Index crossing zero = Momentum shift
   - Divergences with price = Weakening momentum (reversal signal)
TREND FILTER:
A 50-period EMA serves as the trend filter:
   - Price above EMA50 = Uptrend → Only LONG signals allowed
   - Price below EMA50 = Downtrend → Only SHORT signals allowed
This prevents counter-trend trading which accounts for most losing trades.
═══════════════════════════════════════════════════════════════════
THE THREE TRADING SETUPS - DETAILED
SETUP A: CLASSIC MOMENTUM ENTRY
Concept: Enter when STC exits oversold/overbought zones with trend confirmation
LONG CONDITIONS:
   1. Higher timeframe STC > 25 (macro trend is up)
   2. Primary timeframe STC crosses above 25 (momentum turning up)
   3. Force Index crosses above 0 OR already positive (volume confirms)
   4. Price above 50 EMA (local trend is up)
SHORT CONDITIONS:
   1. Higher timeframe STC < 75 (macro trend is down)
   2. Primary timeframe STC crosses below 75 (momentum turning down)
   3. Force Index crosses below 0 OR already negative (volume confirms)
   4. Price below 50 EMA (local trend is down)
Best for: Trending markets, continuation trades
Win rate: Moderate (60-65%)
Risk/Reward: 1:2 to 1:3
───────────────────────────────────────────────────────────────────
SETUP B: DIVERGENCE REVERSAL (HIGHEST PROBABILITY)
Concept: Identify exhaustion points where price makes new extremes but 
momentum (Force Index) fails to confirm
BULLISH DIVERGENCE:
   1. Price makes a lower low (LL) over 10 bars
   2. Force Index makes a higher low (HL) — refuses to follow price down
   3. STC is below 25 (oversold condition)
   
   Trigger: STC starts rising AND Force Index crosses above zero
BEARISH DIVERGENCE:
   1. Price makes a higher high (HH) over 10 bars
   2. Force Index makes a lower high (LH) — refuses to follow price up
   3. STC is above 75 (overbought condition)
   
   Trigger: STC starts falling AND Force Index crosses below zero
Why this works: Divergences signal that the current trend is losing steam. 
When volume (Force Index) doesn't confirm new price extremes, a reversal 
is likely.
Best for: Reversal trading, range-bound markets
Win rate: High (70-75%)
Risk/Reward: 1:3 to 1:5
───────────────────────────────────────────────────────────────────
SETUP C: QUICK BOUNCE AT EXTREMES
Concept: Catch rapid mean-reversion moves when price touches EMA50 in 
extreme STC zones
LONG CONDITIONS:
   1. Price touches 50 EMA from above (pullback in uptrend)
   2. STC < 15 (extreme oversold)
   3. Force Index > 0 (buyers stepping in)
SHORT CONDITIONS:
   1. Price touches 50 EMA from below (pullback in downtrend)
   2. STC > 85 (extreme overbought)
   3. Force Index < 0 (sellers stepping in)
Best for: Scalping, quick mean-reversion trades
Win rate: Moderate (55-60%)
Risk/Reward: 1:1 to 1:2
Note: Use tighter stops and quick profit-taking
═══════════════════════════════════════════════════════════════════
HOW TO USE THE INDICATOR
STEP 1: CONFIGURE TIMEFRAMES
Primary Timeframe (STC - Primary Timeframe):
   - Leave empty to use your current chart timeframe
   - This is where you'll take trades
Higher Timeframe (STC - Higher Timeframe):
   - Default: 30 minutes
   - Recommended ratios:
     * 5min chart → 30min higher TF
     * 15min chart → 1H higher TF
     * 1H chart → 4H higher TF
     * Daily chart → Weekly higher TF
───────────────────────────────────────────────────────────────────
STEP 2: ADJUST STC PARAMETERS FOR YOUR MARKET
Default (23/50/10) works well for stocks and forex, but adjust for:
CRYPTO (volatile):
   - Length 1: 15
   - Length 2: 35
   - Smoothing: 8
   (Faster response for rapid price movements)
STOCKS (standard):
   - Length 1: 23
   - Length 2: 50
   - Smoothing: 10
   (Balanced settings)
FOREX MAJORS (slower):
   - Length 1: 30
   - Length 2: 60
   - Smoothing: 12
   (Filters out noise in 24/7 markets)
───────────────────────────────────────────────────────────────────
STEP 3: ENABLE YOUR PREFERRED SETUPS
Toggle setups based on your trading style:
Conservative Trader:
   ✓ Setup B (Divergence) — highest win rate
   ✗ Setup A (Classic) — only in strong trends
   ✗ Setup C (Bounce) — too aggressive
Trend Trader:
   ✓ Setup A (Classic) — primary signals
   ✓ Setup B (Divergence) — for entries on pullbacks
   ✗ Setup C (Bounce) — not suitable for trending
Scalper:
   ✓ Setup C (Bounce) — quick in-and-out
   ✓ Setup B (Divergence) — high probability scalps
   ✗ Setup A (Classic) — too slow
───────────────────────────────────────────────────────────────────
STEP 4: READ THE SIGNALS
ON THE CHART:
   Labels appear when conditions are met:
   
   Green labels:
   - "LONG A" — Setup A long entry
   - "LONG B DIV" — Setup B divergence long (best signal)
   - "LONG C" — Setup C bounce long
   
   Red labels:
   - "SHORT A" — Setup A short entry
   - "SHORT B DIV" — Setup B divergence short (best signal)
   - "SHORT C" — Setup C bounce short
IN THE INDICATOR PANEL (bottom):
   - Blue line = Primary timeframe STC
   - Orange dots = Higher timeframe STC (optional)
   - Green/Red bars = Force Index histogram
   - Dashed lines at 25/75 = Entry/Exit zones
   - Background shading = Oversold (green) / Overbought (red)
INFO TABLE (top-right corner):
   Shows real-time status:
   - STC values for both timeframes
   - Force Index direction
   - Price position vs EMA
   - Current trend direction
   - Active signal type
═══════════════════════════════════════════════════════════════════
TRADING STRATEGY & RISK MANAGEMENT
ENTRY RULES:
Priority ranking (best to worst):
   1st: Setup B (Divergence) — wait for these
   2nd: Setup A (Classic) — in confirmed trends only
   3rd: Setup C (Bounce) — scalping only
Confirmation checklist before entry:
   ☑ Signal label appears on chart
   ☑ TREND in info table matches signal direction
   ☑ Higher timeframe STC aligned (check orange dots or table)
   ☑ Force Index confirming (check histogram color)
───────────────────────────────────────────────────────────────────
STOP LOSS PLACEMENT:
Setup A (Classic):
   - LONG: Below recent swing low
   - SHORT: Above recent swing high
   - Typical: 1-2 ATR distance
Setup B (Divergence):
   - LONG: Below the divergence low
   - SHORT: Above the divergence high
   - Typical: 0.5-1.5 ATR distance
Setup C (Bounce):
   - LONG: 5-10 pips below EMA50
   - SHORT: 5-10 pips above EMA50
   - Typical: 0.3-0.8 ATR distance
───────────────────────────────────────────────────────────────────
TAKE PROFIT TARGETS:
Conservative approach:
   - Exit when STC reaches opposite level
   - LONG: Exit when STC > 75
   - SHORT: Exit when STC < 25
Aggressive approach:
   - Hold until opposite signal appears
   - Trail stop as STC moves in your favor
Partial profits:
   - Take 50% at 1:2 risk/reward
   - Let remaining 50% run to target
───────────────────────────────────────────────────────────────────
WHAT TO AVOID:
❌ Trading Setup A in sideways/choppy markets
   → Wait for clear trend or use Setup B only
❌ Ignoring higher timeframe STC
   → Always check orange dots align with your direction
❌ Taking signals against the major trend
   → If weekly trend is down, be cautious with longs
❌ Overtrading Setup C
   → Maximum 2-3 bounce trades per session
❌ Trading during low volume periods
   → Force Index becomes unreliable
═══════════════════════════════════════════════════════════════════
ALERTS CONFIGURATION
The indicator includes 8 alert types:
Individual setup alerts:
   - "Setup A - LONG" / "Setup A - SHORT"
   - "Setup B - DIV LONG" / "Setup B - DIV SHORT" ⭐ recommended
   - "Setup C - BOUNCE LONG" / "Setup C - BOUNCE SHORT"
Combined alerts:
   - "ANY LONG" — fires on any long signal
   - "ANY SHORT" — fires on any short signal
Recommended alert setup:
   - Create "Setup B - DIV LONG" and "Setup B - DIV SHORT" alerts
   - These are the highest probability signals
   - Set "Once Per Bar Close" to avoid false alerts
═══════════════════════════════════════════════════════════════════
VISUALIZATION SETTINGS
Show Labels on Chart:
   Toggle on/off the signal labels (green/red)
   Disable for cleaner chart once you're familiar with the indicator
Show Higher TF STC:
   Toggle the orange dots showing higher timeframe STC
   Useful for visual confirmation of multi-timeframe alignment
Info Panel:
   Cannot be disabled — always shows current status
   Positioned top-right to avoid chart interference
═══════════════════════════════════════════════════════════════════
EXAMPLE TRADE WALKTHROUGH
SETUP B DIVERGENCE LONG EXAMPLE:
1. Market Context:
   - Price in downtrend, below 50 EMA
   - Multiple lower lows forming
   - STC below 25 (oversold)
2. Divergence Formation:
   - Price makes new low at $45.20
   - Force Index refuses to make new low (higher low forms)
   - This indicates selling pressure weakening
3. Signal Trigger:
   - STC starts turning up
   - Force Index crosses above zero
   - Label appears: "LONG B DIV"
4. Trade Execution:
   - Entry: $45.50 (current price at signal)
   - Stop Loss: $44.80 (below divergence low)
   - Target 1: $47.90 (STC reaches 75) — risk/reward 1:3.4
   - Target 2: Opposite signal or trail stop
5. Trade Management:
   - Price rallies to $47.20
   - STC reaches 68 (approaching target zone)
   - Take 50% profit, move stop to breakeven
   - Exit remaining at $48.10 when STC crosses 75
Result: 3.7R gain
═══════════════════════════════════════════════════════════════════
ADVANCED TIPS
1. MULTI-TIMEFRAME CONFLUENCE
   For highest probability trades, wait for:
   - Primary TF signal
   - Higher TF STC aligned (>25 for longs, <75 for shorts)
   - Even higher TF trend in same direction (manual check)
2. VOLUME CONFIRMATION
   Watch the Force Index histogram:
   - Increasing bar size = Strengthening momentum
   - Decreasing bar size = Weakening momentum
   - Use this to gauge signal strength
3. AVOID THESE MARKET CONDITIONS
   - Major news events (Force Index becomes erratic)
   - Market open first 30 minutes (volatility spikes)
   - Low liquidity instruments (Force Index unreliable)
   - Extreme trending days (wait for pullbacks)
4. COMBINE WITH SUPPORT/RESISTANCE
   Best signals occur near:
   - Key horizontal levels
   - Fibonacci retracements
   - Previous day's high/low
   - Psychological round numbers
5. SESSION AWARENESS
   - Asia session: Use lower timeframes, Setup C works well
   - London session: Setup A and B both effective
   - New York session: All setups work, highest volume
═══════════════════════════════════════════════════════════════════
INDICATOR WINDOWS LAYOUT
MAIN CHART:
   - Price action
   - 50 EMA (green/red)
   - Signal labels
   - Info panel
INDICATOR WINDOW:
   - STC oscillator (blue line, 0-100 scale)
   - Higher TF STC (orange dots, optional)
   - Force Index histogram (green/red bars)
   - Reference levels (25, 50, 75)
   - Background zones (green oversold, red overbought)
═══════════════════════════════════════════════════════════════════
PERFORMANCE OPTIMIZATION
For best results:
Backtesting:
   - Test on your specific instrument and timeframe
   - Adjust STC parameters if win rate < 55%
   - Record which setup works best for your market
Position Sizing:
   - Risk 1-2% per trade
   - Setup B can use 2% risk (higher win rate)
   - Setup C should use 1% risk (lower win rate)
Trade Frequency:
   - Setup B: 2-5 signals per week (be patient)
   - Setup A: 5-10 signals per week
   - Setup C: 10+ signals per week (scalping)
═══════════════════════════════════════════════════════════════════
CREDITS & REFERENCES
This indicator builds upon established technical analysis concepts:
Schaff Trend Cycle:
   - Developed by Doug Schaff (1996)
   - Original concept published in Technical Analysis of Stocks & Commodities
   - Implementation based on standard STC formula
Force Index:
   - Developed by Dr. Alexander Elder
   - Described in "Trading for a Living" (1993)
   - Classic volume-momentum indicator
The multi-timeframe integration, three-setup system, and specific 
entry conditions are original contributions of this indicator.
═══════════════════════════════════════════════════════════════════
DISCLAIMER
This indicator is a technical analysis tool and does not guarantee profits. 
Past performance is not indicative of future results. Always:
   - Use proper risk management
   - Test on demo account first
   - Combine with fundamental analysis
   - Never risk more than you can afford to lose
═══════════════════════════════════════════════════════════════════
SUPPORT & QUESTIONS
If you find this indicator helpful, please:
   - Leave a like and comment
   - Share your feedback and results
   - Report any bugs or issues
For questions about usage or optimization for specific markets, 
feel free to comment below.
═════════════════════════════════════════════════════════════
RSI Breakout Zones█ OVERVIEW
“RSI Breakout Zones” is a technical analysis tool that identifies significant zones on the chart based on the Relative Strength Index (RSI). The indicator maps overbought (OB) and oversold (OS) zones using boxes, then extends them until the next zone of the same type is detected, highlighting breakout points to aid in trade entry decisions. These zones often serve as areas of consolidation, support, or resistance.
█ CONCEPTS
The indicator identifies overbought (above 70) and oversold (below 30) zones, drawing boxes that extend until the next zone of the same type (OB for OB, OS for OS) is detected. Breakout signals are generated when the price crosses the zone boundaries, indicating potential shifts in market momentum.
Why are RSI zones important? These zones represent areas of extreme market sentiment, often leading to corrections or reversals. Overbought zones suggest potential selling pressure, while oversold zones indicate buying opportunities. After a breakout, a zone may switch roles, e.g., from support to resistance or vice versa, making it a key element in price action analysis. Larger zones, formed during high volatility, may attract price for retests due to stronger imbalances in buyer/seller dynamics. Consolidation often occurs within these zones as the market seeks equilibrium before further moves. However, in strong trends, zones may be decisively broken without immediate pullbacks, and their significance depends on their position relative to key support and resistance levels.
█ FEATURES
- RSI Zone Detection: Calculates RSI with a customizable length (default 14) and identifies overbought/oversold zones based on user-defined levels (default 70/30), drawing boxes that dynamically adjust to price action within the zone.
- Customizable Boxes: Zones extend until the next zone of the same type is detected. The indicator draws zones with adjustable colors for overbought (red) and oversold (green) areas, with options for box and zone transparency.
- Breakout Signals: Generates upward (green triangle) and downward (red triangle) breakout signals when the price crosses the top or bottom of a zone. Signals appear below or above the bar, indicating potential trade entry points.
- Midline: Automatically draws a dashed line at the midpoint of each zone, helping traders assess price behavior within the zone and potential halfway retests.
- Box Management: Option to remove outdated boxes.
- Alerts: Built-in support for alerts on breakout signals, enabling traders to receive notifications for key zone crossings.
█ HOW TO USE
Add to Chart: Apply the indicator to your TradingView chart via the Pine Editor or Indicators menu.
Configure Settings:
- RSI Settings: Adjust RSI Length (default 14), Overbought Level (default 70), and Oversold Level (default 30) to tailor zone detection sensitivity—higher lengths smooth signals for longer-term analysis.
- Box Settings: Configure colors and transparency for overbought (red) and oversold (green) zones, including box transparency (default 90) and zone transparency (default 90).
- Signal Settings: Customize breakout signal colors (green for upward, red for downward) and enable/disable keeping boxes after RSI normalization.
Interpreting Signals:
- Upward Breakout Signal: A green triangle below the bar indicates a breakout, suggesting potential bullish momentum and trend continuation or reversal.
- Downward Breakout Signal: A red triangle above the bar indicates a breakout, suggesting potential bearish momentum.
- RSI Zones: If the price re-enters a zone after a breakout, it may signal a false breakout or consolidation; persistent zones can act as future support/resistance levels. Consolidation often occurs within these zones as the market seeks equilibrium.
- Use signals alongside other technical analysis tools for confirmation, such as moving averages (to confirm trend direction), Fibonacci levels (to identify key price zones), or volume indicators (to validate breakout strength). Analyze RSI zones on higher timeframes for stronger signals due to broader market context.
█ APPLICATIONS
- Momentum Trading: Use RSI zones as overbought/oversold filters. In an uptrend, look for buying opportunities on upward breakouts, and in a downtrend, on downward breakouts. Combining with MACD crossovers, Fibonacci levels, or pivot points enhances zone significance.
- Inter-Zone Trading: Utilize breakouts from one RSI zone and hold the position until reaching the next zone, which may act as a target level or reversal point.
█ NOTES
- Test the indicator across different timeframes and markets (stocks, forex, crypto) to optimize RSI length and levels for your trading style.
- For best results, use in trending markets where RSI extremes are more predictive; in ranging markets, additional filters are recommended to reduce false signals.
- Always combine with risk management; RSI zones alone do not guarantee reversals, and false breakouts may occur in low-liquidity environments.
RSI Divergence Strategy v6 What this does
Detects regular and hidden divergences between price and RSI using confirmed RSI pivots. Adds RSI@pivot entry gates, a normalized strength + volume filter, optional volume gate, delayed entries, and transparent risk management with rigid SL and activatable trailing. Visuals are throttled for clarity and include a gap-free horizontal RSI gradient.
How it works (simple)
🧮 RSI is calculated on your selected source/period.
📌 RSI pivots are confirmed with left/right lookbacks (lbL/lbR). A pivot becomes final only after lbR bars; before that, it can move (expected).
🔎 The latest confirmed pivot is compared against the previous confirmed pivot within your bar window:
• Regular Bullish = price lower low + RSI higher low
• Hidden Bullish = price higher low + RSI lower low
• Regular Bearish = price higher high + RSI lower high
• Hidden Bearish = price lower high + RSI higher high
💪 Each divergence gets a strength score that multiplies price % change, RSI change, and a volume ratio (Volume SMA / Baseline Volume SMA).
• Set Min divergence strength to filter tiny/noisy signals.
• Turn on the volume gate to require volume ratio ≥ your threshold (e.g., 1.0).
🎯 RSI@pivot gating:
• Longs only if RSI at the bullish pivot ≤ 30 (default).
• Shorts only if RSI at the bearish pivot ≥ 70 (default).
⏱ Entry timing:
• Immediate: on divergence confirm (delay = 0).
• Delayed: after N bars if RSI is still valid.
• RSI-only mode: ignore divergences; use RSI thresholds only.
🛡 Risk:
• Rigid SL is placed from average entry.
• Trailing activates only after unrealized gain ≥ threshold; it re-anchors on new highs (long) or new lows (short).
What’s NEW here (vs. the reference) — and why you may care
• Improved pivots + bar window → fewer early/misaligned signals; cleaner drawings.
• RSI@pivot gates → entries aligned with true oversold/overbought at the exact decision bar.
• Normalized strength + volume gate → ignore weak or low-volume divergences.
• Delayed entries → require the signal to persist N bars if you want more confirmation.
• Rigid SL + activatable trailing → trailing engages only after a cushion, so it’s less noisy.
• Clutter control + gradient → readable chart with a smooth RSI band look.
Suggested starting values (clear ranges)
• RSI@pivot thresholds: LONG ≤ 30 (oversold), SHORT ≥ 70 (overbought).
• Min divergence strength:
0.0 = off
3–6 = moderate filter
7–12 = strict filter for noisy LTFs
• Volume gate (ratio):
1.0 = at least baseline volume
1.2–1.5 = strong-volume only (fewer but cleaner signals)
• Pivot lookbacks:
lbL 1–2, lbR 3–4 (raise lbR to confirm later and reduce noise)
• Bar window (between pivots):
Min 5–10, Max 30–60 (increase Min if you see micro-pivots; increase Max for wider structures)
• Risk:
Rigid SL 2–5% on liquid majors; 5–10% on higher-volatility symbols
Trailing activation 1–3%, trailing 0.5–1.5% are common intraday starts
Plain-text examples
• BTCUSDT 1h → RSI 9, lbL 1, lbR 3, Min strength 5.0, Volume gate 1.0, SL 4.5%, Trail on 2.0%, Trail 1.0%.
• SPY 15m → RSI 8, lbL 1, lbR 3, Min strength 7.0, Volume gate 1.2, SL 3.0%, Trail on 1.5%, Trail 0.8%.
• EURUSD 4h → RSI 14, lbL 2, lbR 4, Min strength 4.0, Volume gate 1.0, SL 2.5%, Trail on 1.0%, Trail 0.5%.
Notes & limitations
• Pivot confirmation means the newest candidate pivot can move until lbR confirms it (expected).
• Results vary by timeframe/symbol/settings; always forward-test.
• Educational tool — no performance or profit claims.
Credits
• RSI by J. Welles Wilder Jr. (1978).
• Reference divergence script by eemani123: 
• This version by tagstrading 2025 adds: improved pivot engine, RSI@pivot gating, normalized strength + optional volume gate, delayed entries, rigid SL and activatable trailing, and a gap-free RSI gradient.
LANZ Origins🔷 LANZ Origins – Multi-Framework Liquidity, Structure & Risk Management Overlay 
LANZ Origins is an advanced multi-framework visualization toolkit that unifies key institutional concepts into one efficient interface. Designed for professional traders, it merges session mapping, liquidity analysis, imbalance detection, multi-account risk control, and higher-timeframe candle tracing — all in a single overlay.
 🧩 Core Components 
 
 🈵 Asian Range Liquidity
 
Automatically detects and projects the Asian session range (19:00–02:00 NY) with an optional mid-price line (50 %). This provides visual context for intraday liquidity and manipulation zones commonly referenced in ICT-style analysis.
 
 📊 Imbalance Detector
 
Highlights Fair Value Gaps (FVG), Opening Gaps (OG), and Volume Imbalances (VI) directly on-chart, using separate color schemes for bullish and bearish inefficiencies. Each element can be customized by width, ATR filter, and extension length.
 
 🕯️ Higher-Timeframe Candles (ICT Style)
 
Displays multi-timeframe candles (HTF1–HTF6) simultaneously — e.g., 5 m, 30 m, 1 h, 4 h, 1 D, 1 W — each rendered with independent wick, border, and fill settings. Includes remaining-time counters, timeframe labels, and optional imbalance shading between bodies.
 
 📈 Market Structure (ZigZag 30 m)
 
Replicates 30-minute swing structure to all active timeframes, producing dynamic pivots with live extension. Ideal for contextualizing BOS/CHoCH events across multiple scales.
 
 💸 Multi-Account Lot Size Panel
 
Calculates position size for up to five accounts simultaneously, using your defined capital, risk %, and fixed SL distance (in pips). Results appear in a clean table at the bottom-right corner of the chart.
 
 🎨 Session Visualization
 
Colored backgrounds mark key trading phases:
🟢 Day division
🔴 No-action zone
🔵 Kill-zone
🟡 Hold session
 ⚙️ Customization & Performance 
Every module can be toggled individually, with full color, opacity, and style control. The script is optimized for overlay use and supports up to 500 boxes, lines, and labels with efficient resource handling.
 🧠 Best Use Case 
 LANZ Origins is ideal for traders who follow: 
 
 Smart Money Concepts / ICT methodology
 Liquidity & Imbalance-based trading
 Multi-timeframe confluence setups
 Risk-based position sizing workflows
 
 Use it to observe how price interacts with liquidity pools, higher-timeframe candles, and imbalances within key sessions — while monitoring lot size risk in real time. 
📌 Recommended Setup
 
 Timeframes: 30m - 5m – 3m
 Pairs: FX
 Session Timezone: New York (EST/EDT)
 Combine with: LANZ Strategy series for execution and journaling
 
 💬 Note 
 This indicator does not generate buy/sell signals. It’s a visual and analytical tool built to support your own decision-making process.
4h 相对超跌筛选器 · Webhook v2.0## 指标用途
用于你的「框架第2步」:在**美股 RTH**里,按**4h 收盘**(06:30–10:30 PT 为首根)筛出相对大盘/行业**显著超跌**且结构健康的候选标的,并可**通过 Webhook 自动推送**`symbol + ts`给下游 AI 执行新闻甄别(第3步)与进出场评估(第4步)。
## 工作原理(核心逻辑)
* **结构健康**:最近 80 根 4h 中,收盘 > 4h_SMA50 的占比 ≥ 阈值(默认 55%)。
* **跌深条件**:4h 跌幅 ≤ −4%,且近两根累计(≈8h)≤ −6%。
* **相对劣化**:相对大盘(SPY/QQQ)与相对行业(XLK/XLF/… 或 KWEB/CQQQ)各 ≤ −3%。
* **流动性与价格**:ADV20_USD ≥ 2000 万;价格 ≥ 3 美元。
* **只在 4h 收盘刻评估与触发**,历史点位全部保留,便于回放核验。
* **冷却**:同一标的信号间隔 ≥ N 天(默认 10)。
## 主要输入参数
* **bench / sector**:大盘与行业基准(例:SPY/QQQ,XLK/XLF/XLY;中概用 KWEB/CQQQ)。
* **advMinUSD / priceMin**:20 日美元成交额下限、最小价格。
* **pctAboveTh**:结构健康阈值(%)。
* **drop4hTh / drop8hTh**:4h/8h 跌幅阈值(%)。
* **relMktTh / relSecTh**:相对大盘/行业阈值(%)。
* **coolDays**:冷却天数。
* **fromDate**:仅显示此日期后的历史信号(图表拥挤时可用)。
* **showTable / tableRows**:是否显示右上角“最近信号表”及行数。
## 图表信号
* **S2 绿点**:当根 4h 收盘满足全部筛选条件。
* **右上角表格**:滚动列出最近 N 条命中(`SYMBOL @ yyyy-MM-dd HH:mm`,按图表本地时区)。
## Webhook 联动(生产用)
1. 添加指标 → 🔔 新建警报(Alert):
   * **Condition**:`Any alert() function call`
   * **Options**:`Once per bar close`
   * **Webhook URL**:填你的接收地址(可带 `?token=...`)
   * **Message**:留空(脚本内部 `alert(payload)` 会发送 JSON)。
2. 典型 JSON 载荷(举例):
```json
{
  "event": "step2_signal",
  "symbol": "LULU",
  "symbol_id": "NASDAQ:LULU",
  "venue": "NASDAQ",
  "bench": "SPY",
  "sector": "XLY",
  "ts_bar_close_ms": 1754524200000,
  "ts_bar_close_local": "2025-06-06 10:30",
  "price_close": 318.42,
  "ret_4h_pct": -5.30,
  "ret_8h_pct": -7.45,
  "rel_mkt_pct": -4.90,
  "rel_sec_pct": -3.80
}
```
> 建议以 `symbol + ts_bar_close_ms` 做去重键;接收端先快速 `200 OK`,后续异步处理并交给第3步 AI。
## 使用建议
* **时间框架**:任意周期可用,指标内部统一拉取 240 分钟数据并仅在 4h 收盘刻触发。
* **行业映射**:尽量选与个股业务最贴近的 ETF;中国 ADR 可用 `PGJ/KWEB/CQQQ` 叠加细分行业对照。
* **回放验证**:Bar Replay **不发送真实 Webhook**;仅用于查看历史命中与表格。测试接收端请用 Alert 面板的 **Test**。
## 适配说明
* Pine Script **v5**。
* 不含成分筛查逻辑(请在你的 500–600 只候选池内使用)。
* 数字常量不使用下划线分隔;如需大数可用 `20000000` 或 `2e7`。
## 常见问题
* ⛔️ 报错 `tostring(...)`:Pine 无时间格式化重载,脚本已内置 `timeToStr()`。
* ⛔️ `syminfo.exchange` 不存在:已改用 `syminfo.prefix`(交易所前缀)。
* ⛔️ 多行字符串拼接报 `line continuation`:本脚本已用括号包裹或 `str.format` 规避。
## 免责声明
该指标仅供筛选与研究使用,不构成投资建议。请结合你的第3步新闻/基本面甄别与第4步执行规则共同决策。
Trend Strength Detector TSDTrend Strength Detector (TSD)
*Objective Trend Quality Measurement for Educational Market Analysis*
Note: This mathematical framework is a proprietary quantitative model developed by Ario Pinelab, inspired by classical EMA, ADX, RSI and MACD principles, yet not documented in any public technical or academic publication.
## 🎯 Purpose & Design Philosophy
The ** Trend Strength Detector- TSD ** is an educational research tool that provides **quantitative measurement of trend quality** through two independent scoring systems (0-100 scale). It answers the analytical question: *"How strong and aligned is the current market trend environment?"*
This indicator is designed with a **modular, complementary approach** to work alongside various analysis methodologies, particularly pattern-based recognition systems.
## 🔗 Complementary Research Framework
### Designed to Work With Pattern Detection Systems
This indicator provides **environmental context measurement** that complements qualitative pattern recognition tools. It works particularly well alongside systems like:
- **RMBS Smart Detector - Multi-Factor Momentum System** 
- Traditional chart pattern analyzers
- Any momentum-based pattern identification tools
🔍 **To find RMBS Smart Detector:**
- Search in TradingView Indicators Library: `" RMBS Smart Detector - Multi-Factor Momentum System"`
- Look for: *Multi-Factor Momentum System*
- By author: ` `
### Why This Complementary Approach?
**Trend Quality Measurement** (TSD - this tool) provides:
- ✅ Structural trend alignment (0-100 score)
- ✅ Momentum intensity levels (0-100 score)
- ✅ Environment classification (Strong/Moderate/Weak)
- 📌 **Answers:** *"HOW STRONG is the underlying trend environment?"*
### Educational Research Value
When used together in a research context, these tools enable systematic study of questions like:
- How do reversal patterns behave when Strength Score is above 70 vs below 30?
- Do continuation patterns in weakening environments (declining scores) show different characteristics?
- What is the correlation between high Alignment Scores and pattern "success rates"?
- Can environment classification help identify genuine trend initiation vs false starts?
⚠️ **Important Note:** Both tools are **independent and work standalone**. TSD provides value whether used alone or with other analysis methods. The relationship with RMBS (or any pattern tool) is **complementary for research purposes**, not dependent.
---
###Mathematical Foundation
##TSA Formula: scoring method developed by Ario
-Trend Model (0 – 100)
TAS = EMA Alignment (0–40) + Price Position (0–30) + Trend Consistency (0–30)
EMA Alignment checks EMA_fast vs EMA_slow vs EMA_trend structure.
Price Position evaluates if Close is above/below all EMAs.
Consistency = 3 × max(bullish,bearish bars within 10 candles).
-Strength Model (0 – 100)
Strength = ADX (0–50) + EMA Slope (0–25) + RSI (0–15) + MACD (0–10)
ADX measures trend energy; Slope shows EMA momentum %;
RSI assesses zone positioning; MACD confirms directional agreement.
Note: This formula represents a proprietary quantitative model by Ario_Pinelab, inspired by classical technical concepts but not published in any external reference.________________________________________
📊 Environment Classification
Based on Total Strength Score:
🟢 Strong Environment: Score ≥ 60
→ Well-defined momentum, clear directional bias
🟡 Moderate Environment: 40 ≤ Score < 60
→ Mixed signals, transitional conditions
🔴 Weak Environment: Score < 40
→ Ranging, choppy, low conviction movement
Color Coding:
•	Green background: Strong (≥60)
•	Yellow background: Moderate (40-59)
•	Red background: Weak (<40)
________________________________________
📈 Visual Components
Main Chart Display
Score Labels (Top-Right Corner):
┌─────────────────────────────────┐
│ 📊 Alignment: 75 | Strength: 82 │
│ Environment: Strong 🟢 │
└─────────────────────────────────┘
Color-Coded Background:
•	Environment strength visually indicated via background color
•	Helps quick identification of market regime
•	Customizable transparency (default: 90%)
Reference Lines:
•	Dotted line at 60: Strong/Moderate threshold
•	Dotted line at 40: Moderate/Weak threshold
•	Mid-line at 50: Neutral reference
________________________________________
🔧 Customization Settings
Input Parameters
The best setting is the default mode.
🚫 Important Disclaimers & Limitations
What This Indicator IS:
✅ Educational measurement tool for trend quality research
✅ Quantitative assessment of current market environment
✅ Complementary analysis tool for pattern-based systems
✅ Historical data analyzer for systematic study
✅ Multi-factor scoring system based on technical calculations
What This Indicator IS NOT:
❌ NOT a trading system or signal generator
❌ NOT financial advice or trade recommendations
❌ NOT predictive of future price movements
❌ NOT a guarantee of pattern success/failure
❌ NOT a substitute for comprehensive risk management
________________________________________
Known Limitations
1. Lagging Nature:
⚠️ All components (EMA, ADX, RSI, MACD) are calculated
from historical price data
→ Scores reflect CURRENT and RECENT conditions
→ Cannot predict sudden reversals or black swan events
→ Trend measurements lag actual price turning points
2. Whipsaw Risk:
⚠️ In choppy/ranging markets, scores may fluctuate rapidly
→ Moderate zone (40-60) can see frequent transitions
→ Low timeframes more susceptible to noise
→ Consider higher timeframes for stable measurements
3. Component Conflicts:
⚠️ Individual components may disagree
→ Example: Strong ADX but weak RSI alignment
→ Scores average these conflicts (may hide nuance)
→ Check individual components for deeper insight
4. Not Predictive:
⚠️ High scores do NOT guarantee continuation
⚠️ Low scores do NOT guarantee reversal
→ Measurement ≠ Prediction
→ Use for CONTEXT, not SIGNALS
→ Combine with comprehensive analysis
________________________________________
Risk Acknowledgments
Market Risk:
•	All trading involves substantial risk of loss
•	Past performance (even systematic studies) does not guarantee future results
•	No indicator, system, or methodology can eliminate market risk
Measurement Limitations:
•	Scores are mathematical calculations, not market predictions
•	Environmental classification is descriptive, not prescriptive
•	Strong measurements can deteriorate rapidly without warning
Educational Purpose:
•	This tool is designed for LEARNING about market structure
•	Not designed, tested, or validated as a standalone trading system
•	Any trading decisions are user’s sole responsibility
No Warranty:
•	Indicator provided “as-is” for educational purposes
•	No guarantee of accuracy, reliability, or profitability
•	Users must verify calculations and apply critical thinking
Open Source
Full Pine Script code available for educational study and modification. Feedback and improvement suggestions welcome.
“All logic is presented for research and educational visualization.”
---
**Attribution & Fair Use Notice**
The Trend Strength Detector (TSD) scoring framework (Multi-Factor Momentum System) was originally designed and formulated by *Ahmadrezarahmati( Ario or Ario_ Pine Lab)*.
If you build upon, modify, or republish this logic—please include proper attribution to the original author. This request is made under a spirit of open collaboration and educational fairness.
Buying Climax + Spring [Darwinian]Buying Climax + Spring Indicator  
 Overview 
Advanced Wyckoff-based indicator that identifies potential market reversals through **Buying Climax** patterns (exhaustion tops) and **Spring** patterns (accumulation bottoms). Designed for traders seeking high-probability reversal signals with strict uptrend validation.
---
 Method 
 🔴 Buying Climax Detection 
Identifies exhaustion patterns at market tops using multi-condition analysis:
**Base Buying Climax (Red Triangle)**
- Volume spike > 1.8x average
- Range expansion > 1.8x average
- New 20-bar high reached
- Close finishes in lower 30% of bar range
- **Strict uptrend validation**: Price must be 30%+ above 20-day low
**Enhanced Buying Climax (Maroon Triangle)**
- All Base BC conditions PLUS:
- Gap up from previous high
- Intraday fade (close < open and below midpoint)
- **Higher confidence reversal signal**
 🟢 Wyckoff Spring Detection 
Identifies accumulation patterns at support levels:
- Price breaks below recent pivot low (false breakdown)
- Close recovers above pivot level (rejection)
- Occurs at trading range low
- Optional volume confirmation (1.5x+ average)
- Limited to 3 attempts per pivot (prevents over-signaling)
 ✅ Uptrend Validation Filter 
**Four-condition composite filter** prevents false signals in sideways/downtrending markets:
1. Close-to-close rise ≥ 5% over lookback period
2. Price structure: Close > MA(10) > MA(20)
3. Swing low significantly below current price
4. **Primary requirement**: Current high ≥ 30% above 20-day low
---
 Input Tuning Guide 
 Buying Climax Settings: 
**Volume & Range Thresholds**
- `Volume Spike Threshold`: Default 1.8x
  - Lower (1.5x) = More signals, more noise
  - Higher (2.0-2.5x) = Fewer but stronger exhaustion signals
- `Range Spike Threshold`: Default 1.8x
  - Adjust parallel to volume threshold
  - Higher values = extreme volatility required
**Pattern Detection**
- `New High Lookback`: Default 20 bars
  - Shorter (10-15) = Recent highs only
  - Longer (30-50) = Major breakout detection
- `Close Off High Fraction`: Default 0.3 (30%)
  - Lower (0.2) = Stricter rejection requirement
  - Higher (0.4-0.5) = Allow weaker intraday fades
- `Gap Threshold`: Default 0.002 (0.2%)
  - Increase (0.005-0.01) for stocks with wider spreads
  - Decrease (0.001) for tight-spread instruments
- `Confirmation Window`: Default 5 bars
  - Shorter (3) = Faster confirmation, more false positives
  - Longer (7-10) = Wait for deeper automatic reaction
 Uptrend Filter Settings 
**Critical for Signal Quality**
- `Minimum Rise from 20-day Low`: Default 0.30 (30%)
  - **Most important parameter**
  - Lower (0.20-0.25) = More signals in moderate uptrends
  - Higher (0.40-0.50) = Only extreme parabolic moves
- `Pole Lookback`: Default 30 bars
  - Shorter (20) = Recent momentum focus
  - Longer (40-50) = Longer-term trend validation
- `Minimum Rise % for Pole`: Default 0.05 (5%)
  - Adjust based on market volatility
  - Higher in strong bull markets (7-10%)
 Wyckoff Spring Settings 
- `Pivot Length`: Default 6 bars
  - Shorter (3-4) = More frequent pivots, more signals
  - Longer (8-10) = Major support/resistance only
- `Volume Threshold`: Default 1.5x
  - Higher (1.8-2.0x) = Stronger conviction required
  - Disable volume requirement for low-volume stocks
- `Trading Range Period`: Default 20 bars
  - Match to consolidation timeframe being traded
  - Shorter (10-15) for intraday patterns
  - Longer (30-40) for weekly consolidations
---
 Recommended Workflow 
1. **Start with defaults** on daily timeframe
2. **Adjust uptrend filter** first (30% rise parameter)
   - Too many signals? Increase to 35-40%
   - Too few? Decrease to 25%
3. **Fine-tune volume/range multipliers** based on instrument volatility
4. **Enable alerts** for real-time monitoring:
   - Base BC → Initial warning
   - Enhanced BC → High-priority reversal
   - Confirmed BC (AR) → Strong follow-through
   - Spring → Accumulation opportunity
---
 Alert System 
- **Base Buying Climax**: Standard exhaustion pattern detected
- **Enhanced BC (Gap+Fade)**: Higher confidence reversal setup
- **Confirmed BC (AR)**: Automatic reaction validated (price drops below BC midline)
- **Wyckoff Spring**: Accumulation pattern at support
---
 Best Practices 
- Combine with support/resistance analysis
- Watch for BC clusters (multiple timeframes)
- Spring patterns work best after Buying Climax distribution
- Backtest parameters on your specific instruments
- Higher timeframes (daily/weekly) = higher reliability
---
 Technical Notes 
- Built with Pine Script v6
- No repainting (signals finalize on bar close)
- Minimal CPU usage (optimized calculations)
- Works on all timeframes and instruments
- Overlay indicator (displays on price chart)
---
*Indicator follows classical Wyckoff methodology with modern volatility filters*
Pro Scalper - Kalman Supertrend with Dynamic OB/OS Zones═══════════════════════════════════════════════════════════════════
PRO SCALPER - KALMAN SUPERTREND WITH DYNAMIC OB/OS ZONES
Developed by Zakaria Safri
═══════════════════════════════════════════════════════════════════
A powerful day trading and scalping indicator designed for the 30-minute 
timeframe, combining advanced Kalman filtering with Supertrend analysis 
and VWMA-based overbought/oversold detection for stocks and cryptocurrencies.
🎯 KEY FEATURES
═══════════════════════════════════════════════════════════════════
✅ Kalman-Filtered Supertrend
   • Advanced noise reduction using Kalman Filter mathematics
   • Reduces false signals by filtering market noise
   • Adaptive trend-following with dynamic support/resistance
✅ Clear Buy/Sell Signals
   • Green "BUY" labels for long entries
   • Red "SELL" labels for short entries
   • Signals trigger on confirmed trend reversals
   • Matrix-style candle coloring (Green=Bull, Red=Bear)
✅ Dynamic Overbought/Oversold Zones
   • VWMA-based adaptive zones
   • Automatically adjusts to market volatility
   • Visual zone highlighting with fills
✅ Reversal Signal Detection
   • "R" markers identify potential reversals
   • Vertical lines highlight reversal bars
   • Based on price rejection from OB/OS zones
✅ Smart Take Profit System
   • Automatic TP levels at OB/OS zones
   • "X" markers when targets are hit
   • Based on higher-high/lower-low logic
✅ Live Entry Price Table
   • Shows current trend direction
   • Displays last signal type (BUY/SELL)
   • Real-time entry price tracking
✅ Comprehensive Alert System
   • Buy/Sell signal alerts
   • Reversal detection alerts
   • Take profit hit notifications
   • All alerts are non-repainting
📊 HOW IT WORKS
═══════════════════════════════════════════════════════════════════
1. KALMAN FILTER
   The indicator applies Kalman filtering to price and ATR data, using
   mathematical equations derived from Rudolf E. Kalman's work. This 
   advanced filtering technique:
   
   • Smooths price data while maintaining responsiveness
   • Removes outliers and reduces market noise
   • Adapts to changing market conditions
   • Improves signal accuracy and reliability
2. MODIFIED SUPERTREND
   A customized Supertrend calculation that uses:
   
   • Kalman-filtered HL2 price instead of raw prices
   • Filtered ATR for volatility measurement
   • Adaptive trailing bands that follow price
   • Trend detection with minimal lag
3. VWMA DYNAMIC ZONES
   Volume-Weighted Moving Average bands that:
   
   • Calculate from highest/lowest prices over lookback period
   • Adapt to current volatility and price range
   • Identify true overbought/oversold conditions
   • Provide logical take-profit targets
4. SIGNAL GENERATION
   • BUY: When price breaks above Supertrend (trend flips bullish)
   • SELL: When price breaks below Supertrend (trend flips bearish)
   • REVERSAL: When price rejects from OB/OS zones
   • TAKE PROFIT: When price reaches target zones or forms HH/LL
⚙️ SETTINGS GUIDE
═══════════════════════════════════════════════════════════════════
🔧 KALMAN FILTER SETTINGS
┌─────────────────────────────────────────────────────────────┐
│ Gain (0.7)      → Higher = More responsive, Less smooth    │
│ Momentum (0.3)  → Higher = More momentum, Less filtering   │
└─────────────────────────────────────────────────────────────┘
📈 SUPERTREND SETTINGS
┌─────────────────────────────────────────────────────────────┐
│ ATR Period (10)      → Lookback for volatility calculation │
│ ATR Multiplier (3.0) → Distance of bands (lower = more sigs)│
└─────────────────────────────────────────────────────────────┘
📊 VWMA BANDS (OB/OS ZONES)
┌─────────────────────────────────────────────────────────────┐
│ VWMA Length (20)            → Smoothing period            │
│ Overbought Multiplier (1.5) → OB zone distance            │
│ Oversold Multiplier (1.5)   → OS zone distance            │
│ Band Lookback (20)          → Range calculation period    │
└─────────────────────────────────────────────────────────────┘
💡 USAGE INSTRUCTIONS
═══════════════════════════════════════════════════════════════════
RECOMMENDED SETUP:
• Timeframe: 30 minutes (optimized for intraday trading)
• Markets: Stocks, Cryptocurrencies, Forex
• Risk Management: Always use stop losses
• Confirmation: Combine with volume and support/resistance
ENTRY SIGNALS:
1. Wait for BUY/SELL label to appear
2. Check trend direction (candle color)
3. Confirm entry on next candle open
4. Set stop loss below/above Supertrend line
EXIT SIGNALS:
1. Take profit at "X" markers
2. Exit on opposite signal
3. Exit on reversal "R" if against your position
4. Manual exit at predetermined R:R ratio
REVERSAL TRADING:
1. Wait for "R" marker in OB/OS zone
2. Confirm with candlestick pattern
3. Enter counter-trend trade
4. Target middle VWMA or opposite zone
🎨 VISUAL ELEMENTS
═══════════════════════════════════════════════════════════════════
• GREEN LINE    → Bullish Supertrend (support)
• RED LINE      → Bearish Supertrend (resistance)
• CYAN LINE     → VWMA baseline
• RED ZONE      → Overbought area
• GREEN ZONE    → Oversold area
• GREEN CANDLES → Bullish trend active
• RED CANDLES   → Bearish trend active
• BUY LABEL     → Long entry signal
• SELL LABEL    → Short entry signal
• R MARKER      → Reversal signal
• X MARKER      → Take profit hit
⚠️ IMPORTANT NOTES
═══════════════════════════════════════════════════════════════════
✓ NON-REPAINTING: All signals are confirmed on candle close
✓ BACKTESTING: Test on your specific market before live trading
✓ RISK MANAGEMENT: Use proper position sizing and stop losses
✓ MARKET CONDITIONS: Works best in trending and range-bound markets
✓ CONFLUENCE: Combine with other analysis for best results
⚡ Best Performance:
• Trending markets with clear momentum
• Moderate to high volatility environments
• 30-minute to 1-hour timeframes
• Liquid markets with tight spreads
⚠️ Avoid Using:
• During major news events (high slippage)
• In extremely choppy/sideways markets
• On illiquid assets with wide spreads
• Without proper risk management
📚 METHODOLOGY
═══════════════════════════════════════════════════════════════════
This indicator combines three proven technical analysis methods:
1. TREND FOLLOWING (Supertrend)
   Captures major price movements and momentum
2. MEAN REVERSION (VWMA Zones)
   Identifies extremes and potential reversals
3. NOISE FILTERING (Kalman)
   Reduces false signals and improves accuracy
By integrating these approaches with volume weighting and adaptive
calculations, the Pro Scalper provides a comprehensive trading system
suitable for active traders and scalpers.
⚖️ DISCLAIMER
═══════════════════════════════════════════════════════════════════
This indicator is provided for educational and informational purposes 
only. It does not constitute financial advice, and past performance 
does not guarantee future results. 
Trading carries substantial risk of loss and is not suitable for all
investors. Always:
• Do your own research and analysis
• Use proper risk management
• Never risk more than you can afford to lose
• Test thoroughly before live trading
• Consult a financial advisor if needed
The creator (Zakaria Safri) assumes no liability for trading losses 
incurred using this indicator.
📞 ABOUT THE DEVELOPER
═══════════════════════════════════════════════════════════════════
Developer: Zakaria Safri
Specialization: Advanced algorithmic trading indicators
Focus: Noise reduction, signal filtering, and trend analysis
• Regular updates and improvements
• Community feedback integration
• Bug fixes and optimization
• Feature requests welcome
📋 VERSION INFO
═══════════════════════════════════════════════════════════════════
Version: 1.0
Created: 2024
License: Mozilla Public License 2.0
Author: Zakaria Safri
═══════════════════════════════════════════════════════════════════
Happy Trading! 📈
Developed with precision by Zakaria Safri
═══════════════════════════════════════════════════════════════════
X 4H ORThis indicator plots the 30-second opening range (high/low) for six New-York–time anchors—2am, 6am, 10am, 2pm, 6pm, and 10pm—and extends each box to a fixed end time (e.g., 2am→9am, 6am→1pm, etc.). It samples true 30-second data regardless of the chart timeframe, so the captured highs/lows are precise.
What it does
Builds the first 30s OR for each selected anchor and draws a time-anchored box for that session.
Archives every day’s boxes (up to a cap) so you can study how price interacts with past ranges.
Adds per-anchor show toggles to display the latest box for that anchor.
Adds a global History toggle to show/hide all archived boxes without deleting them (clean view vs. context view).
Uses borderless, color-coded fills per anchor to avoid edge distortion while keeping levels easy to read.
Why it’s useful
Quickly spot session inflection zones where liquidity, breakouts, or reversals cluster.
Compare how current price trades relative to recent session ranges for bias and risk framing.
Perform lightweight post-session review/backtesting on OR breaks, retests, and range rotations.
Keep charts decluttered on demand (latest only), or flip on history for deeper context.
ORBs, EMAs, AVWAPThis Pine Script (version 6) is a multi-session trading indicator that combines Opening Range Breakouts (ORBs), Exponential Moving Averages (EMAs), and an Anchored VWAP (AVWAP) system — all in one overlay script for TradingView.
Here’s a clear breakdown of its structure and functionality:
🕒 1. Session Logic and ORB Calculation
Purpose: Identify and plot the high and low of the first 30 minutes (default) for the Tokyo, London, and New York trading sessions.
Session Anchors (NY time):
Tokyo → 20:00
London → 03:00
New York → 09:30
(All configurable in inputs.)
ORB Duration: Default is 30 minutes (orbDurationMin), also user-configurable.
Resets:
London and NY ORBs reset at the start of each new New York trading day (17:00 NY time).
Tokyo ORB resets independently using a stored timestamp.
Process:
For each session:
While the time is within the ORB window, the script captures the session’s high and low.
Once the window closes, those levels remain plotted until reset.
Plot Colors:
Tokyo → Yellow (#fecc02)
London → Gray (#8c9a9c)
New York → Magenta (#ff00c8)
These form visible horizontal lines marking the prior session ranges — useful for breakout or retest trading setups.
📈 2. EMA System
Purpose: Provide trend and dynamic support/resistance guidance.
It calculates and plots four EMAs:
EMA	Period	Color	Purpose
EMA 9	Short-term	Green	Fast signal
EMA 20	Short-term	Red	Confirms direction
EMA 113	Medium	Aqua	Trend filter
EMA 200	Long-term	Orange	Macro trend baseline
Each EMA is plotted directly on the price chart for visual confluence with ORB and VWAP levels.
⚖️ 3. Anchored VWAP (AVWAP)
Purpose: Display a volume-weighted average price anchored to specific timeframes or events, optionally with dynamic deviation or percentage bands.
Features:
Anchor Options:
Time-based: Session, Week, Month, Quarter, Year, Decade, Century
Event-based: Earnings, Dividends, Splits
VWAP resets when the chosen anchor condition is met (e.g., new month, new earnings event, etc.).
Bands:
Up to three levels of symmetric upper/lower bands.
Choose between Standard Deviation or Percentage-based widths.
Display Toggles:
Each band’s visibility is optional.
VWAP can be hidden on 1D+ timeframes (hideonDWM option).
Color Scheme:
VWAP: Fuchsia (magenta-pink) line
Bands: Green / Olive / Teal with light-filled zones
⚙️ 4. Technical Highlights
Uses ta.vwap() with built-in band calculations.
Handles instruments with or without volume (errors if missing volume).
Uses time-zone aware timestamps (timestamp(NY_TZ, …)).
Uses timeframe.change() to detect new anchors for the VWAP.
Employs persistent variables (var) to maintain session state across bars.
💡 In Practice
This indicator is designed for multi-session intraday traders who:
Trade Tokyo, London, or NY open breakouts or retests.
Use EMA stacking and crossovers for trend confirmation.
Use Anchored VWAP as a fair-value or mean-reversion reference.
Need clear visual structure across different market sessions.
It provides strong session separation, trend context, and volume-weighted price reference — making it ideal for discretionary or semi-systematic trading strategies focused on liquidity zones and session momentum.
RSI VWAP v1 [JopAlgo]RSI VWAP v1.1   made stronger by volume-aware!
We know there's nothing new and the original RSI already does an excellent job. We're just working on small, practical improvements – here's our take: The same basic idea, clearer display, and a single, specially developed rolling line: a VWAP of the RSI that incorporates volume (participation) into the calculation.
Do you prefer the pure classic?
You can still use Wilder or Cutler engines –
but the star here is the VW-RSI + rolling line.
This RSI also offers the possibility of illustrating a possible
POC (Point of Control - or the HAL or VAL) level.
However, the indicator does NOT plot any of these levels itself.
We have included an illustration in the chart for this!
We hope this version makes your decision-making easier.
What you’ll see
The RSI line with a 50 midline and optional bands: either static 70/30 or adaptive μ±k·σ of the Rolling Line.
One smoothing concept only: the Rolling Line (light blue) = VWAP of RSI.
Shadow shading between RSI and the Rolling Line (green when RSI > line, red when RSI < line).
A lighter tint only on the parts of that shadow that sit above the upper band or below the lower band (quick overbought/oversold context).
Simple divergence lines drawn from RSI pivots (green for regular bullish, red for regular bearish). No labels, no buy/sell text—kept deliberately clean.
What’s new, and why it helps
VW-RSI engine (default):
RSI can be computed from volume-weighted up/down moves, so momentum reflects how much traded when price moved—not just the direction.
Rolling Line (VWAP of RSI) with pure VWAP adaptation:
Low volume: blends toward a faster VWAP so early, thin starts aren’t missed.
Volume spikes: blends toward a slower VWAP so a single heavy bar doesn’t whip the curve.
You can reveal the Base Rolling (pre-adaptation) line to see exactly how much adaptation is happening.
Adaptive bands (optional):
Instead of fixed 70/30, use mean ± k·stdev of the Rolling Line over a lookback. Levels breathe with the market—useful in strong trends where static bounds stay pinned.
Minimal, readable panel:
One smoothing, one story. The shadow tells you who’s in control; the lighter highlight shows stretch beyond your lines.
How to read it (fast)
Bias: RSI above 50 (and a rising Rolling Line) → bullish bias; below 50 → bearish bias.
Trigger: RSI crossing the Rolling Line with the bias (e.g., above 50 and crossing up).
Stretch: Near/above the upper band, avoid chasing; near/below the lower band, avoid panic—prefer a cross back through the line.
Divergence lines: Use as context, not as standalone signals. They often help you wait for the next cross or avoid late entries into exhaustion.
Settings that actually matter
RSI Engine: VW-RSI (default), Wilder, or Cutler.
Rolling Line Length: the VWAP length on RSI (higher = calmer, lower = earlier).
Adaptive behavior (pure VWAP):
Speed-up on Low Volume → blends toward fast VWAP (factor of your length).
Dampen Spikes (volume z-score) → blends toward slow VWAP.
Fast/Slow Factors → how far those fast/slow variants sit from the base length.
Bands: choose Static 70/30 or Adaptive μ±k·σ (set the lookback and k).
Visuals: show/hide Base Rolling (ref), main shadow, and highlight beyond bands.
Signal gating: optional “ignore first bars” per day/session if you dislike open noise.
Starter presets
Scalp (1–5m): RSI 9–12, Rolling 12–18, FastFactor ~0.5, SlowFactor ~2.0, Adaptive on.
Intraday (15m–1H): RSI 10–14, Rolling 18–26, Bands k = 1.0–1.4.
Swing (4H–1D): RSI 14–20, Rolling 26–40, Bands k = 1.2–1.8, Adaptive on.
Where it shines (and limits)
Best: liquid markets where volume structure matters (majors, indices, large caps).
Works elsewhere: even with imperfect volume, the shadow + bands remain useful.
Limits: very thin/illiquid assets reduce the benefit of volume-weighting—lengthen settings if needed.
Attribution & License
Based on the concept and baseline implementation of the “Relative Strength Index” by TradingView (Pine v6 built-in).
Released as Open-source (MPL-2.0). Please keep the license header and attribution intact.
Disclaimer
For educational purposes only; not financial advice. Markets carry risk. Test first, use clear levels, and manage risk. This project is independent and not affiliated with or endorsed by TradingView.
Fish OrbThis indicator marks and tracks the first 15-minute range of the New York session open (default 9:30–9:45 AM ET) — a critical volatility period for futures like NQ (Nasdaq).
It helps you visually anchor intraday price action to that initial opening range.
 Core Functionality
1. Opening Range Calculation 
It measures the High, Low, and Midpoint of the first 15 minutes after the NY market opens (default 09:30–09:45 ET).
You can change the window or timezone in the inputs.
 2. Visual Overlays 
During the 15-minute window:
A teal shaded box highlights the open range period.
Live white lines mark the current High and Low.
A red line marks the midpoint (mid-range).
These update in real-time as each bar forms.
 3. Post-Window Behavior 
When the 15-minute window ends:
The High, Low, and Midpoint are locked in.
The indicator draws persistent horizontal lines for those values.
 4. Historical Days 
You can keep today + a set number of previous days (configurable via “Previous Days to Keep”).
Older days automatically delete to keep charts clean.
 5. Line Extension Control 
Each day’s lines extend to the right after they form.
You can toggle “Stop Lines at Next NY Open”:
ON: Yesterday’s lines stop exactly at the next NY session open (09:30 ET).
OFF: Lines extend indefinitely across the chart.
MNQ TopStep 50K | Ultra Quality v3.0MNQ TopStep 50K | Ultra Quality v3.0 - Publish Summary
📊 Overview
A professional-grade trading indicator designed specifically for MNQ futures traders using TopStep funded accounts. Combines 7 technical confirmations with 5 advanced safety filters to deliver high-quality trade signals while managing drawdown risk.
🎯 Key Features
Core Signal System
7-Point Confirmation: VWAP, EMA crossovers, 15-min HTF trend, MACD, RSI, ADX, and Volume
Signal Grading: Each signal is rated A+ through D based on 7 quality factors
Quality Threshold: Adjustable minimum grade requirement (A+, A, B, C, D)
Advanced Safety Filters (Customizable)
Mean Reversion Filter - Prevents chasing extended moves beyond VWAP bands
ATR Spike Filter - Avoids trading during extreme volatility events
EMA Spacing Filter - Ensures proper trend separation (optional)
Momentum Filter - Requires consecutive directional bars (optional)
Multi-Timeframe Confirmation - Aligns with 15-min trend (optional)
TopStep Risk Management
Real-time drawdown tracking
Position sizing calculator based on remaining cushion
Daily loss limit monitoring
Consecutive loss protection
Max trades per day limiter
Visual Components
VWAP with 1σ, 2σ, 3σ bands
EMA 9/21 with cloud fill
15-min EMA 50 for HTF trend
Comprehensive metrics dashboard
Risk management panel
Filter status panel
Detailed trade labels with entry, stops, and targets
⚙️ Default Settings (Balanced for Regular Signals)
Technical Indicators
Fast EMA: 9 | Slow EMA: 21 | HTF EMA: 50 (15-min)
MACD: 10/22/9
RSI: 14 period | Thresholds: 52 (buy) / 48 (sell)
ADX: 14 period | Minimum: 20
ATR: 14 period | Stop: 2x | TP1: 2x | TP2: 3x
Volume: 1.2x average required
Session Settings
Default: 9:30 AM - 11:30 AM ET (adjustable)
Avoids first 15 minutes after market open
Customizable trading hours
Safety Filters (Default Configuration)
✅ Mean Reversion: Enabled (2.5σ max from VWAP)
✅ ATR Spike: Enabled (2.0x threshold)
❌ EMA Spacing: Disabled (can enable for quality)
❌ Momentum: Disabled (can enable for quality)
❌ MTF Confirmation: Disabled (can enable for quality)
Risk Controls
Minimum Signal Quality: C (adjustable to A+ for fewer/better signals)
Min Bars Between Signals: 10
Max Trades Per Day: 5
Stop After Consecutive Losses: 2
📈 Expected Performance
With Default Settings:
Signals per week: 10-15 trades
Estimated win rate: 55-60%
Risk-Reward: 1:2 (TP1) and 1:3 (TP2)
With Aggressive Settings (Min Quality = D, All Filters Off):
Signals per week: 20-25 trades
Estimated win rate: 50-55%
With Conservative Settings (Min Quality = A, All Filters On):
Signals per week: 3-5 trades
Estimated win rate: 65-70%
🚀 How to Use
Basic Setup:
Add indicator to MNQ 5-minute chart
Adjust TopStep account settings in inputs
Set your risk per trade percentage (default: 0.5%)
Configure trading session hours
Set minimum signal quality (Start with C for balanced results)
Signal Interpretation:
Green Triangle (BUY): Long signal - all confirmations aligned
Red Triangle (SELL): Short signal - all confirmations aligned
Label Details: Shows entry, stop loss, take profit levels, position size, and signal grade
Signal Grade: A+ = Elite (6-7 points) | A = Strong (5) | B = Good (4) | C = Fair (3)
Dashboard Monitoring:
Top Right: Technical metrics and market conditions
Top Left: Filter status (which filters are passing/blocking)
Bottom Right: TopStep risk metrics and position sizing
⚡ Customization Tips
For More Signals:
Lower "Minimum Signal Quality" to D
Decrease ADX threshold to 18-20
Lower RSI thresholds to 50/50
Reduce Volume multiplier to 1.1x
Disable additional filters
For Higher Quality (Fewer Signals):
Raise "Minimum Signal Quality" to A or A+
Increase ADX threshold to 25-30
Enable all 5 advanced filters
Tighten VWAP distance to 2.0σ
Increase momentum requirement to 3-4 bars
For TopStep Compliance:
Adjust "Max Total Drawdown" and "Daily Loss Limit" to match your account
Update "Already Used Drawdown" daily
Monitor the Risk Panel for cushion remaining
Use recommended contract sizing
🛡️ Risk Disclaimer
IMPORTANT: This indicator is for educational and informational purposes only.
Past performance does not guarantee future results
All trading involves substantial risk of loss
Use proper risk management and position sizing
Test thoroughly in paper trading before live use
The indicator does not guarantee profitable trades
Adjust settings based on your risk tolerance and trading style
Always comply with your broker's and TopStep's rules
MNQ TopStep 50K | Ultra Quality v3.0MNQ TopStep 50K | Ultra Quality v3.0 - Publish Summary📊 OverviewA professional-grade trading indicator designed specifically for MNQ futures traders using TopStep funded accounts. Combines 7 technical confirmations with 5 advanced safety filters to deliver high-quality trade signals while managing drawdown risk.🎯 Key FeaturesCore Signal System
7-Point Confirmation: VWAP, EMA crossovers, 15-min HTF trend, MACD, RSI, ADX, and Volume
Signal Grading: Each signal is rated A+ through D based on 7 quality factors
Quality Threshold: Adjustable minimum grade requirement (A+, A, B, C, D)
Advanced Safety Filters (Customizable)
Mean Reversion Filter - Prevents chasing extended moves beyond VWAP bands
ATR Spike Filter - Avoids trading during extreme volatility events
EMA Spacing Filter - Ensures proper trend separation (optional)
Momentum Filter - Requires consecutive directional bars (optional)
Multi-Timeframe Confirmation - Aligns with 15-min trend (optional)
TopStep Risk Management
Real-time drawdown tracking
Position sizing calculator based on remaining cushion
Daily loss limit monitoring
Consecutive loss protection
Max trades per day limiter
Visual Components
VWAP with 1σ, 2σ, 3σ bands
EMA 9/21 with cloud fill
15-min EMA 50 for HTF trend
Comprehensive metrics dashboard
Risk management panel
Filter status panel
Detailed trade labels with entry, stops, and targets
⚙️ Default Settings (Balanced for Regular Signals)Technical Indicators
Fast EMA: 9 | Slow EMA: 21 | HTF EMA: 50 (15-min)
MACD: 10/22/9
RSI: 14 period | Thresholds: 52 (buy) / 48 (sell)
ADX: 14 period | Minimum: 20
ATR: 14 period | Stop: 2x | TP1: 2x | TP2: 3x
Volume: 1.2x average required
Session Settings
Default: 9:30 AM - 11:30 AM ET (adjustable)
Avoids first 15 minutes after market open
Customizable trading hours
Safety Filters (Default Configuration)
✅ Mean Reversion: Enabled (2.5σ max from VWAP)
✅ ATR Spike: Enabled (2.0x threshold)
❌ EMA Spacing: Disabled (can enable for quality)
❌ Momentum: Disabled (can enable for quality)
❌ MTF Confirmation: Disabled (can enable for quality)
Risk Controls
Minimum Signal Quality: C (adjustable to A+ for fewer/better signals)
Min Bars Between Signals: 10
Max Trades Per Day: 5
Stop After Consecutive Losses: 2
📈 Expected PerformanceWith Default Settings:
Signals per week: 10-15 trades
Estimated win rate: 55-60%
Risk-Reward: 1:2 (TP1) and 1:3 (TP2)
With Aggressive Settings (Min Quality = D, All Filters Off):
Signals per week: 20-25 trades
Estimated win rate: 50-55%
With Conservative Settings (Min Quality = A, All Filters On):
Signals per week: 3-5 trades
Estimated win rate: 65-70%
🚀 How to UseBasic Setup:
Add indicator to MNQ 5-minute chart
Adjust TopStep account settings in inputs
Set your risk per trade percentage (default: 0.5%)
Configure trading session hours
Set minimum signal quality (Start with C for balanced results)
Signal Interpretation:
Green Triangle (BUY): Long signal - all confirmations aligned
Red Triangle (SELL): Short signal - all confirmations aligned
Label Details: Shows entry, stop loss, take profit levels, position size, and signal grade
Signal Grade: A+ = Elite (6-7 points) | A = Strong (5) | B = Good (4) | C = Fair (3)
Dashboard Monitoring:
Top Right: Technical metrics and market conditions
Top Left: Filter status (which filters are passing/blocking)
Bottom Right: TopStep risk metrics and position sizing
⚡ Customization TipsFor More Signals:
Lower "Minimum Signal Quality" to D
Decrease ADX threshold to 18-20
Lower RSI thresholds to 50/50
Reduce Volume multiplier to 1.1x
Disable additional filters
For Higher Quality (Fewer Signals):
Raise "Minimum Signal Quality" to A or A+
Increase ADX threshold to 25-30
Enable all 5 advanced filters
Tighten VWAP distance to 2.0σ
Increase momentum requirement to 3-4 bars
For TopStep Compliance:
Adjust "Max Total Drawdown" and "Daily Loss Limit" to match your account
Update "Already Used Drawdown" daily
Monitor the Risk Panel for cushion remaining
Use recommended contract sizing
🛡️ Risk DisclaimerIMPORTANT: This indicator is for educational and informational purposes only.
Past performance does not guarantee future results
All trading involves substantial risk of loss
Use proper risk management and position sizing
Test thoroughly in paper trading before live use
The indicator does not guarantee profitable trades
Adjust settings based on your risk tolerance and trading style
Always comply with your broker's and TopStep's rules
Stochastic Enhanced [DCAUT]█ Stochastic Enhanced  
 📊 ORIGINALITY & INNOVATION 
The Stochastic Enhanced indicator builds upon George Lane's classic momentum oscillator (developed in the late 1950s) by providing comprehensive smoothing algorithm flexibility. While traditional implementations limit users to Simple Moving Average (SMA) smoothing, this enhanced version offers 21 advanced smoothing algorithms, allowing traders to optimize the indicator's characteristics for different market conditions and trading styles.
 Key Improvements: 
 
 Extended from single SMA smoothing to 21 professional-grade algorithms including adaptive filters (KAMA, FRAMA), zero-lag methods (ZLEMA, T3), and advanced digital filters (Kalman, Laguerre)
 Maintains backward compatibility with traditional Stochastic calculations through SMA default setting
 Unified smoothing algorithm applies to both %K and %D lines for consistent signal processing characteristics
 Enhanced visual feedback with clear color distinction and background fill highlighting for intuitive signal recognition
 Comprehensive alert system covering crossovers and zone entries for systematic trade management
 
 Differentiation from Traditional Stochastic: 
Traditional Stochastic indicators use fixed SMA smoothing, which introduces consistent lag regardless of market volatility. This enhanced version addresses the limitation by offering adaptive algorithms that adjust to market conditions (KAMA, FRAMA), reduce lag without sacrificing smoothness (ZLEMA, T3, HMA), or provide superior noise filtering (Kalman Filter, Laguerre filters). The flexibility helps traders balance responsiveness and stability according to their specific needs.
 📐 MATHEMATICAL FOUNDATION 
 Core Stochastic Calculation: 
The Stochastic Oscillator measures the position of the current close relative to the high-low range over a specified period:
 Step 1: Raw %K Calculation 
%K_raw = 100 × (Close - Lowest Low) / (Highest High - Lowest Low)
Where:
 
 Close = Current closing price
 Lowest Low = Lowest low over the %K Length period
 Highest High = Highest high over the %K Length period
 Result ranges from 0 (close at period low) to 100 (close at period high)
 
 Step 2: Smoothed %K Calculation 
%K = MA(%K_raw, K Smoothing Period, MA Type)
Where:
 
 MA = Selected moving average algorithm (SMA, EMA, etc.)
 K Smoothing = 1 for Fast Stochastic, 3+ for Slow Stochastic
 Traditional Fast Stochastic uses %K_raw directly without smoothing
 
 Step 3: Signal Line %D Calculation 
%D = MA(%K, D Smoothing Period, MA Type)
Where:
 
 %D acts as a signal line and moving average of %K
 D Smoothing typically set to 3 periods in traditional implementations
 Both %K and %D use the same MA algorithm for consistent behavior
 
 Available Smoothing Algorithms (21 Options): 
 Standard Moving Averages: 
 
 SMA (Simple): Equal-weighted average, traditional default, consistent lag characteristics
 EMA (Exponential): Recent price emphasis, faster response to changes, exponential decay weighting
 RMA (Rolling/Wilder's): Smoothed average used in RSI, less reactive than EMA
 WMA (Weighted): Linear weighting favoring recent data, moderate responsiveness
 VWMA (Volume-Weighted): Incorporates volume data, reflects market participation intensity
 
 Advanced Moving Averages: 
 
 HMA (Hull): Reduced lag with smoothness, uses weighted moving averages and square root period
 ALMA (Arnaud Legoux): Gaussian distribution weighting, minimal lag with good noise reduction
 LSMA (Least Squares): Linear regression based, fits trend line to data points
 DEMA (Double Exponential): Reduced lag compared to EMA, uses double smoothing technique
 TEMA (Triple Exponential): Further lag reduction, triple smoothing with lag compensation
 ZLEMA (Zero-Lag Exponential): Lag elimination attempt using error correction, very responsive
 TMA (Triangular): Double-smoothed SMA, very smooth but slower response
 
 Adaptive & Intelligent Filters: 
 
 T3 (Tilson T3): Six-pass exponential smoothing with volume factor adjustment, excellent smoothness
 FRAMA (Fractal Adaptive): Adapts to market fractal dimension, faster in trends, slower in ranges
 KAMA (Kaufman Adaptive): Efficiency ratio based adaptation, responds to volatility changes
 McGinley Dynamic: Self-adjusting mechanism following price more accurately, reduced whipsaws
 Kalman Filter: Optimal estimation algorithm from aerospace engineering, dynamic noise filtering
 
 Advanced Digital Filters: 
 
 Ultimate Smoother: Advanced digital filter design, superior noise rejection with minimal lag
 Laguerre Filter: Time-domain filter with N-order implementation, adjustable lag characteristics
 Laguerre Binomial Filter: 6-pole Laguerre filter, extremely smooth output for long-term analysis
 Super Smoother: Butterworth filter implementation, removes high-frequency noise effectively
 
 📊 COMPREHENSIVE SIGNAL ANALYSIS 
 Absolute Level Interpretation (%K Line): 
 
 %K Above 80: Overbought condition, price near period high, potential reversal or pullback zone, caution for new long entries
 %K in 70-80 Range: Strong upward momentum, bullish trend confirmation, uptrend likely continuing
 %K in 50-70 Range: Moderate bullish momentum, neutral to positive outlook, consolidation or mild uptrend
 %K in 30-50 Range: Moderate bearish momentum, neutral to negative outlook, consolidation or mild downtrend
 %K in 20-30 Range: Strong downward momentum, bearish trend confirmation, downtrend likely continuing
 %K Below 20: Oversold condition, price near period low, potential bounce or reversal zone, caution for new short entries
 
 Crossover Signal Analysis: 
 
 %K Crosses Above %D (Bullish Cross): Momentum shifting bullish, faster line overtakes slower signal, consider long entry especially in oversold zone, strongest when occurring below 20 level
 %K Crosses Below %D (Bearish Cross): Momentum shifting bearish, faster line falls below slower signal, consider short entry especially in overbought zone, strongest when occurring above 80 level
 Crossover in Midrange (40-60): Less reliable signals, often in choppy sideways markets, require additional confirmation from trend or volume analysis
 Multiple Failed Crosses: Indicates ranging market or choppy conditions, reduce position sizes or avoid trading until clear directional move
 
 Advanced Divergence Patterns (%K Line vs Price): 
 
 Bullish Divergence: Price makes lower low while %K makes higher low, indicates weakening bearish momentum, potential trend reversal upward, more reliable when %K in oversold zone
 Bearish Divergence: Price makes higher high while %K makes lower high, indicates weakening bullish momentum, potential trend reversal downward, more reliable when %K in overbought zone
 Hidden Bullish Divergence: Price makes higher low while %K makes lower low, indicates trend continuation in uptrend, bullish trend strength confirmation
 Hidden Bearish Divergence: Price makes lower high while %K makes higher high, indicates trend continuation in downtrend, bearish trend strength confirmation
 
 Momentum Strength Analysis (%K Line Slope): 
 
 Steep %K Slope: Rapid momentum change, strong directional conviction, potential for extended moves but also increased reversal risk
 Gradual %K Slope: Steady momentum development, sustainable trends more likely, lower probability of sharp reversals
 Flat or Horizontal %K: Momentum stalling, potential reversal or consolidation ahead, wait for directional break before committing
 %K Oscillation Within Range: Indicates ranging market, sideways price action, better suited for range-trading strategies than trend following
 
 🎯 STRATEGIC APPLICATIONS 
 Mean Reversion Strategy (Range-Bound Markets): 
 
 Identify ranging market conditions using price action or Bollinger Bands
 Wait for Stochastic to reach extreme zones (above 80 for overbought, below 20 for oversold)
 Enter counter-trend position when %K crosses %D in extreme zone (sell on bearish cross above 80, buy on bullish cross below 20)
 Set profit targets near opposite extreme or midline (50 level)
 Use tight stop-loss above recent swing high/low to protect against breakout scenarios
 Exit when Stochastic reaches opposite extreme or %K crosses %D in opposite direction
 
 Trend Following with Momentum Confirmation: 
 
 Identify primary trend direction using higher timeframe analysis or moving averages
 Wait for Stochastic pullback to oversold zone (<20) in uptrend or overbought zone (>80) in downtrend
 Enter in trend direction when %K crosses %D confirming momentum shift (bullish cross in uptrend, bearish cross in downtrend)
 Use wider stops to accommodate normal trend volatility
 Add to position on subsequent pullbacks showing similar Stochastic pattern
 Exit when Stochastic shows opposite extreme with failed cross or bearish/bullish divergence
 
 Divergence-Based Reversal Strategy: 
 
 Scan for divergence between price and Stochastic at swing highs/lows
 Confirm divergence with at least two price pivots showing divergent Stochastic readings
 Wait for %K to cross %D in direction of anticipated reversal as entry trigger
 Enter position in divergence direction with stop beyond recent swing extreme
 Target profit at key support/resistance levels or Fibonacci retracements
 Scale out as Stochastic reaches opposite extreme zone
 
 Multi-Timeframe Momentum Alignment: 
 
 Analyze Stochastic on higher timeframe (4H or Daily) for primary trend bias
 Switch to lower timeframe (1H or 15M) for precise entry timing
 Only take trades where lower timeframe Stochastic signal aligns with higher timeframe momentum direction
 Higher timeframe Stochastic in bullish zone (>50) = only take long entries on lower timeframe
 Higher timeframe Stochastic in bearish zone (<50) = only take short entries on lower timeframe
 Exit when lower timeframe shows counter-signal or higher timeframe momentum reverses
 
 Zone Transition Strategy: 
 
 Monitor Stochastic for transitions between zones (oversold to neutral, neutral to overbought, etc.)
 Enter long when Stochastic crosses above 20 (exiting oversold), signaling momentum shift from bearish to neutral/bullish
 Enter short when Stochastic crosses below 80 (exiting overbought), signaling momentum shift from bullish to neutral/bearish
 Use zone midpoint (50) as dynamic support/resistance for position management
 Trail stops as Stochastic advances through favorable zones
 Exit when Stochastic fails to maintain momentum and reverses back into prior zone
 
 📋 DETAILED PARAMETER CONFIGURATION 
 %K Length (Default: 14): 
 
 Lower Values (5-9): Highly sensitive to price changes, generates more frequent signals, increased false signals in choppy markets, suitable for very short-term trading and scalping
 Standard Values (10-14): Balanced sensitivity and reliability, traditional default (14) widely used,适合 swing trading and intraday strategies
 Higher Values (15-21): Reduced sensitivity, smoother oscillations, fewer but potentially more reliable signals, better for position trading and lower timeframe noise reduction
 Very High Values (21+): Slow response, long-term momentum measurement, fewer trading signals, suitable for weekly or monthly analysis
 
 %K Smoothing (Default: 3): 
 
 Value 1: Fast Stochastic, uses raw %K calculation without additional smoothing, most responsive to price changes, generates earliest signals with higher noise
 Value 3: Slow Stochastic (default), traditional smoothing level, reduces false signals while maintaining good responsiveness, widely accepted standard
 Values 5-7: Very slow response, extremely smooth oscillations, significantly reduced whipsaws but delayed entry/exit timing
 Recommendation: Default value 3 suits most trading scenarios, active short-term traders may use 1, conservative long-term positions use 5+
 
 %D Smoothing (Default: 3): 
 
 Lower Values (1-2): Signal line closely follows %K, frequent crossover signals, useful for active trading but requires strict filtering
 Standard Value (3): Traditional setting providing balanced signal line behavior, optimal for most trading applications
 Higher Values (4-7): Smoother signal line, fewer crossover signals, reduced whipsaws but slower confirmation, better for trend trading
 Very High Values (8+): Signal line becomes slow-moving reference, crossovers rare and highly significant, suitable for long-term position changes only
 
 Smoothing Type Algorithm Selection: 
 For Trending Markets: 
 
 ZLEMA, DEMA, TEMA: Reduced lag for faster trend entry, quick response to momentum shifts, suitable for strong directional moves
 HMA, ALMA: Good balance of smoothness and responsiveness, effective for clean trend following without excessive noise
 EMA: Classic choice for trending markets, faster than SMA while maintaining reasonable stability
 
 For Ranging/Choppy Markets: 
 
 Kalman Filter, Super Smoother: Superior noise filtering, reduces false signals in sideways action, helps identify genuine reversal points
 Laguerre Filters: Smooth oscillations with adjustable lag, excellent for mean reversion strategies in ranges
 T3, TMA: Very smooth output, filters out market noise effectively, clearer extreme zone identification
 
 For Adaptive Market Conditions: 
 
 KAMA: Automatically adjusts to market efficiency, fast in trends and slow in congestion, reduces whipsaws during transitions
 FRAMA: Adapts to fractal market structure, responsive during directional moves, conservative during uncertainty
 McGinley Dynamic: Self-adjusting smoothing, follows price naturally, minimizes lag in trending markets while filtering noise in ranges
 
 For Conservative Long-Term Analysis: 
 
 SMA: Traditional choice, predictable behavior, widely understood characteristics
 RMA (Wilder's): Smooth oscillations, reduced sensitivity to outliers, consistent behavior across market conditions
 Laguerre Binomial Filter: Extremely smooth output, ideal for weekly/monthly timeframe analysis, eliminates short-term noise completely
 
 Source Selection: 
 
 Close (Default): Standard choice using closing prices, most common and widely tested
 HLC3 or OHLC4: Incorporates more price information, reduces impact of sudden spikes or gaps, smoother oscillator behavior
 HL2: Midpoint of high-low range, emphasizes intrabar volatility, useful for markets with wide intraday ranges
 Custom Source: Can use other indicators as input (e.g., Heikin Ashi close, smoothed price), creates derivative momentum indicators
 
 📈 PERFORMANCE ANALYSIS & COMPETITIVE ADVANTAGES 
 Responsiveness Characteristics: 
 Traditional SMA-Based Stochastic: 
 
 Fixed lag regardless of market conditions, consistent delay of approximately (K Smoothing + D Smoothing) / 2 periods
 Equal treatment of trending and ranging markets, no adaptation to volatility changes
 Predictable behavior but suboptimal in varying market regimes
 
 Enhanced Version with Adaptive Algorithms: 
 
 KAMA and FRAMA reduce lag by up to 40-60% in strong trends compared to SMA while maintaining similar smoothness in ranges
 ZLEMA and T3 provide near-zero lag characteristics for early entry signals with acceptable noise levels
 Kalman Filter and Super Smoother offer superior noise rejection, reducing false signals in choppy conditions by estimations of 30-50% compared to SMA
 Performance improvements vary by algorithm selection and market conditions
 
 Signal Quality Improvements: 
 
 Adaptive algorithms help reduce whipsaw trades in ranging markets by adjusting sensitivity dynamically
 Advanced filters (Kalman, Laguerre, Super Smoother) provide clearer extreme zone readings for mean reversion strategies
 Zero-lag methods (ZLEMA, DEMA, TEMA) generate earlier crossover signals in trending markets for improved entry timing
 Smoother algorithms (T3, Laguerre Binomial) reduce false extreme zone touches for more reliable overbought/oversold signals
 
 Comparison with Standard Implementations: 
 
 Versus Basic Stochastic: Enhanced version offers 21 smoothing options versus single SMA, allowing optimization for specific market characteristics and trading styles
 Versus RSI: Stochastic provides range-bound measurement (0-100) with clear extreme zones, RSI measures momentum speed, Stochastic offers clearer visual overbought/oversold identification
 Versus MACD: Stochastic bounded oscillator suitable for mean reversion, MACD unbounded indicator better for trend strength, Stochastic excels in range-bound and oscillating markets
 Versus CCI: Stochastic has fixed bounds (0-100) for consistent interpretation, CCI unbounded with variable extremes, Stochastic provides more standardized extreme readings across different instruments
 
 Flexibility Advantages: 
 
 Single indicator adaptable to multiple strategies through algorithm selection rather than requiring different indicator variants
 Ability to optimize smoothing characteristics for specific instruments (e.g., smoother for crypto volatility, faster for forex trends)
 Multi-timeframe analysis with consistent algorithm across timeframes for coherent momentum picture
 Backtesting capability with algorithm as optimization parameter for strategy development
 
 Limitations and Considerations: 
 
 Increased complexity from multiple algorithm choices may lead to over-optimization if parameters are curve-fitted to historical data
 Adaptive algorithms (KAMA, FRAMA) have adjustment periods during market regime changes where signals may be less reliable
 Zero-lag algorithms sacrifice some smoothness for responsiveness, potentially increasing noise sensitivity in very choppy conditions
 Performance characteristics vary significantly across algorithms, requiring understanding and testing before live implementation
 Like all oscillators, Stochastic can remain in extreme zones for extended periods during strong trends, generating premature reversal signals
 
 USAGE NOTES 
This indicator is designed for technical analysis and educational purposes to provide traders with enhanced flexibility in momentum analysis. The Stochastic Oscillator has limitations and should not be used as the sole basis for trading decisions.
 Important Considerations: 
 
 Algorithm performance varies with market conditions - no single smoothing method is optimal for all scenarios
 Extreme zone signals (overbought/oversold) indicate potential reversal areas but not guaranteed turning points, especially in strong trends
 Crossover signals may generate false entries during sideways choppy markets regardless of smoothing algorithm
 Divergence patterns require confirmation from price action or additional indicators before trading
 Past indicator characteristics and backtested results do not guarantee future performance
 Always combine Stochastic analysis with proper risk management, position sizing, and multi-indicator confirmation
 Test selected algorithm on historical data of specific instrument and timeframe before live trading
 Market regime changes may require algorithm adjustment for optimal performance
 
The enhanced smoothing options are intended to provide tools for optimizing the indicator's behavior to match individual trading styles and market characteristics, not to create a perfect predictive tool. Responsible usage includes understanding the mathematical properties of selected algorithms and their appropriate application contexts.
Session-Conditioned Regime ATRWhy this exists
 
Classic ATR is great—until the open. The first few bars often inherit overnight gaps and 24-hour noise that have nothing to do with the intraday regime you actually trade. That inflates early ATR, scrambles thresholds, and invites hyper-recency bias (“today is crazy!”) when it’s just the open being the open.
This tool was built to:
 
 Separate session reality from 24h noise. Measure volatility only inside your defined session (e.g., NYSE 09:30–16:00 ET).
 Judge candles against the current regime, not the last 2–3 bars. A rolling statistic from the last N completed sessions defines what “typical” means right now.
 Label “large” and “small” objectively. Bars are colored only when True Range meaningfully departs from the session regime—no gut feel, no open-bar distortion (gap inclusion optional).
 
 Overview 
Purpose: objectively identify unusually big or small candles within the active trading session, compared to the recent session regime.
Use cases: volatility filters, entry/exit confirmation, session bias detection, adaptive sizing.
This indicator replaces generic ATR with a session-conditioned, regime-aware measure. It colors candles only when their True Range (TR) is abnormally large/small versus the last N completed sessions of the same session window.
 How it works 
 
 Session gating: Only bars inside the selected session are evaluated (presets for NYSE, CME RTH, FX NY; custom supported).
 Per-bar TR: TR = max(high, prevRef) − min(low, prevRef).
 prevRef is the prior close for in-session bars.
 First bar of the session can include the overnight gap (optional; default off).
 Regime statistic: For any bar in session k, aggregate all in-session TRs from the previous N completed sessions (k−N … k−1), then compute Median (default) or Mean.
 Today’s anchor: Running statistic from today’s session start → current bar (for context and the on-chart ratio).
 Color logic:
 Big if TR ≥ bigMult × RegimeStat
 Small if TR ≤ smallMult × RegimeStat
 Colored states: big bull, big bear, small bull, small bear.
 Non-triggering bars retain the chart’s native colors.
 
 Panel (top-right by default) 
 
 Regime ATR (Nd): session-conditioned statistic over the past N completed sessions.
 Today ATR (anchored): running statistic for the current session.
 Ratio (Today/Regime): intraday volatility vs regime.
 Sample size n: number of bars used in the regime calculation.
 
 Inputs 
 
 Session Preset: NYSE (09:30–16:00 ET), CME RTH (08:30–15:00 CT), FX NY (08:00–17:00 ET), Custom (session + IANA timezone).
 Regime Window: number of completed sessions (default 5).
 Statistic: Median (robust) or Mean.
 Include Open Gap: include overnight gap in the first in-session bar’s TR (default off).
 Big/Small thresholds: multipliers relative to RegimeStat (defaults: Big=1.5×, Small=0.67×).
 Colors: four independent colors for big/small × bull/bear.
 Panel position & text size.
 Hidden outputs: expose RegimeStat, TodayStat, Ratio, and Z-score to other scripts.
 
 Alerts 
 
 RegimeATR: BIG bar — triggers when a bar meets the “Big” condition.
 RegimeATR: SMALL bar — triggers when a bar meets the “Small” condition.
 Hidden outputs (for strategies/screeners)
 RegimeATR_stat, TodayATR_stat, Today_vs_Regime_Ratio, BarTR_Zscore.
 
 Notes & limitations
 
 
 No look-ahead: calculations only use information available up to that bar. Historical colors reflect what would have been known then.
 Warm-up: colors begin once there are at least N completed sessions; before that, regime is undefined by design.
 Changing inputs (session window, multipliers, median/mean, gap toggle) recomputes the full series using the same rolling regime logic per bar.
 Designed for standard candles. Styling respects existing chart colors when no condition triggers.
 
 Practical tips
 
 
 For a broader or tighter notion of “unusual,” adjust Big/Small multipliers.
 Prefer Median in markets prone to outliers; use Mean if you want Z-score alignment with the panel’s regime mean/std.
 Use the Ratio readout to spot compression/expansion days quickly (e.g., <0.7× = compressed session, >1.3× = expanded).
 
 Roadmap 
 
 More session presets:
 24h continuous (crypto, index CFDs).
 23h/Globex futures (CME ETH with a 60-minute maintenance break).
 Regional equities (LSE, Xetra, TSE), Asia/Europe/NY overlaps for FX.
 Half-day/holiday templates and dynamic calendars.
 Multi-regime comparison: track multiple overlapping regimes (e.g., RTH vs ETH for futures) and show separate stats/ratios.
 Robust stats options: trimmed mean, MAD/Huber alternatives; optional percentile thresholds instead of fixed multipliers.
 Subpanel visuals: rolling TodayATR and Ratio plots; optional Z-score ribbon.
 Screener/strategy hooks: export boolean series for BIG/SMALL, plus a lightweight strategy template for backtesting entries/exits conditioned on regime volatility.
 Performance/QOL: per-symbol presets, smarter warm-up, and finer control over sample caps for ultra-low TF charts.
 
 Changelog 
v0.9b (Beta)
 Session presets (NYSE/CME RTH/FX NY/Custom) with timezone handling.
Panel enhancements: ratio + sample size n.
Four-state bar coloring (big/small × bull/bear).
Alerts for BIG/SMALL bars.
Hidden Z-score stream for downstream use.
Gap-in-TR toggle for the first in-session bar. 
 Disclaimer 
For educational purposes only. Not investment advice. Validate thresholds and session settings across symbols/timeframes before live use.
Session First 5-Min High/LowHere's a professional description for your indicator:
Session First 5-Min High/Low Marker
This indicator automatically identifies and marks the high and low price levels established during the first 5 minutes of major trading sessions, helping traders identify key intraday support and resistance zones.
Key Features:
Tracks three major trading sessions in IST (Indian Standard Time):
Asian Session: 5:30 AM - 5:35 AM
London Session: 12:30 PM - 12:35 PM
New York Session: 5:30 PM - 5:35 PM
Draws horizontal lines at the highest and lowest prices reached during each session's opening 5-minute window
Color-coded for easy identification (Yellow for Asian, Blue for London, Red for New York)
Lines extend across the chart to help track price reactions throughout the day
Clean, minimal design with optional labels
Best Used For:
Identifying key intraday support and resistance levels
Session breakout trading strategies
Understanding institutional order flow at market opens
Works on 1-minute timeframe for precise tracking
Customizable Settings:
Toggle line extensions on/off
Adjust line width (1-5)
Change colors for each session
Show/hide session labels
Perfect for day traders and scalpers who trade around major session openings and want to identify high-probability support/resistance zones established during peak liquidity periods.
This description explains what the indicator does, its practical applications, and its key features in a way that's clear for TradingView users.RetryClaude can make mistakes. Please double-check responses.
Session Volume Spike DetectorSession Volume Spike Detector (Buy/Sell, Dual Windows, MTF + Edge/Cooldown)
What it does
Detects statistically significant buy/sell volume spikes inside two DST-aware Mountain Time sessions and projects 1m / 5m / 10m signals onto any chart timeframe (even 1s). Spikes are confirmed at the close of their native bar and are edge-triggered with optional cooldowns to prevent duplicate alerts.
How spikes are detected
Volume ≥ SMA × multiplier
Optional jump vs recent highest volume
Optional Z-Score gate for significance
Separate Buy/Sell logic using your Direction Mode (Prev Close or Candle Body)
Multi-Timeframe (MTF) display
Shows 1m, 5m, 10m arrows on your current chart
Each HTF fires once on its bar close (no repaint after close)
Sessions (DST-aware, MT)
Morning: 05:30–08:30
Midday: 11:00–13:30
Spikes only count inside these windows.
Inputs & styling
Thresholds: SMA length, multipliers, recent lookback, Z-Score toggle/level
Toggles for which TFs to display (chart TF, 1m, 5m, 10m)
Per-TF colors + cooldowns (seconds) for Any TF, 1m, 5m, 10m
Alerts (edge + cooldown)
MTF Volume Spike (Any TF) — fires on the first qualifying spike across enabled TFs
1m / 5m / 10m Volume Spike — per-TF alerts, Buy or Sell
Recommended: set alert Trigger = Once per bar close. Cooldowns tame “triggered too often” warnings.
Great with
FVG zones, bank/insto levels, session range breaks, and trend filters. Use the MTF arrows as a participation/pressure tell to confirm or fade moves.
Notes
Works on any symbol/timeframe; best viewed on 1m or sub-minute charts.
HTF spikes appear on the bar close of 1m/5m/10m respectively.
No dynamic plot titles; Pine v6-safe.
Short summary (≤250 chars):
MTF volume-spike detector for intraday sessions (DST-aware, MT). Projects 1m/5m/10m buy/sell spikes onto any chart, with edge-triggered alerts and per-TF cooldowns to prevent duplicates. Ideal for spotting institutional participation.
Session Volume Spike Detector (MTF Arrows)Overview
The Session Volume Spike Detector is a precision multi-timeframe (MTF) tool that identifies sudden surges in buy or sell volume during key market windows. It highlights high-impact institutional participation by comparing current volume against its historical baseline and short-term highs, then plots directional markers on your chart.
This version adds MTF awareness, showing spikes from 1-minute, 5-minute, and 10-minute frames on a single chart. It’s ideal for traders monitoring microstructure shifts across multiple time compressions while staying on a fast chart (like 1-second or 1-minute).
Key Features
Dual Session Windows (DST-aware)
Automatically tracks Morning (05:30–08:30 MT) and Midday (11:00–13:30 MT) activity, adjusted for daylight savings.
Directional Spike Detection
Flags Buy spikes (green triangles) and Sell spikes (magenta triangles) using dynamic volume gates, Z-Score normalization, and recent-bar jump filters.
Multi-Timeframe Projection
Displays higher-timeframe (1m / 5m / 10m) spikes directly on your active chart for continuous visual context — even on sub-minute intervals.
Adaptive Volume Logic
Each spike is validated against:
Volume ≥ SMA × multiplier
Volume ≥ recent-high × jump factor
Optional Z-Score threshold for statistical significance
Session-Only Filtering
Ensures spikes are only plotted within specified trading sessions — ideal for futures or intraday equity traders.
Configurable Alerts
Built-in alert conditions for:
Any timeframe (MTF aggregate)
Individual 1m, 5m, or 10m windows
Alerts trigger only when a new qualifying spike appears at the close of its bar.
Use Cases
Detect algorithmic or institutional activity bursts inside your trading window.
Track confluence of volume surges across multiple timeframes.
Combine with FVGs, bank levels, or range breakouts to identify probable continuation or reversal zones.
Build custom automation or alert workflows around statistically unusual participation spikes.
Recommended Settings
Use on 1-minute chart for full MTF display.
Adjust the SMA length (default 20) and Z-Score threshold (default 3.0) to suit market volatility.
For scalping or high-frequency environments, disable the 10m layer to reduce visual clutter.
Credits
Developed by Jason Hyde
© 2025 — All rights reserved.
Designed for clarity, precision, and MTF-synchronized institutional volume detection.
Williams Alligator Spread Oscillator (WASO)Short description (About box) 
Williams Alligator Spread Oscillator (WASO) converts Bill Williams’ Alligator into a 0–100 oscillator that measures the average distance between Lips/Teeth/Jaw relative to ATR. High = expansion/trend (default), low = compression/range — making sideways markets easier to spot. Includes adaptive normalization, configurable thresholds, background shading, and alerts.
 Full description (Description field) 
What it does
The Williams Alligator Spread Oscillator (WASO) transforms Bill Williams’ Alligator into a single, adaptive 0–100 scale. It computes the average pairwise distance among the Alligator lines (Lips/Teeth/Jaw), normalizes it by ATR and a rolling min–max window, and smooths the result. This makes the signal robust across symbols and timeframes and explicitly improves detection of sideways (ranging) conditions by highlighting compression regimes.
Why it helps
Sideways detection made easier: Low WASO marks compressed regimes that commonly align with consolidation/range phases, helping you identify chop and plan breakout strategies.
Trend/expansion clarity: High WASO indicates the Alligator lines are widening relative to volatility, pointing to trending or expanding conditions.
You can flip the direction if you prefer “High = Range.”
How it is calculated (plain English)
Smooth price with RMA (SMMA-like) to get Jaw, Teeth, Lips.
Compute the average pairwise distance between these three lines.
Divide by ATR to remove price-scale effects.
Normalize with a rolling min–max window to map values to 0–100.
Optionally apply EMA smoothing to the oscillator.
Key settings
Jaw/Teeth/Lips Lengths: Alligator periods (SMMA-like via ta.rma).
ATR Length: Volatility benchmark for scaling.
Normalization Lookback: Longer = steadier; shorter = more responsive.
Smoothing (EMA): Evens out noise.
High Value = Large Spread (Trend): Toggle to invert semantics.
Upper/Lower Thresholds: 70/30 are practical starting points.
Signals / interpretation
Sideways / Compression (easier to spot):
Default direction: WASO below Lower Threshold (e.g., <30).
With inverted direction OFF: WASO above Upper Threshold (e.g., >70).
Trend / Expansion:
Default direction: WASO above Upper Threshold (e.g., >70).
With inverted direction OFF: WASO below Lower Threshold (e.g., <30).
Midline (50): Neutral zone; flips around 50 can hint at regime shifts.
Alerts included
Range Start (sideways/compression)
Trend Start (expansion/trend)
Notes & limitations
This implementation omits the classic forward shift of Alligator lines to keep signals usable on live bars.
If market behavior shifts (very quiet or very volatile), tune Lookback and ATR Length.
Combine WASO with breakout levels or momentum filters for entries/exits.
Credits & disclaimer
Inspired by Bill Williams’ Alligator.
For educational purposes only. Not financial advice.
Release Notes (v1.0):
Initial release of Williams-Alligator Spread Oscillator (WASO) with ATR-based scaling and adaptive 0–100 normalization.
Direction toggle (High = Trend by default), adjustable thresholds, background shading, and two alert conditions.






















