Recherche dans les scripts pour "股价站上60月线"
EMA Cloud 9/30/60 – Visual Trend Strength - CryptowitchThis indicator displays three Exponential Moving Averages (EMAs):
🔸 EMA 9 (short-term)
🔸 EMA 30 (mid-term)
🔸 EMA 60 (long-term)
A dynamic cloud is drawn between EMA 9 and EMA 30 to visually highlight trend momentum:
Green cloud = bullish momentum (EMA 9 above EMA 30)
Red cloud = bearish momentum (EMA 9 below EMA 30)
This cloud setup helps quickly identify trend direction, momentum shifts, consolidation zones, and potential entry/exit points.
Clean, visual, and effective – suitable for scalpers, swing traders, and trend followers alike.
Emre AOI Zonen Daily & Weekly (mit Alerts, max 60 Pips)This TradingView indicator automatically highlights Areas of Interest (AOI) for Forex or other markets on Daily and Weekly timeframes. It identifies zones based on the high and low of the previous period, but only includes zones with a width of 60 pips or less.
Features:
Daily AOI Zones in blue, Weekly AOI Zones in yellow with 20% opacity, so candlesticks remain visible.
Persistent zones: AOI boxes stay on the chart until the price breaks the zone.
Multiple zones: Supports storing multiple Daily and Weekly AOIs simultaneously.
Break Alerts: Sends alerts whenever a Daily or Weekly AOI is broken, helping traders spot key levels in real-time.
Fully automated: No manual drawing needed; zones are updated and extended automatically.
Use Case:
Ideal for traders using a top-down approach, combining Weekly trend analysis with Daily entry signals. Helps identify support/resistance, supply/demand zones, and critical price levels efficiently.
EMA band 12/60/150/200EMA band consisting of 12/60/150/200
Specifically for Indian stock market, can be used for other trading scripts after testing.
Best use case : on Daily TF.
Bull run entry criteria, Not bear market or Bottom catching.
15-Minute and 60-Minute ORB with Wicks15 and 60 minute ORBs for each trading day. Simple, yet effective.
EMA (10,20,60) + Bollinger BandsCombination of bollinger bands and exponential moving averages (10, 20, 60)
The coloring is optimized for dark background, and it is editable
This indicator combined 3 exponential moving average lines and bollinger bands . The EMA lines can be add or deleted in pine editor, and its parameters can be changed too. Same to the bollinger bands . Defaulted value for BB is 20SMA with 2 standard deviations.
Useful as a supplmentary indicators
EMA30,60,100 EMA 30 (orange),60(red),100(green)
Bullish: green below the other two
Bearish: green above other two
when lines cross, no clear trend.
When Price touches the orange = entry point
Thanks to CFXtrader for the basic script
[STRATEGY]EMA 30/60 Cross Strategystrategy based on EMA 30/60 cross
works best on 4hr timeframes & high-midcaps
120/60 Trend ModelCombination of 120 & 60 EMAs used to determine entries as well as the over all trend.
Guppy MMA 3, 5, 8, 10, 12, 15 and 30, 35, 40, 45, 50, 60Guppy Multiple Moving Average
Short Term EMA 3, 5, 8, 10, 12, 15
Long Term EMA 30, 35, 40, 45, 50, 60
Use for SFTS Class
YM Ultimate SNIPER v8 final# YM Ultimate SNIPER v8 - Complete Documentation
## 🎯 WIN AT ALL COST EDITION
### FIXED: Scoring System + Solid Table + All Timeframes + Filtered Visuals
**TARGET: 3-7 High-Confluence Trades per Day**
**Philosophy: "Zones That Matter" + "See Inside The Candle"**
---
# 📋 QUICK START CHEATSHEET
## ⚡ 60-SECOND SETUP
### Step 1: Add to Chart
1. Open TradingView → Indicators → Pine Editor
2. Paste the v8 code → Save → Add to Chart
3. Use 5-minute chart for day trading
### Step 2: Verify Settings (YM Default)
```
TIER THRESHOLDS:
├── S-Tier: 50 points (institutional sweep)
├── A-Tier: 25 point# YM Ultimate SNIPER v8 - Complete Documentation
## 🎯 WIN AT ALL COST EDITION
### FIXED: Scoring System + Solid Table + All Timeframes + Filtered Visuals
**TARGET: 3-7 High-Confluence Trades per Day**
**Philosophy: "Zones That Matter" + "See Inside The Candle"**
---
# 📋 QUICK START CHEATSHEET
## ⚡ 60-SECOND SETUP
### Step 1: Add to Chart
1. Open TradingView → Indicators → Pine Editor
2. Paste the v8 code → Save → Add to Chart
3. Use 5-minute chart for day trading
### Step 2: Verify Settings (YM Default)
```
TIER THRESHOLDS:
├── S-Tier: 50 points (institutional sweep)
├── A-Tier: 25 points (strong momentum)
└── B-Tier: 12 points (quick scalp)
INTRABAR: 1-minute (most precise)
SESSIONS: NY Window (0930-1130) ← Primary focus
```
### Step 3: Look for These Signals
```
⚡GOD = GOD MODE (9.0+ score) → TAKE IT NOW, full size
S🎯 = S-Tier HOLD → 2.5-3.5 R:R target
A🎯 = A-Tier SWING → 2.0-2.5 R:R target
B🎯 = B-Tier SCALP → 1.5-2.0 R:R target
Z = Zone entry (no tier but quality zone)
LS↑/↓ = Liquidity Sweep (filtered for quality)
✕ = Absorption (filtered for quality)
```
---
# 🔥 THE SCORE SYSTEM (v8 REBUILT)
## How It Works Now
The score is **100% ADDITIVE** - no more gating. Every factor adds points:
| Category | Factor | Points |
|----------|--------|--------|
| **TIER** | S-Tier | +3.0 |
| | A-Tier | +2.0 |
| | B-Tier | +1.0 |
| **ZONES** | In FVG Zone | +1.5 |
| | In Order Block | +1.5 |
| | In IFVG | +1.0 |
| **VOLUME** | Meets minimum (1.5x) | +0.5 |
| | Strong (2.0x) | +0.75 |
| | Extreme (2.5x) | +0.75 |
| **DELTA** | Buy/Sell dominant (60%+) | +1.0 |
| | Strong (70%+) | +0.5 |
| | Extreme (78%+) | +0.5 |
| **CVD** | Bullish/Bearish | +0.5 |
| | Strong momentum | +0.5 |
| | Extreme momentum | +0.5 |
| **CANDLE** | Strong body (60%+) | +0.5 |
| | Significant range (1.2x avg) | +0.5 |
| | Clean wicks | +0.5 |
| **SWEEP** | Recent sweep (within 3 bars) | +1.5 |
| | Current bar sweep | +0.5 |
| **SESSION** | In key session | +1.0 |
| **INTRABAR** | IB Delta dominant | +1.0 |
| | IB Delta strong | +0.5 |
| | IB Delta extreme | +0.5 |
| | IB Momentum confirmed | +0.5 |
| | IB Momentum strong | +0.5 |
| | Absorption detected | +1.0 |
| | Internal sweep | +0.5 |
| | Volume cluster (favorable) | +0.5 |
**Max Raw Score: ~22 points → Normalized to 10**
## Score Classifications
| Score | Classification | Action | Size |
|-------|---------------|--------|------|
| **9.0-10** | ⚡ GOD MODE | TAKE IT NOW | Full position |
| **8.0-8.9** | ⭐ EXCELLENT | High priority | 75-100% size |
| **5.0-7.9** | 🟡 MEDIUM | Standard setup | 50-75% size |
| **<5.0** | ❌ NO SIGNAL | No trade | — |
---
# 📊 INSTRUMENT-SPECIFIC SETUP
## YM (Dow Jones Mini) - DEFAULT
```
TIER THRESHOLDS:
├── S-Tier: 50 points
├── A-Tier: 25 points
└── B-Tier: 12 points
TICK VALUE: 1.00 (1 tick = 1 point)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute) OR 100T (tick for Premium+)
├── Sessions: NY Open (9:30-11:30)
└── Stop: 2 ticks below signal candle low
PRO TIP: Use 100T or 250T tick intrabar for true order flow
```
## NQ (Nasdaq Mini)
```
TIER THRESHOLDS:
├── S-Tier: 100 points
├── A-Tier: 50 points
└── B-Tier: 25 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $5 per point ($20 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Min Volume Ratio: 1.8 (more volatile)
├── Delta Threshold: 0.62 (stricter)
└── Sessions: NY Open + Power Hour
```
## GC (Gold)
```
TIER THRESHOLDS:
├── S-Tier: 20 points (=$200)
├── A-Tier: 10 points (=$100)
└── B-Tier: 5 points (=$50)
TICK VALUE: 0.10 (10 ticks = 1 point)
CONTRACT VALUE: $10 per point ($1 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: London + NY overlap
├── Min Volume Ratio: 1.5
└── Note: More responsive to geopolitical events
```
## BTC (Bitcoin Futures)
```
TIER THRESHOLDS:
├── S-Tier: 500 points
├── A-Tier: 250 points
└── B-Tier: 100 points
TICK VALUE: 5.00 (1 tick = 5 points)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 15-minute (less noise)
├── Intrabar TF: 5 (5-minute)
├── Sessions: Consider 24/7 (disable session filter)
├── Min Volume Ratio: 2.0 (crypto is spiky)
├── Absorption Threshold: 0.70 (stricter)
└── Note: Higher volatility, use wider stops
```
## ES (S&P 500 Mini)
```
TIER THRESHOLDS:
├── S-Tier: 20 points
├── A-Tier: 10 points
└── B-Tier: 5 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $12.50 per point ($50 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: NY Open (primary)
├── Note: Most liquid, cleanest price action
└── Good for learning the system
```
---
# 🕐 INTRABAR TIMEFRAME GUIDE
## Available Timeframes (v8 COMPLETE!)
### TICK TIMEFRAMES (Premium+ Required)
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Tick | 1T | **ULTIMATE PRECISION** - every single trade |
| 5 Ticks | 5T | Ultra-precise scalping |
| 10 Ticks | 10T | High-frequency analysis |
| 25 Ticks | 25T | Tick scalping |
| 50 Ticks | 50T | Short-term tick analysis |
| 100 Ticks | 100T | Standard tick analysis |
| 250 Ticks | 250T | Medium tick grouping |
| 500 Ticks | 500T | Larger tick grouping |
| 1000 Ticks | 1000T | High-level tick view |
### SECOND TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Second | 1S | Ultra-scalping |
| 5 Seconds | 5S | Scalping, high-frequency |
| 10 Seconds | 10S | Fast scalping |
| 15 Seconds | 15S | Quick scalps |
| 30 Seconds | 30S | Short-term scalps |
### MINUTE TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Minute | 1 | **RECOMMENDED** for 5m charts |
| 2 Minutes | 2 | 10m charts |
| 3 Minutes | 3 | 15m charts |
| 5 Minutes | 5 | 15-30m charts |
| 10 Minutes | 10 | 30m-1h charts |
| 15 Minutes | 15 | 1h charts |
| 30 Minutes | 30 | 1-2h charts |
| 45 Minutes | 45 | 2-4h charts |
| 1 Hour | 60 | 4h charts |
| 2 Hours | 120 | Daily charts |
| 3 Hours | 180 | Daily charts |
| 4 Hours | 240 | Weekly charts |
### HIGHER TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| Daily | D | Weekly/Monthly charts |
| Weekly | W | Monthly charts |
| Monthly | M | Long-term analysis |
## 🔥 TICK DATA ADVANTAGE
**Why Use Tick Data?**
- **True Order Flow**: See every single transaction
- **No Time Aggregation**: Pure price/volume action
- **Institutional Footprint**: Catch block trades instantly
- **Maximum IB Precision**: Most accurate delta/momentum
**Best Tick Settings by Instrument:**
| Instrument | Chart TF | Recommended Tick IB |
|------------|----------|---------------------|
| YM | 5 min | 100T or 250T |
| NQ | 5 min | 50T or 100T (more liquid) |
| ES | 5 min | 50T or 100T (most liquid) |
| GC | 5 min | 100T or 250T |
| BTC | 15 min | 250T or 500T |
## ⚠️ CRITICAL RULE
**Intrabar TF MUST be LOWER than your chart TF!**
### Automatic Validation (v8 NEW!)
The script now automatically detects invalid intrabar configurations:
**When Intrabar TF is INVALID:**
1. **Yellow warning label** appears on chart: "⚠️ INTRABAR TF INVALID"
2. **Table shows**: "IB Data: ⚠️ INVALID TF" with yellow background
3. **Alert available**: "⚠️ INTRABAR CONFIG ERROR"
4. **Score impact**: Intrabar points (up to 5) are NOT added
**Example - 2 Minute Chart:**
```
VALID selections: 1T, 5T, 10T, 25T, 50T, 100T (any tick)
1S, 5S, 10S, 15S, 30S (any second)
1 (1-minute only)
INVALID selections: 2, 3, 5, 10, 15... (2min or higher)
D, W, M (obviously)
```
| Your Chart | Valid Intrabar Options |
|------------|------------------------|
| **2 minute** | **1T-1000T, 1S-30S, 1 only** |
| 5 minute | 1T-1000T, 1S-30S, 1-4 min |
| 15 minute | 1T-1000T, 1S-30S, 1-10 min |
| 1 hour | 1T-1000T, 1S-30S, 1-45 min |
| 4 hour | 1T-1000T, 1S-30S, 1-180 min |
| Daily | All tick, seconds, minutes up to 240 |
---
# 🎨 VISUAL FILTERING (v8 NEW!)
## The Problem (v7)
Too many sweep and absorption markers cluttered the chart with low-quality signals.
## The Solution (v8)
**Quality filters** - only show sweeps/absorption that MATTER.
### Sweep Quality Score
A sweep needs confluence to display:
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Strong volume
+0.5 = In session
+1.0 = Intrabar confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Absorption Quality Score
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Tier signal present
+0.5 = In session
+0.5 = CVD confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Settings
```
VISUAL FILTERS:
├── Only Show Quality Sweeps: ON (default)
├── Only Show Quality Absorption: ON (default)
├── Min Sweep Quality Score: 2.0
└── Min Absorption Quality Score: 2.0
Turn OFF filters to see ALL signals (not recommended)
```
---
# 📈 CVD IMPLEMENTATION (v8 FIXED)
## What Changed
### v7 Issues:
- CVD accumulated forever (overflow risk)
- Short slope calculation (only 3 bars)
- No session reset
### v8 Fixes:
```
1. SESSION RESET: CVD resets at London/NY open
2. PROPER SLOPE: Calculated over 5 bars
3. STDEV COMPARISON: Strong/Extreme = slope > 1-2 stdev
```
## CVD Readings in Table
| Display | Meaning | Score Contribution |
|---------|---------|-------------------|
| 🔥 BULL | Extreme bullish momentum | +1.5 total |
| 🔥 BEAR | Extreme bearish momentum | +1.5 total |
| ↑ BULL | Strong bullish trend | +1.0 total |
| ↓ BEAR | Strong bearish trend | +1.0 total |
| bull | Bullish bias | +0.5 |
| bear | Bearish bias | +0.5 |
| — | Neutral/mixed | +0 |
---
# ✅ ENTRY CHECKLIST v8
## Quick Checklist (Print This!)
### For ANY Signal:
- Score ≥ 3.5 (signal shown)
- Session active (🟢 in table)
- Direction matches bias
### For MEDIUM+ Signal (Score 5.0+):
- Delta matches direction (✓ or better)
- CVD trending with signal
- Volume ≥ 1.5x average
### For EXCELLENT Signal (Score 7.0+):
All above PLUS:
- In FVG Zone OR Order Block
- Strong delta (✓✓) or extreme (🔥)
- IB Delta confirms direction
### For GOD MODE (Score 8.5+):
All above PLUS:
- Multiple structure confluence (FVG + OB)
- Absorption or sweep present
- IB Momentum strong (🔥)
- **FULL SIZE - DON'T HESITATE**
---
# ⛔ DO NOT TRADE
1. **Score below threshold** - No signal shown = no trade
2. **Outside session** - Unless you've disabled session filter
3. **Delta conflicts** - Bearish candle but buy dominant delta
4. **No intrabar data** - Shows "0 bars" in IB Data
5. **CVD strongly opposite** - 🔥 BEAR on a long signal
6. **After major news** - Wait for dust to settle
7. **Low volume overall** - Market too quiet
---
# 🏆 GOLDEN RULES v8
> **"The score doesn't lie. Trust the math."**
> **"GOD MODE = Don't think, just execute."**
> **"Filtered visuals = Quality over quantity."**
> **"If intrabar conflicts, trust intrabar."**
> **"Session matters - trade when institutions trade."**
> **"Stack confluence - score higher = win more."**
> **"Leave every trade with money. Next setup is coming."**
---
# 📝 TRADE JOURNAL v8
```
DATE: ___________
SESSION: ☐ LDN ☐ NY ☐ PWR
INSTRUMENT: YM / NQ / ES / GC / BTC
TRADE:
├── Time: _______
├── Signal: ⚡GOD / S🎯 / A🎯 / B🎯 / Z
├── Direction: LONG / SHORT
├── SCORE: ___/10
├── Classification: GOD MODE / EXCELLENT / MEDIUM / WEAK
│
├── Entry: _______
├── Stop: _______
├── Target: _______
│
├── In FVG Zone: ☐ Yes ☐ No
├── In Order Block: ☐ Yes ☐ No
├── Liquidity Sweep: ☐ Yes ☐ No
├── Absorption: ☐ Yes ☐ No
│
├── IB Delta: ____% (BULL / BEAR / NEUTRAL)
├── IB Momentum: ____% (BULL / BEAR / MIXED)
├── CVD: 🔥 / ↑↓ / neutral
│
├── Result: +/- ___ pts ($_____)
└── Notes: _______________________
DAILY SUMMARY:
├── Total Trades: ___
├── GOD MODE signals: ___
├── EXCELLENT signals: ___
├── Win Rate: ___%
├── Net P/L: $_____
└── Best score today: ___
```
---
# 🔧 TROUBLESHOOTING
| Issue | Solution |
|-------|----------|
| **Yellow "INVALID TF" warning** | Your intrabar TF is >= chart TF. Select LOWER! |
| **IB Data shows "⚠️ INVALID TF"** | Same as above - pick 1T, 1S, or 1 for most charts |
| No signals appearing | Lower Min Score threshold |
| Too many signals | Raise Min Score threshold |
| Score always 0 | Check if candle is tiered (meets point threshold) |
| Sweeps not showing | Check quality filter settings or lower threshold |
| Table transparent | ❌ Fixed in v8 - table is now solid |
| CVD not making sense | Now resets at session open - cleaner readings |
| Wrong tier thresholds | Adjust for your instrument (see setup guide) |
| Tick TF not available | Requires TradingView Premium+ subscription |
---
# 📚 VERSION HISTORY
## v8 - WIN AT ALL COST EDITION
- ✅ REBUILT scoring system (100% additive, no gating)
- ✅ SOLID table (no transparency)
- ✅ ALL TradingView timeframes for intrabar (1S to Monthly)
- ✅ FILTERED sweeps/absorption (quality-based)
- ✅ FIXED CVD (session reset, proper slope)
- ✅ GOD MODE classification (8.5+ score)
- ✅ Instrument-specific documentation
## v7 - Intrabar Edition
- Added intrabar analysis engine
- Added absorption detection
- Added internal sweep detection
## Previous Versions
- GRA v5 SNIPER + DeepFlow Zones SNIPER merged
---
*© Alexandro Disla - YM Ultimate SNIPER v8*
*WIN AT ALL COST Edition | Trust The Score*
s (strong momentum)
└── B-Tier: 12 points (quick scalp)
INTRABAR: 1-minute (most precise)
SESSIONS: NY Window (0930-1130) ← Primary focus
```
### Step 3: Look for These Signals
```
⚡GOD = GOD MODE (9.0+ score) → TAKE IT NOW, full size
S🎯 = S-Tier HOLD → 2.5-3.5 R:R target
A🎯 = A-Tier SWING → 2.0-2.5 R:R target
B🎯 = B-Tier SCALP → 1.5-2.0 R:R target
Z = Zone entry (no tier but quality zone)
LS↑/↓ = Liquidity Sweep (filtered for quality)
✕ = Absorption (filtered for quality)
```
---
# 🔥 THE SCORE SYSTEM (v8 REBUILT)
## How It Works Now
The score is **100% ADDITIVE** - no more gating. Every factor adds points:
| Category | Factor | Points |
|----------|--------|--------|
| **TIER** | S-Tier | +3.0 |
| | A-Tier | +2.0 |
| | B-Tier | +1.0 |
| **ZONES** | In FVG Zone | +1.5 |
| | In Order Block | +1.5 |
| | In IFVG | +1.0 |
| **VOLUME** | Meets minimum (1.5x) | +0.5 |
| | Strong (2.0x) | +0.75 |
| | Extreme (2.5x) | +0.75 |
| **DELTA** | Buy/Sell dominant (60%+) | +1.0 |
| | Strong (70%+) | +0.5 |
| | Extreme (78%+) | +0.5 |
| **CVD** | Bullish/Bearish | +0.5 |
| | Strong momentum | +0.5 |
| | Extreme momentum | +0.5 |
| **CANDLE** | Strong body (60%+) | +0.5 |
| | Significant range (1.2x avg) | +0.5 |
| | Clean wicks | +0.5 |
| **SWEEP** | Recent sweep (within 3 bars) | +1.5 |
| | Current bar sweep | +0.5 |
| **SESSION** | In key session | +1.0 |
| **INTRABAR** | IB Delta dominant | +1.0 |
| | IB Delta strong | +0.5 |
| | IB Delta extreme | +0.5 |
| | IB Momentum confirmed | +0.5 |
| | IB Momentum strong | +0.5 |
| | Absorption detected | +1.0 |
| | Internal sweep | +0.5 |
| | Volume cluster (favorable) | +0.5 |
**Max Raw Score: ~22 points → Normalized to 10**
## Score Classifications
| Score | Classification | Action | Size |
|-------|---------------|--------|------|
| **9.0-10** | ⚡ GOD MODE | TAKE IT NOW | Full position |
| **8.0-8.9** | ⭐ EXCELLENT | High priority | 75-100% size |
| **5.0-7.9** | 🟡 MEDIUM | Standard setup | 50-75% size |
| **<5.0** | ❌ NO SIGNAL | No trade | — |
---
# 📊 INSTRUMENT-SPECIFIC SETUP
## YM (Dow Jones Mini) - DEFAULT
```
TIER THRESHOLDS:
├── S-Tier: 50 points
├── A-Tier: 25 points
└── B-Tier: 12 points
TICK VALUE: 1.00 (1 tick = 1 point)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute) OR 100T (tick for Premium+)
├── Sessions: NY Open (9:30-11:30)
└── Stop: 2 ticks below signal candle low
PRO TIP: Use 100T or 250T tick intrabar for true order flow
```
## NQ (Nasdaq Mini)
```
TIER THRESHOLDS:
├── S-Tier: 100 points
├── A-Tier: 50 points
└── B-Tier: 25 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $5 per point ($20 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Min Volume Ratio: 1.8 (more volatile)
├── Delta Threshold: 0.62 (stricter)
└── Sessions: NY Open + Power Hour
```
## GC (Gold)
```
TIER THRESHOLDS:
├── S-Tier: 20 points (=$200)
├── A-Tier: 10 points (=$100)
└── B-Tier: 5 points (=$50)
TICK VALUE: 0.10 (10 ticks = 1 point)
CONTRACT VALUE: $10 per point ($1 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: London + NY overlap
├── Min Volume Ratio: 1.5
└── Note: More responsive to geopolitical events
```
## BTC (Bitcoin Futures)
```
TIER THRESHOLDS:
├── S-Tier: 500 points
├── A-Tier: 250 points
└── B-Tier: 100 points
TICK VALUE: 5.00 (1 tick = 5 points)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 15-minute (less noise)
├── Intrabar TF: 5 (5-minute)
├── Sessions: Consider 24/7 (disable session filter)
├── Min Volume Ratio: 2.0 (crypto is spiky)
├── Absorption Threshold: 0.70 (stricter)
└── Note: Higher volatility, use wider stops
```
## ES (S&P 500 Mini)
```
TIER THRESHOLDS:
├── S-Tier: 20 points
├── A-Tier: 10 points
└── B-Tier: 5 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $12.50 per point ($50 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: NY Open (primary)
├── Note: Most liquid, cleanest price action
└── Good for learning the system
```
---
# 🕐 INTRABAR TIMEFRAME GUIDE
## Available Timeframes (v8 COMPLETE!)
### TICK TIMEFRAMES (Premium+ Required)
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Tick | 1T | **ULTIMATE PRECISION** - every single trade |
| 5 Ticks | 5T | Ultra-precise scalping |
| 10 Ticks | 10T | High-frequency analysis |
| 25 Ticks | 25T | Tick scalping |
| 50 Ticks | 50T | Short-term tick analysis |
| 100 Ticks | 100T | Standard tick analysis |
| 250 Ticks | 250T | Medium tick grouping |
| 500 Ticks | 500T | Larger tick grouping |
| 1000 Ticks | 1000T | High-level tick view |
### SECOND TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Second | 1S | Ultra-scalping |
| 5 Seconds | 5S | Scalping, high-frequency |
| 10 Seconds | 10S | Fast scalping |
| 15 Seconds | 15S | Quick scalps |
| 30 Seconds | 30S | Short-term scalps |
### MINUTE TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Minute | 1 | **RECOMMENDED** for 5m charts |
| 2 Minutes | 2 | 10m charts |
| 3 Minutes | 3 | 15m charts |
| 5 Minutes | 5 | 15-30m charts |
| 10 Minutes | 10 | 30m-1h charts |
| 15 Minutes | 15 | 1h charts |
| 30 Minutes | 30 | 1-2h charts |
| 45 Minutes | 45 | 2-4h charts |
| 1 Hour | 60 | 4h charts |
| 2 Hours | 120 | Daily charts |
| 3 Hours | 180 | Daily charts |
| 4 Hours | 240 | Weekly charts |
### HIGHER TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| Daily | D | Weekly/Monthly charts |
| Weekly | W | Monthly charts |
| Monthly | M | Long-term analysis |
## 🔥 TICK DATA ADVANTAGE
**Why Use Tick Data?**
- **True Order Flow**: See every single transaction
- **No Time Aggregation**: Pure price/volume action
- **Institutional Footprint**: Catch block trades instantly
- **Maximum IB Precision**: Most accurate delta/momentum
**Best Tick Settings by Instrument:**
| Instrument | Chart TF | Recommended Tick IB |
|------------|----------|---------------------|
| YM | 5 min | 100T or 250T |
| NQ | 5 min | 50T or 100T (more liquid) |
| ES | 5 min | 50T or 100T (most liquid) |
| GC | 5 min | 100T or 250T |
| BTC | 15 min | 250T or 500T |
## ⚠️ CRITICAL RULE
**Intrabar TF MUST be LOWER than your chart TF!**
### Automatic Validation (v8 NEW!)
The script now automatically detects invalid intrabar configurations:
**When Intrabar TF is INVALID:**
1. **Yellow warning label** appears on chart: "⚠️ INTRABAR TF INVALID"
2. **Table shows**: "IB Data: ⚠️ INVALID TF" with yellow background
3. **Alert available**: "⚠️ INTRABAR CONFIG ERROR"
4. **Score impact**: Intrabar points (up to 5) are NOT added
**Example - 2 Minute Chart:**
```
VALID selections: 1T, 5T, 10T, 25T, 50T, 100T (any tick)
1S, 5S, 10S, 15S, 30S (any second)
1 (1-minute only)
INVALID selections: 2, 3, 5, 10, 15... (2min or higher)
D, W, M (obviously)
```
| Your Chart | Valid Intrabar Options |
|------------|------------------------|
| **2 minute** | **1T-1000T, 1S-30S, 1 only** |
| 5 minute | 1T-1000T, 1S-30S, 1-4 min |
| 15 minute | 1T-1000T, 1S-30S, 1-10 min |
| 1 hour | 1T-1000T, 1S-30S, 1-45 min |
| 4 hour | 1T-1000T, 1S-30S, 1-180 min |
| Daily | All tick, seconds, minutes up to 240 |
---
# 🎨 VISUAL FILTERING (v8 NEW!)
## The Problem (v7)
Too many sweep and absorption markers cluttered the chart with low-quality signals.
## The Solution (v8)
**Quality filters** - only show sweeps/absorption that MATTER.
### Sweep Quality Score
A sweep needs confluence to display:
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Strong volume
+0.5 = In session
+1.0 = Intrabar confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Absorption Quality Score
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Tier signal present
+0.5 = In session
+0.5 = CVD confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Settings
```
VISUAL FILTERS:
├── Only Show Quality Sweeps: ON (default)
├── Only Show Quality Absorption: ON (default)
├── Min Sweep Quality Score: 2.0
└── Min Absorption Quality Score: 2.0
Turn OFF filters to see ALL signals (not recommended)
```
---
# 📈 CVD IMPLEMENTATION (v8 FIXED)
## What Changed
### v7 Issues:
- CVD accumulated forever (overflow risk)
- Short slope calculation (only 3 bars)
- No session reset
### v8 Fixes:
```
1. SESSION RESET: CVD resets at London/NY open
2. PROPER SLOPE: Calculated over 5 bars
3. STDEV COMPARISON: Strong/Extreme = slope > 1-2 stdev
```
## CVD Readings in Table
| Display | Meaning | Score Contribution |
|---------|---------|-------------------|
| 🔥 BULL | Extreme bullish momentum | +1.5 total |
| 🔥 BEAR | Extreme bearish momentum | +1.5 total |
| ↑ BULL | Strong bullish trend | +1.0 total |
| ↓ BEAR | Strong bearish trend | +1.0 total |
| bull | Bullish bias | +0.5 |
| bear | Bearish bias | +0.5 |
| — | Neutral/mixed | +0 |
---
# ✅ ENTRY CHECKLIST v8
## Quick Checklist (Print This!)
### For ANY Signal:
- Score ≥ 3.5 (signal shown)
- Session active (🟢 in table)
- Direction matches bias
### For MEDIUM+ Signal (Score 5.0+):
- Delta matches direction (✓ or better)
- CVD trending with signal
- Volume ≥ 1.5x average
### For EXCELLENT Signal (Score 7.0+):
All above PLUS:
- In FVG Zone OR Order Block
- Strong delta (✓✓) or extreme (🔥)
- IB Delta confirms direction
### For GOD MODE (Score 8.5+):
All above PLUS:
- Multiple structure confluence (FVG + OB)
- Absorption or sweep present
- IB Momentum strong (🔥)
- **FULL SIZE - DON'T HESITATE**
---
# ⛔ DO NOT TRADE
1. **Score below threshold** - No signal shown = no trade
2. **Outside session** - Unless you've disabled session filter
3. **Delta conflicts** - Bearish candle but buy dominant delta
4. **No intrabar data** - Shows "0 bars" in IB Data
5. **CVD strongly opposite** - 🔥 BEAR on a long signal
6. **After major news** - Wait for dust to settle
7. **Low volume overall** - Market too quiet
---
# 🏆 GOLDEN RULES v8
> **"The score doesn't lie. Trust the math."**
> **"GOD MODE = Don't think, just execute."**
> **"Filtered visuals = Quality over quantity."**
> **"If intrabar conflicts, trust intrabar."**
> **"Session matters - trade when institutions trade."**
> **"Stack confluence - score higher = win more."**
> **"Leave every trade with money. Next setup is coming."**
---
# 📝 TRADE JOURNAL v8
```
DATE: ___________
SESSION: ☐ LDN ☐ NY ☐ PWR
INSTRUMENT: YM / NQ / ES / GC / BTC
TRADE:
├── Time: _______
├── Signal: ⚡GOD / S🎯 / A🎯 / B🎯 / Z
├── Direction: LONG / SHORT
├── SCORE: ___/10
├── Classification: GOD MODE / EXCELLENT / MEDIUM / WEAK
│
├── Entry: _______
├── Stop: _______
├── Target: _______
│
├── In FVG Zone: ☐ Yes ☐ No
├── In Order Block: ☐ Yes ☐ No
├── Liquidity Sweep: ☐ Yes ☐ No
├── Absorption: ☐ Yes ☐ No
│
├── IB Delta: ____% (BULL / BEAR / NEUTRAL)
├── IB Momentum: ____% (BULL / BEAR / MIXED)
├── CVD: 🔥 / ↑↓ / neutral
│
├── Result: +/- ___ pts ($_____)
└── Notes: _______________________
DAILY SUMMARY:
├── Total Trades: ___
├── GOD MODE signals: ___
├── EXCELLENT signals: ___
├── Win Rate: ___%
├── Net P/L: $_____
└── Best score today: ___
```
---
# 🔧 TROUBLESHOOTING
| Issue | Solution |
|-------|----------|
| **Yellow "INVALID TF" warning** | Your intrabar TF is >= chart TF. Select LOWER! |
| **IB Data shows "⚠️ INVALID TF"** | Same as above - pick 1T, 1S, or 1 for most charts |
| No signals appearing | Lower Min Score threshold |
| Too many signals | Raise Min Score threshold |
| Score always 0 | Check if candle is tiered (meets point threshold) |
| Sweeps not showing | Check quality filter settings or lower threshold |
| Table transparent | ❌ Fixed in v8 - table is now solid |
| CVD not making sense | Now resets at session open - cleaner readings |
| Wrong tier thresholds | Adjust for your instrument (see setup guide) |
| Tick TF not available | Requires TradingView Premium+ subscription |
---
# 📚 VERSION HISTORY
## v8 - WIN AT ALL COST EDITION
- ✅ REBUILT scoring system (100% additive, no gating)
- ✅ SOLID table (no transparency)
- ✅ ALL TradingView timeframes for intrabar (1S to Monthly)
- ✅ FILTERED sweeps/absorption (quality-based)
- ✅ FIXED CVD (session reset, proper slope)
- ✅ GOD MODE classification (8.5+ score)
- ✅ Instrument-specific documentation
## v7 - Intrabar Edition
- Added intrabar analysis engine
- Added absorption detection
- Added internal sweep detection
## Previous Versions
- GRA v5 SNIPER + DeepFlow Zones SNIPER merged
---
*© Alexandro Disla - YM Ultimate SNIPER v8*
*WIN AT ALL COST Edition | Trust The Score*
YM Ultimate SNIPER v8# YM Ultimate SNIPER v8 - Complete Documentation
## 🎯 WIN AT ALL COST EDITION
### FIXED: Scoring System + Solid Table + All Timeframes + Filtered Visuals
**TARGET: 3-7 High-Confluence Trades per Day**
**Philosophy: "Zones That Matter" + "See Inside The Candle"**
---
# 📋 QUICK START CHEATSHEET
## ⚡ 60-SECOND SETUP
### Step 1: Add to Chart
1. Open TradingView → Indicators → Pine Editor
2. Paste the v8 code → Save → Add to Chart
3. Use 5-minute chart for day trading
### Step 2: Verify Settings (YM Default)
```
TIER THRESHOLDS:
├── S-Tier: 50 points (institutional sweep)
├── A-Tier: 25 point# YM Ultimate SNIPER v8 - Complete Documentation
## 🎯 WIN AT ALL COST EDITION
### FIXED: Scoring System + Solid Table + All Timeframes + Filtered Visuals
**TARGET: 3-7 High-Confluence Trades per Day**
**Philosophy: "Zones That Matter" + "See Inside The Candle"**
---
# 📋 QUICK START CHEATSHEET
## ⚡ 60-SECOND SETUP
### Step 1: Add to Chart
1. Open TradingView → Indicators → Pine Editor
2. Paste the v8 code → Save → Add to Chart
3. Use 5-minute chart for day trading
### Step 2: Verify Settings (YM Default)
```
TIER THRESHOLDS:
├── S-Tier: 50 points (institutional sweep)
├── A-Tier: 25 points (strong momentum)
└── B-Tier: 12 points (quick scalp)
INTRABAR: 1-minute (most precise)
SESSIONS: NY Window (0930-1130) ← Primary focus
```
### Step 3: Look for These Signals
```
⚡GOD = GOD MODE (9.0+ score) → TAKE IT NOW, full size
S🎯 = S-Tier HOLD → 2.5-3.5 R:R target
A🎯 = A-Tier SWING → 2.0-2.5 R:R target
B🎯 = B-Tier SCALP → 1.5-2.0 R:R target
Z = Zone entry (no tier but quality zone)
LS↑/↓ = Liquidity Sweep (filtered for quality)
✕ = Absorption (filtered for quality)
```
---
# 🔥 THE SCORE SYSTEM (v8 REBUILT)
## How It Works Now
The score is **100% ADDITIVE** - no more gating. Every factor adds points:
| Category | Factor | Points |
|----------|--------|--------|
| **TIER** | S-Tier | +3.0 |
| | A-Tier | +2.0 |
| | B-Tier | +1.0 |
| **ZONES** | In FVG Zone | +1.5 |
| | In Order Block | +1.5 |
| | In IFVG | +1.0 |
| **VOLUME** | Meets minimum (1.5x) | +0.5 |
| | Strong (2.0x) | +0.75 |
| | Extreme (2.5x) | +0.75 |
| **DELTA** | Buy/Sell dominant (60%+) | +1.0 |
| | Strong (70%+) | +0.5 |
| | Extreme (78%+) | +0.5 |
| **CVD** | Bullish/Bearish | +0.5 |
| | Strong momentum | +0.5 |
| | Extreme momentum | +0.5 |
| **CANDLE** | Strong body (60%+) | +0.5 |
| | Significant range (1.2x avg) | +0.5 |
| | Clean wicks | +0.5 |
| **SWEEP** | Recent sweep (within 3 bars) | +1.5 |
| | Current bar sweep | +0.5 |
| **SESSION** | In key session | +1.0 |
| **INTRABAR** | IB Delta dominant | +1.0 |
| | IB Delta strong | +0.5 |
| | IB Delta extreme | +0.5 |
| | IB Momentum confirmed | +0.5 |
| | IB Momentum strong | +0.5 |
| | Absorption detected | +1.0 |
| | Internal sweep | +0.5 |
| | Volume cluster (favorable) | +0.5 |
**Max Raw Score: ~22 points → Normalized to 10**
## Score Classifications
| Score | Classification | Action | Size |
|-------|---------------|--------|------|
| **9.0-10** | ⚡ GOD MODE | TAKE IT NOW | Full position |
| **8.0-8.9** | ⭐ EXCELLENT | High priority | 75-100% size |
| **5.0-7.9** | 🟡 MEDIUM | Standard setup | 50-75% size |
| **<5.0** | ❌ NO SIGNAL | No trade | — |
---
# 📊 INSTRUMENT-SPECIFIC SETUP
## YM (Dow Jones Mini) - DEFAULT
```
TIER THRESHOLDS:
├── S-Tier: 50 points
├── A-Tier: 25 points
└── B-Tier: 12 points
TICK VALUE: 1.00 (1 tick = 1 point)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute) OR 100T (tick for Premium+)
├── Sessions: NY Open (9:30-11:30)
└── Stop: 2 ticks below signal candle low
PRO TIP: Use 100T or 250T tick intrabar for true order flow
```
## NQ (Nasdaq Mini)
```
TIER THRESHOLDS:
├── S-Tier: 100 points
├── A-Tier: 50 points
└── B-Tier: 25 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $5 per point ($20 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Min Volume Ratio: 1.8 (more volatile)
├── Delta Threshold: 0.62 (stricter)
└── Sessions: NY Open + Power Hour
```
## GC (Gold)
```
TIER THRESHOLDS:
├── S-Tier: 20 points (=$200)
├── A-Tier: 10 points (=$100)
└── B-Tier: 5 points (=$50)
TICK VALUE: 0.10 (10 ticks = 1 point)
CONTRACT VALUE: $10 per point ($1 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: London + NY overlap
├── Min Volume Ratio: 1.5
└── Note: More responsive to geopolitical events
```
## BTC (Bitcoin Futures)
```
TIER THRESHOLDS:
├── S-Tier: 500 points
├── A-Tier: 250 points
└── B-Tier: 100 points
TICK VALUE: 5.00 (1 tick = 5 points)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 15-minute (less noise)
├── Intrabar TF: 5 (5-minute)
├── Sessions: Consider 24/7 (disable session filter)
├── Min Volume Ratio: 2.0 (crypto is spiky)
├── Absorption Threshold: 0.70 (stricter)
└── Note: Higher volatility, use wider stops
```
## ES (S&P 500 Mini)
```
TIER THRESHOLDS:
├── S-Tier: 20 points
├── A-Tier: 10 points
└── B-Tier: 5 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $12.50 per point ($50 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: NY Open (primary)
├── Note: Most liquid, cleanest price action
└── Good for learning the system
```
---
# 🕐 INTRABAR TIMEFRAME GUIDE
## Available Timeframes (v8 COMPLETE!)
### TICK TIMEFRAMES (Premium+ Required)
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Tick | 1T | **ULTIMATE PRECISION** - every single trade |
| 5 Ticks | 5T | Ultra-precise scalping |
| 10 Ticks | 10T | High-frequency analysis |
| 25 Ticks | 25T | Tick scalping |
| 50 Ticks | 50T | Short-term tick analysis |
| 100 Ticks | 100T | Standard tick analysis |
| 250 Ticks | 250T | Medium tick grouping |
| 500 Ticks | 500T | Larger tick grouping |
| 1000 Ticks | 1000T | High-level tick view |
### SECOND TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Second | 1S | Ultra-scalping |
| 5 Seconds | 5S | Scalping, high-frequency |
| 10 Seconds | 10S | Fast scalping |
| 15 Seconds | 15S | Quick scalps |
| 30 Seconds | 30S | Short-term scalps |
### MINUTE TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Minute | 1 | **RECOMMENDED** for 5m charts |
| 2 Minutes | 2 | 10m charts |
| 3 Minutes | 3 | 15m charts |
| 5 Minutes | 5 | 15-30m charts |
| 10 Minutes | 10 | 30m-1h charts |
| 15 Minutes | 15 | 1h charts |
| 30 Minutes | 30 | 1-2h charts |
| 45 Minutes | 45 | 2-4h charts |
| 1 Hour | 60 | 4h charts |
| 2 Hours | 120 | Daily charts |
| 3 Hours | 180 | Daily charts |
| 4 Hours | 240 | Weekly charts |
### HIGHER TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| Daily | D | Weekly/Monthly charts |
| Weekly | W | Monthly charts |
| Monthly | M | Long-term analysis |
## 🔥 TICK DATA ADVANTAGE
**Why Use Tick Data?**
- **True Order Flow**: See every single transaction
- **No Time Aggregation**: Pure price/volume action
- **Institutional Footprint**: Catch block trades instantly
- **Maximum IB Precision**: Most accurate delta/momentum
**Best Tick Settings by Instrument:**
| Instrument | Chart TF | Recommended Tick IB |
|------------|----------|---------------------|
| YM | 5 min | 100T or 250T |
| NQ | 5 min | 50T or 100T (more liquid) |
| ES | 5 min | 50T or 100T (most liquid) |
| GC | 5 min | 100T or 250T |
| BTC | 15 min | 250T or 500T |
## ⚠️ CRITICAL RULE
**Intrabar TF MUST be LOWER than your chart TF!**
### Automatic Validation (v8 NEW!)
The script now automatically detects invalid intrabar configurations:
**When Intrabar TF is INVALID:**
1. **Yellow warning label** appears on chart: "⚠️ INTRABAR TF INVALID"
2. **Table shows**: "IB Data: ⚠️ INVALID TF" with yellow background
3. **Alert available**: "⚠️ INTRABAR CONFIG ERROR"
4. **Score impact**: Intrabar points (up to 5) are NOT added
**Example - 2 Minute Chart:**
```
VALID selections: 1T, 5T, 10T, 25T, 50T, 100T (any tick)
1S, 5S, 10S, 15S, 30S (any second)
1 (1-minute only)
INVALID selections: 2, 3, 5, 10, 15... (2min or higher)
D, W, M (obviously)
```
| Your Chart | Valid Intrabar Options |
|------------|------------------------|
| **2 minute** | **1T-1000T, 1S-30S, 1 only** |
| 5 minute | 1T-1000T, 1S-30S, 1-4 min |
| 15 minute | 1T-1000T, 1S-30S, 1-10 min |
| 1 hour | 1T-1000T, 1S-30S, 1-45 min |
| 4 hour | 1T-1000T, 1S-30S, 1-180 min |
| Daily | All tick, seconds, minutes up to 240 |
---
# 🎨 VISUAL FILTERING (v8 NEW!)
## The Problem (v7)
Too many sweep and absorption markers cluttered the chart with low-quality signals.
## The Solution (v8)
**Quality filters** - only show sweeps/absorption that MATTER.
### Sweep Quality Score
A sweep needs confluence to display:
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Strong volume
+0.5 = In session
+1.0 = Intrabar confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Absorption Quality Score
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Tier signal present
+0.5 = In session
+0.5 = CVD confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Settings
```
VISUAL FILTERS:
├── Only Show Quality Sweeps: ON (default)
├── Only Show Quality Absorption: ON (default)
├── Min Sweep Quality Score: 2.0
└── Min Absorption Quality Score: 2.0
Turn OFF filters to see ALL signals (not recommended)
```
---
# 📈 CVD IMPLEMENTATION (v8 FIXED)
## What Changed
### v7 Issues:
- CVD accumulated forever (overflow risk)
- Short slope calculation (only 3 bars)
- No session reset
### v8 Fixes:
```
1. SESSION RESET: CVD resets at London/NY open
2. PROPER SLOPE: Calculated over 5 bars
3. STDEV COMPARISON: Strong/Extreme = slope > 1-2 stdev
```
## CVD Readings in Table
| Display | Meaning | Score Contribution |
|---------|---------|-------------------|
| 🔥 BULL | Extreme bullish momentum | +1.5 total |
| 🔥 BEAR | Extreme bearish momentum | +1.5 total |
| ↑ BULL | Strong bullish trend | +1.0 total |
| ↓ BEAR | Strong bearish trend | +1.0 total |
| bull | Bullish bias | +0.5 |
| bear | Bearish bias | +0.5 |
| — | Neutral/mixed | +0 |
---
# ✅ ENTRY CHECKLIST v8
## Quick Checklist (Print This!)
### For ANY Signal:
- Score ≥ 3.5 (signal shown)
- Session active (🟢 in table)
- Direction matches bias
### For MEDIUM+ Signal (Score 5.0+):
- Delta matches direction (✓ or better)
- CVD trending with signal
- Volume ≥ 1.5x average
### For EXCELLENT Signal (Score 7.0+):
All above PLUS:
- In FVG Zone OR Order Block
- Strong delta (✓✓) or extreme (🔥)
- IB Delta confirms direction
### For GOD MODE (Score 8.5+):
All above PLUS:
- Multiple structure confluence (FVG + OB)
- Absorption or sweep present
- IB Momentum strong (🔥)
- **FULL SIZE - DON'T HESITATE**
---
# ⛔ DO NOT TRADE
1. **Score below threshold** - No signal shown = no trade
2. **Outside session** - Unless you've disabled session filter
3. **Delta conflicts** - Bearish candle but buy dominant delta
4. **No intrabar data** - Shows "0 bars" in IB Data
5. **CVD strongly opposite** - 🔥 BEAR on a long signal
6. **After major news** - Wait for dust to settle
7. **Low volume overall** - Market too quiet
---
# 🏆 GOLDEN RULES v8
> **"The score doesn't lie. Trust the math."**
> **"GOD MODE = Don't think, just execute."**
> **"Filtered visuals = Quality over quantity."**
> **"If intrabar conflicts, trust intrabar."**
> **"Session matters - trade when institutions trade."**
> **"Stack confluence - score higher = win more."**
> **"Leave every trade with money. Next setup is coming."**
---
# 📝 TRADE JOURNAL v8
```
DATE: ___________
SESSION: ☐ LDN ☐ NY ☐ PWR
INSTRUMENT: YM / NQ / ES / GC / BTC
TRADE:
├── Time: _______
├── Signal: ⚡GOD / S🎯 / A🎯 / B🎯 / Z
├── Direction: LONG / SHORT
├── SCORE: ___/10
├── Classification: GOD MODE / EXCELLENT / MEDIUM / WEAK
│
├── Entry: _______
├── Stop: _______
├── Target: _______
│
├── In FVG Zone: ☐ Yes ☐ No
├── In Order Block: ☐ Yes ☐ No
├── Liquidity Sweep: ☐ Yes ☐ No
├── Absorption: ☐ Yes ☐ No
│
├── IB Delta: ____% (BULL / BEAR / NEUTRAL)
├── IB Momentum: ____% (BULL / BEAR / MIXED)
├── CVD: 🔥 / ↑↓ / neutral
│
├── Result: +/- ___ pts ($_____)
└── Notes: _______________________
DAILY SUMMARY:
├── Total Trades: ___
├── GOD MODE signals: ___
├── EXCELLENT signals: ___
├── Win Rate: ___%
├── Net P/L: $_____
└── Best score today: ___
```
---
# 🔧 TROUBLESHOOTING
| Issue | Solution |
|-------|----------|
| **Yellow "INVALID TF" warning** | Your intrabar TF is >= chart TF. Select LOWER! |
| **IB Data shows "⚠️ INVALID TF"** | Same as above - pick 1T, 1S, or 1 for most charts |
| No signals appearing | Lower Min Score threshold |
| Too many signals | Raise Min Score threshold |
| Score always 0 | Check if candle is tiered (meets point threshold) |
| Sweeps not showing | Check quality filter settings or lower threshold |
| Table transparent | ❌ Fixed in v8 - table is now solid |
| CVD not making sense | Now resets at session open - cleaner readings |
| Wrong tier thresholds | Adjust for your instrument (see setup guide) |
| Tick TF not available | Requires TradingView Premium+ subscription |
---
# 📚 VERSION HISTORY
## v8 - WIN AT ALL COST EDITION
- ✅ REBUILT scoring system (100% additive, no gating)
- ✅ SOLID table (no transparency)
- ✅ ALL TradingView timeframes for intrabar (1S to Monthly)
- ✅ FILTERED sweeps/absorption (quality-based)
- ✅ FIXED CVD (session reset, proper slope)
- ✅ GOD MODE classification (8.5+ score)
- ✅ Instrument-specific documentation
## v7 - Intrabar Edition
- Added intrabar analysis engine
- Added absorption detection
- Added internal sweep detection
## Previous Versions
- GRA v5 SNIPER + DeepFlow Zones SNIPER merged
---
*© Alexandro Disla - YM Ultimate SNIPER v8*
*WIN AT ALL COST Edition | Trust The Score*
s (strong momentum)
└── B-Tier: 12 points (quick scalp)
INTRABAR: 1-minute (most precise)
SESSIONS: NY Window (0930-1130) ← Primary focus
```
### Step 3: Look for These Signals
```
⚡GOD = GOD MODE (9.0+ score) → TAKE IT NOW, full size
S🎯 = S-Tier HOLD → 2.5-3.5 R:R target
A🎯 = A-Tier SWING → 2.0-2.5 R:R target
B🎯 = B-Tier SCALP → 1.5-2.0 R:R target
Z = Zone entry (no tier but quality zone)
LS↑/↓ = Liquidity Sweep (filtered for quality)
✕ = Absorption (filtered for quality)
```
---
# 🔥 THE SCORE SYSTEM (v8 REBUILT)
## How It Works Now
The score is **100% ADDITIVE** - no more gating. Every factor adds points:
| Category | Factor | Points |
|----------|--------|--------|
| **TIER** | S-Tier | +3.0 |
| | A-Tier | +2.0 |
| | B-Tier | +1.0 |
| **ZONES** | In FVG Zone | +1.5 |
| | In Order Block | +1.5 |
| | In IFVG | +1.0 |
| **VOLUME** | Meets minimum (1.5x) | +0.5 |
| | Strong (2.0x) | +0.75 |
| | Extreme (2.5x) | +0.75 |
| **DELTA** | Buy/Sell dominant (60%+) | +1.0 |
| | Strong (70%+) | +0.5 |
| | Extreme (78%+) | +0.5 |
| **CVD** | Bullish/Bearish | +0.5 |
| | Strong momentum | +0.5 |
| | Extreme momentum | +0.5 |
| **CANDLE** | Strong body (60%+) | +0.5 |
| | Significant range (1.2x avg) | +0.5 |
| | Clean wicks | +0.5 |
| **SWEEP** | Recent sweep (within 3 bars) | +1.5 |
| | Current bar sweep | +0.5 |
| **SESSION** | In key session | +1.0 |
| **INTRABAR** | IB Delta dominant | +1.0 |
| | IB Delta strong | +0.5 |
| | IB Delta extreme | +0.5 |
| | IB Momentum confirmed | +0.5 |
| | IB Momentum strong | +0.5 |
| | Absorption detected | +1.0 |
| | Internal sweep | +0.5 |
| | Volume cluster (favorable) | +0.5 |
**Max Raw Score: ~22 points → Normalized to 10**
## Score Classifications
| Score | Classification | Action | Size |
|-------|---------------|--------|------|
| **9.0-10** | ⚡ GOD MODE | TAKE IT NOW | Full position |
| **8.0-8.9** | ⭐ EXCELLENT | High priority | 75-100% size |
| **5.0-7.9** | 🟡 MEDIUM | Standard setup | 50-75% size |
| **<5.0** | ❌ NO SIGNAL | No trade | — |
---
# 📊 INSTRUMENT-SPECIFIC SETUP
## YM (Dow Jones Mini) - DEFAULT
```
TIER THRESHOLDS:
├── S-Tier: 50 points
├── A-Tier: 25 points
└── B-Tier: 12 points
TICK VALUE: 1.00 (1 tick = 1 point)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute) OR 100T (tick for Premium+)
├── Sessions: NY Open (9:30-11:30)
└── Stop: 2 ticks below signal candle low
PRO TIP: Use 100T or 250T tick intrabar for true order flow
```
## NQ (Nasdaq Mini)
```
TIER THRESHOLDS:
├── S-Tier: 100 points
├── A-Tier: 50 points
└── B-Tier: 25 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $5 per point ($20 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Min Volume Ratio: 1.8 (more volatile)
├── Delta Threshold: 0.62 (stricter)
└── Sessions: NY Open + Power Hour
```
## GC (Gold)
```
TIER THRESHOLDS:
├── S-Tier: 20 points (=$200)
├── A-Tier: 10 points (=$100)
└── B-Tier: 5 points (=$50)
TICK VALUE: 0.10 (10 ticks = 1 point)
CONTRACT VALUE: $10 per point ($1 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: London + NY overlap
├── Min Volume Ratio: 1.5
└── Note: More responsive to geopolitical events
```
## BTC (Bitcoin Futures)
```
TIER THRESHOLDS:
├── S-Tier: 500 points
├── A-Tier: 250 points
└── B-Tier: 100 points
TICK VALUE: 5.00 (1 tick = 5 points)
CONTRACT VALUE: $5 per point
RECOMMENDED:
├── Chart: 15-minute (less noise)
├── Intrabar TF: 5 (5-minute)
├── Sessions: Consider 24/7 (disable session filter)
├── Min Volume Ratio: 2.0 (crypto is spiky)
├── Absorption Threshold: 0.70 (stricter)
└── Note: Higher volatility, use wider stops
```
## ES (S&P 500 Mini)
```
TIER THRESHOLDS:
├── S-Tier: 20 points
├── A-Tier: 10 points
└── B-Tier: 5 points
TICK VALUE: 0.25 (4 ticks = 1 point)
CONTRACT VALUE: $12.50 per point ($50 per tick)
RECOMMENDED:
├── Chart: 5-minute
├── Intrabar TF: 1 (1-minute)
├── Sessions: NY Open (primary)
├── Note: Most liquid, cleanest price action
└── Good for learning the system
```
---
# 🕐 INTRABAR TIMEFRAME GUIDE
## Available Timeframes (v8 COMPLETE!)
### TICK TIMEFRAMES (Premium+ Required)
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Tick | 1T | **ULTIMATE PRECISION** - every single trade |
| 5 Ticks | 5T | Ultra-precise scalping |
| 10 Ticks | 10T | High-frequency analysis |
| 25 Ticks | 25T | Tick scalping |
| 50 Ticks | 50T | Short-term tick analysis |
| 100 Ticks | 100T | Standard tick analysis |
| 250 Ticks | 250T | Medium tick grouping |
| 500 Ticks | 500T | Larger tick grouping |
| 1000 Ticks | 1000T | High-level tick view |
### SECOND TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Second | 1S | Ultra-scalping |
| 5 Seconds | 5S | Scalping, high-frequency |
| 10 Seconds | 10S | Fast scalping |
| 15 Seconds | 15S | Quick scalps |
| 30 Seconds | 30S | Short-term scalps |
### MINUTE TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| 1 Minute | 1 | **RECOMMENDED** for 5m charts |
| 2 Minutes | 2 | 10m charts |
| 3 Minutes | 3 | 15m charts |
| 5 Minutes | 5 | 15-30m charts |
| 10 Minutes | 10 | 30m-1h charts |
| 15 Minutes | 15 | 1h charts |
| 30 Minutes | 30 | 1-2h charts |
| 45 Minutes | 45 | 2-4h charts |
| 1 Hour | 60 | 4h charts |
| 2 Hours | 120 | Daily charts |
| 3 Hours | 180 | Daily charts |
| 4 Hours | 240 | Weekly charts |
### HIGHER TIMEFRAMES
| Timeframe | Code | Best For |
|-----------|------|----------|
| Daily | D | Weekly/Monthly charts |
| Weekly | W | Monthly charts |
| Monthly | M | Long-term analysis |
## 🔥 TICK DATA ADVANTAGE
**Why Use Tick Data?**
- **True Order Flow**: See every single transaction
- **No Time Aggregation**: Pure price/volume action
- **Institutional Footprint**: Catch block trades instantly
- **Maximum IB Precision**: Most accurate delta/momentum
**Best Tick Settings by Instrument:**
| Instrument | Chart TF | Recommended Tick IB |
|------------|----------|---------------------|
| YM | 5 min | 100T or 250T |
| NQ | 5 min | 50T or 100T (more liquid) |
| ES | 5 min | 50T or 100T (most liquid) |
| GC | 5 min | 100T or 250T |
| BTC | 15 min | 250T or 500T |
## ⚠️ CRITICAL RULE
**Intrabar TF MUST be LOWER than your chart TF!**
### Automatic Validation (v8 NEW!)
The script now automatically detects invalid intrabar configurations:
**When Intrabar TF is INVALID:**
1. **Yellow warning label** appears on chart: "⚠️ INTRABAR TF INVALID"
2. **Table shows**: "IB Data: ⚠️ INVALID TF" with yellow background
3. **Alert available**: "⚠️ INTRABAR CONFIG ERROR"
4. **Score impact**: Intrabar points (up to 5) are NOT added
**Example - 2 Minute Chart:**
```
VALID selections: 1T, 5T, 10T, 25T, 50T, 100T (any tick)
1S, 5S, 10S, 15S, 30S (any second)
1 (1-minute only)
INVALID selections: 2, 3, 5, 10, 15... (2min or higher)
D, W, M (obviously)
```
| Your Chart | Valid Intrabar Options |
|------------|------------------------|
| **2 minute** | **1T-1000T, 1S-30S, 1 only** |
| 5 minute | 1T-1000T, 1S-30S, 1-4 min |
| 15 minute | 1T-1000T, 1S-30S, 1-10 min |
| 1 hour | 1T-1000T, 1S-30S, 1-45 min |
| 4 hour | 1T-1000T, 1S-30S, 1-180 min |
| Daily | All tick, seconds, minutes up to 240 |
---
# 🎨 VISUAL FILTERING (v8 NEW!)
## The Problem (v7)
Too many sweep and absorption markers cluttered the chart with low-quality signals.
## The Solution (v8)
**Quality filters** - only show sweeps/absorption that MATTER.
### Sweep Quality Score
A sweep needs confluence to display:
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Strong volume
+0.5 = In session
+1.0 = Intrabar confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Absorption Quality Score
```
+1.5 = In FVG Zone
+1.5 = In Order Block
+1.0 = Tier signal present
+0.5 = In session
+0.5 = CVD confirmation
───────────────────
MIN NEEDED: 2.0 to show
```
### Settings
```
VISUAL FILTERS:
├── Only Show Quality Sweeps: ON (default)
├── Only Show Quality Absorption: ON (default)
├── Min Sweep Quality Score: 2.0
└── Min Absorption Quality Score: 2.0
Turn OFF filters to see ALL signals (not recommended)
```
---
# 📈 CVD IMPLEMENTATION (v8 FIXED)
## What Changed
### v7 Issues:
- CVD accumulated forever (overflow risk)
- Short slope calculation (only 3 bars)
- No session reset
### v8 Fixes:
```
1. SESSION RESET: CVD resets at London/NY open
2. PROPER SLOPE: Calculated over 5 bars
3. STDEV COMPARISON: Strong/Extreme = slope > 1-2 stdev
```
## CVD Readings in Table
| Display | Meaning | Score Contribution |
|---------|---------|-------------------|
| 🔥 BULL | Extreme bullish momentum | +1.5 total |
| 🔥 BEAR | Extreme bearish momentum | +1.5 total |
| ↑ BULL | Strong bullish trend | +1.0 total |
| ↓ BEAR | Strong bearish trend | +1.0 total |
| bull | Bullish bias | +0.5 |
| bear | Bearish bias | +0.5 |
| — | Neutral/mixed | +0 |
---
# ✅ ENTRY CHECKLIST v8
## Quick Checklist (Print This!)
### For ANY Signal:
- Score ≥ 3.5 (signal shown)
- Session active (🟢 in table)
- Direction matches bias
### For MEDIUM+ Signal (Score 5.0+):
- Delta matches direction (✓ or better)
- CVD trending with signal
- Volume ≥ 1.5x average
### For EXCELLENT Signal (Score 7.0+):
All above PLUS:
- In FVG Zone OR Order Block
- Strong delta (✓✓) or extreme (🔥)
- IB Delta confirms direction
### For GOD MODE (Score 8.5+):
All above PLUS:
- Multiple structure confluence (FVG + OB)
- Absorption or sweep present
- IB Momentum strong (🔥)
- **FULL SIZE - DON'T HESITATE**
---
# ⛔ DO NOT TRADE
1. **Score below threshold** - No signal shown = no trade
2. **Outside session** - Unless you've disabled session filter
3. **Delta conflicts** - Bearish candle but buy dominant delta
4. **No intrabar data** - Shows "0 bars" in IB Data
5. **CVD strongly opposite** - 🔥 BEAR on a long signal
6. **After major news** - Wait for dust to settle
7. **Low volume overall** - Market too quiet
---
# 🏆 GOLDEN RULES v8
> **"The score doesn't lie. Trust the math."**
> **"GOD MODE = Don't think, just execute."**
> **"Filtered visuals = Quality over quantity."**
> **"If intrabar conflicts, trust intrabar."**
> **"Session matters - trade when institutions trade."**
> **"Stack confluence - score higher = win more."**
> **"Leave every trade with money. Next setup is coming."**
---
# 📝 TRADE JOURNAL v8
```
DATE: ___________
SESSION: ☐ LDN ☐ NY ☐ PWR
INSTRUMENT: YM / NQ / ES / GC / BTC
TRADE:
├── Time: _______
├── Signal: ⚡GOD / S🎯 / A🎯 / B🎯 / Z
├── Direction: LONG / SHORT
├── SCORE: ___/10
├── Classification: GOD MODE / EXCELLENT / MEDIUM / WEAK
│
├── Entry: _______
├── Stop: _______
├── Target: _______
│
├── In FVG Zone: ☐ Yes ☐ No
├── In Order Block: ☐ Yes ☐ No
├── Liquidity Sweep: ☐ Yes ☐ No
├── Absorption: ☐ Yes ☐ No
│
├── IB Delta: ____% (BULL / BEAR / NEUTRAL)
├── IB Momentum: ____% (BULL / BEAR / MIXED)
├── CVD: 🔥 / ↑↓ / neutral
│
├── Result: +/- ___ pts ($_____)
└── Notes: _______________________
DAILY SUMMARY:
├── Total Trades: ___
├── GOD MODE signals: ___
├── EXCELLENT signals: ___
├── Win Rate: ___%
├── Net P/L: $_____
└── Best score today: ___
```
---
# 🔧 TROUBLESHOOTING
| Issue | Solution |
|-------|----------|
| **Yellow "INVALID TF" warning** | Your intrabar TF is >= chart TF. Select LOWER! |
| **IB Data shows "⚠️ INVALID TF"** | Same as above - pick 1T, 1S, or 1 for most charts |
| No signals appearing | Lower Min Score threshold |
| Too many signals | Raise Min Score threshold |
| Score always 0 | Check if candle is tiered (meets point threshold) |
| Sweeps not showing | Check quality filter settings or lower threshold |
| Table transparent | ❌ Fixed in v8 - table is now solid |
| CVD not making sense | Now resets at session open - cleaner readings |
| Wrong tier thresholds | Adjust for your instrument (see setup guide) |
| Tick TF not available | Requires TradingView Premium+ subscription |
---
# 📚 VERSION HISTORY
## v8 - WIN AT ALL COST EDITION
- ✅ REBUILT scoring system (100% additive, no gating)
- ✅ SOLID table (no transparency)
- ✅ ALL TradingView timeframes for intrabar (1S to Monthly)
- ✅ FILTERED sweeps/absorption (quality-based)
- ✅ FIXED CVD (session reset, proper slope)
- ✅ GOD MODE classification (8.5+ score)
- ✅ Instrument-specific documentation
## v7 - Intrabar Edition
- Added intrabar analysis engine
- Added absorption detection
- Added internal sweep detection
## Previous Versions
- GRA v5 SNIPER + DeepFlow Zones SNIPER merged
---
*© Alexandro Disla - YM Ultimate SNIPER v8*
*WIN AT ALL COST Edition | Trust The Score*
RSI Median DeviationRSI Median Deviation
Thank you to @QuantumResearch for part of the code and inspiration!
Introduction:
With my first published indicator i wanted to start simple, so i created a RSI that has no static OB/OS signals and can act as a Momentum-Strength-Gauge.
Inspiration came from the Median Deviation Bands indicator by QuantumResearch!
TL;DR:
Traditional RSI says "70 is overbought" like it's a universal law. Guess what: it's not .
This indicator figures out where overbought and oversold actually are for your specific chart and timeframe, using real statistics.
What Makes it Different
Most RSI indicators slap horizontal lines at 70/30 and call it a day. Problem is, that works great... until it doesn't. In a strong trend, RSI can camp out above 70 for weeks. In choppy markets, it'll ping-pong across those levels.
RSI Median Deviation takes a smarter approach:
1. Adaptive zones that move with your data
2. Median + standard deviation bands (the 50th percentile ±2σ) that show where RSI is statistically extreme
3. Rare signals that actually mean something
4. Optional smoothed bands that adapt to current market conditions in real-time
Think of it like this: instead of asking "is RSI above 70?", we're asking "is RSI acting weird compared to its recent behavior?"
Key Features
- Statistical bands built from the RSI's actual median and standard deviation
- Multiple MA options (TEMA, WMA, HMA, ALMA, etc.) for smoothing.
- Dual detection modes: Pure stats OR MA bands
- Background highlighting when something genuinely extreme happens
- Diamond markers for ultra-rare RSI readings (<25 or >85)
- 9 color themes
- Works on all timeframes
How to Actually Use This Thing
1. Trend Bias
RSI line turns green above 60 (bullish bias), red below 47 (bearish bias).
2. Mean-Reversion Plays
Dark green background = RSI dropped below the lower 2σ band → statistically oversold
Dark magenta background = RSI spiked above the upper 2σ band → statistically overbought
3. Momentum Strength Gauge
Watch the distance between the smoothed RSI and the median line:
Wide gap = strong trend in play
Converging = momentum dying, consolidation likely
4. Extra Confirmation
Those diamond shapes at the top/bottom? That's RSI hitting <25 or >85 – genuinely extreme territory.
Recommended Settings:
RSI Length: 10
Median Length: 28
SD Length: 27
RSI MA Type: TEMA
RSI MA Length: 27
Band MA Type: WMA
Band Length: 37
The standard settings are optimized to have maximum use on all assets.
Works on everything, especially on daily or 4h charts for swing/position trading.
Last words:
RSI Median Deviation is the version that only gives signals if the ROC of your data is on the extreme side.
It'll give you fewer, better signals based on what's actually happening in the markets.
Perfect for traders who'd rather have quality over quantity.
LibTmFrLibrary "LibTmFr"
This is a utility library for handling timeframes and
multi-timeframe (MTF) analysis in Pine Script. It provides a
collection of functions designed to handle common tasks related
to period detection, session alignment, timeframe construction,
and time calculations, forming a foundation for
MTF indicators.
Key Capabilities:
1. **MTF Period Engine:** The library includes functions for
managing higher-timeframe (HTF) periods.
- **Period Detection (`isNewPeriod`):** Detects the first bar
of a given timeframe. It includes custom logic to handle
multi-month and multi-year intervals where
`timeframe.change()` may not be sufficient.
- **Bar Counting (`sinceNewPeriod`):** Counts the number of
bars that have passed in the current HTF period or
returns the final count for a completed historical period.
2. **Automatic Timeframe Selection:** Offers functions for building
a top-down analysis framework:
- **Automatic HTF (`autoHTF`):** Suggests a higher timeframe
(HTF) for broader context based on the current timeframe.
- **Automatic LTF (`autoLTF`):** Suggests an appropriate lower
timeframe (LTF) for granular intra-bar analysis.
3. **Timeframe Manipulation and Comparison:** Includes tools for
working with timeframe strings:
- **Build & Split (`buildTF`, `splitTF`):** Functions to
programmatically construct valid Pine Script timeframe
strings (e.g., "4H") and parse them back into their
numeric and unit components.
- **Comparison (`isHigherTF`, `isActiveTF`, `isLowerTF`):**
A set of functions to check if a given timeframe is
higher, lower, or the same as the script's active timeframe.
- **Multiple Validation (`isMultipleTF`):** Checks if a
higher timeframe is a practical multiple of the current
timeframe. This is based on the assumption that checking
if recent, completed HTF periods contained more than one
bar is a valid proxy for preventing data gaps.
4. **Timestamp Interpolation:** Contains an `interpTimestamp()`
function that calculates an absolute timestamp by
interpolating at a given percentage across a specified
range of bars (e.g., 50% of the way through the last
20 bars), enabling time calculations at a resolution
finer than the chart's native bars.
---
**DISCLAIMER**
This library is provided "AS IS" and for informational and
educational purposes only. It does not constitute financial,
investment, or trading advice.
The author assumes no liability for any errors, inaccuracies,
or omissions in the code. Using this library to build
trading indicators or strategies is entirely at your own risk.
As a developer using this library, you are solely responsible
for the rigorous testing, validation, and performance of any
scripts you create based on these functions. The author shall
not be held liable for any financial losses incurred directly
or indirectly from the use of this library or any scripts
derived from it.
buildTF(quantity, unit)
Builds a Pine Script timeframe string from a numeric quantity and a unit enum.
The resulting string can be used with `request.security()` or `input.timeframe`.
Parameters:
quantity (int) : series int Number to specifie how many `unit` the timeframe spans.
unit (series TFUnit) : series TFUnit The size category for the bars.
Returns: series string A Pine-style timeframe identifier, e.g.
"5S" → 5-seconds bars
"30" → 30-minute bars
"120" → 2-hour bars
"1D" → daily bars
"3M" → 3-month bars
"24M" → 2-year bars
splitTF(tf)
Splits a Pine‑timeframe identifier into numeric quantity and unit (TFUnit).
Parameters:
tf (string) : series string Timeframe string, e.g.
"5S", "30", "120", "1D", "3M", "24M".
Returns:
quantity series int The numeric value of the timeframe (e.g., 15 for "15", 3 for "3M").
unit series TFUnit The unit of the timeframe (e.g., TFUnit.minutes, TFUnit.months).
Notes on strings without a suffix:
• Pure digits are minutes; if divisible by 60, they are treated as hours.
• An "M" suffix is months; if divisible by 12, it is converted to years.
autoHTF(tf)
Picks an appropriate **higher timeframe (HTF)** relative to the selected timeframe.
It steps up along a coarse ladder to produce sensible jumps for top‑down analysis.
Mapping → chosen HTF:
≤ 1 min → 60 (1h) ≈ ×60
≤ 3 min → 180 (3h) ≈ ×60
≤ 5 min → 240 (4h) ≈ ×48
≤ 15 min → D (1 day) ≈ ×26–×32 (regular session 6.5–8 h)
> 15 min → W (1 week) ≈ ×64–×80 for 30m; varies with input
≤ 1 h → W (1 week) ≈ ×32–×40
≤ 4 h → M (1 month) ≈ ×36–×44 (~22 trading days / month)
> 4 h → 3M (3 months) ≈ ×36–×66 (e.g., 12h→×36–×44; 8h→×53–×66)
≤ 1 day → 3M (3 months) ≈ ×60–×66 (~20–22 trading days / month)
> 1 day → 12M (1 year) ≈ ×(252–264)/quantity
≤ 1 week → 12M (1 year) ≈ ×52
> 1 week → 48M (4 years) ≈ ×(208)/quantity
= 1 M → 48M (4 years) ≈ ×48
> 1 M → error ("HTF too big")
any → error ("HTF too big")
Notes:
• Inputs in months or years are restricted: only 1M is allowed; larger months/any years throw.
• Returns a Pine timeframe string usable in `request.security()` and `input.timeframe`.
Parameters:
tf (string) : series string Selected timeframe (e.g., "D", "240", or `timeframe.period`).
Returns: series string Suggested higher timeframe.
autoLTF(tf)
Selects an appropriate **lower timeframe LTF)** for intra‑bar evaluation
based on the selected timeframe. The goal is to keep intra‑bar
loops performant while providing enough granularity.
Mapping → chosen LTF:
≤ 1 min → 1S ≈ ×60
≤ 5 min → 5S ≈ ×60
≤ 15 min → 15S ≈ ×60
≤ 30 min → 30S ≈ ×60
> 30 min → 60S (1m) ≈ ×31–×59 (for 31–59 minute charts)
≤ 1 h → 1 (1m) ≈ ×60
≤ 2 h → 2 (2m) ≈ ×60
≤ 4 h → 5 (5m) ≈ ×48
> 4 h → 15 (15m) ≈ ×24–×48 (e.g., 6h→×24, 8h→×32, 12h→×48)
≤ 1 day → 15 (15m) ≈ ×26–×32 (regular sessions ~6.5–8h)
> 1 day → 60 (60m) ≈ ×(26–32) per day × quantity
≤ 1 week → 60 (60m) ≈ ×32–×40 (≈5 sessions of ~6.5–8h)
> 1 week → 240 (4h) ≈ ×(8–10) per week × quantity
≤ 1 M → 240 (4h) ≈ ×33–×44 (~20–22 sessions × 6.5–8h / 4h)
≤ 3 M → D (1d) ≈ ×(20–22) per month × quantity
> 3 M → W (1w) ≈ ×(4–5) per month × quantity
≤ 1 Y → W (1w) ≈ ×52
> 1 Y → M (1M) ≈ ×12 per year × quantity
Notes:
• Ratios for D/W/M are given as ranges because they depend on
**regular session length** (typically ~6.5–8h, not 24h).
• Returned strings can be used with `request.security()` and `input.timeframe`.
Parameters:
tf (string) : series string Selected timeframe (e.g., "D", "240", or timeframe.period).
Returns: series string Suggested lower TF to use for intra‑bar work.
isNewPeriod(tf, offset)
Returns `true` when a new session-aligned period begins, or on the Nth bar of that period.
Parameters:
tf (string) : series string Target higher timeframe (e.g., "D", "W", "M").
offset (simple int) : simple int 0 → checks for the first bar of the new period.
1+ → checks for the N-th bar of the period.
Returns: series bool `true` if the condition is met.
sinceNewPeriod(tf, offset)
Counts how many bars have passed within a higher timeframe (HTF) period.
For daily, weekly, and monthly resolutions, the period is aligned with the trading session.
Parameters:
tf (string) : series string Target parent timeframe (e.g., "60", "D").
offset (simple int) : simple int 0 → Running count for the current period.
1+ → Finalized count for the Nth most recent *completed* period.
Returns: series int Number of bars.
isHigherTF(tf, main)
Returns `true` when the selected timeframe represents a
higher resolution than the active timeframe.
Parameters:
tf (string) : series string Selected timeframe.
main (bool) : series bool When `true`, the comparison is made against the chart's main timeframe
instead of the script's active timeframe. Optional. Defaults to `false`.
Returns: series bool `true` if `tf` > active TF; otherwise `false`.
isActiveTF(tf, main)
Returns `true` when the selected timeframe represents the
exact resolution of the active timeframe.
Parameters:
tf (string) : series string Selected timeframe.
main (bool) : series bool When `true`, the comparison is made against the chart's main timeframe
instead of the script's active timeframe. Optional. Defaults to `false`.
Returns: series bool `true` if `tf` == active TF; otherwise `false`.
isLowerTF(tf, main)
Returns `true` when the selected timeframe represents a
lower resolution than the active timeframe.
Parameters:
tf (string) : series string Selected timeframe.
main (bool) : series bool When `true`, the comparison is made against the chart's main timeframe
instead of the script's active timeframe. Optional. Defaults to `false`.
Returns: series bool `true` if `tf` < active TF; otherwise `false`.
isMultipleTF(tf)
Returns `true` if the selected timeframe (`tf`) is a practical multiple
of the active skript's timeframe. It verifies this by checking if `tf` is a higher timeframe
that has consistently contained more than one bar of the skript's timeframe in recent periods.
The period detection is session-aware.
Parameters:
tf (string) : series string The higher timeframe to check.
Returns: series bool `true` if `tf` is a practical multiple; otherwise `false`.
interpTimestamp(offStart, offEnd, pct)
Calculates a precise absolute timestamp by interpolating within a bar range based on a percentage.
This version works with RELATIVE bar offsets from the current bar.
Parameters:
offStart (int) : series int The relative offset of the starting bar (e.g., 10 for 10 bars ago).
offEnd (int) : series int The relative offset of the ending bar (e.g., 1 for 1 bar ago). Must be <= offStart.
pct (float) : series float The percentage of the bar range to measure (e.g., 50.5 for 50.5%).
Values are clamped to the range.
Returns: series int The calculated, interpolated absolute Unix timestamp in milliseconds.






















