AMD Visual State Model [POC]# AMD Visual State Model - Quick Start Guide
## 🎯 Goal
Get the indicator running on your TradingView chart in under 5 minutes.
---
## ⚡ 5-Minute Setup
### Step 1: Install (2 minutes)
1. Open (www.tradingview.com)
2. Open any chart (recommend ES1! or NQ1! futures, 1-minute timeframe)
3. Click Pine Editor at bottom of screen
4. Click "New" → "Blank indicator script"
5. Delete all default code
6. Copy/paste entire contents of `amd_complete.pine`
7. Click "Save" → Name it: `AMD Visual State Model`
8. Click "Add to Chart"
### Step 2: First Look (1 minute)
You should now see:
- ✅ Blue/orange boxes (session ranges) - if during Asian/London hours
- ✅ Yellow horizontal lines (liquidity levels) - if after 08:00 NY
- ✅ Gray/orange vertical lines (time markers) - at 09:30 and 10:00 NY
**If nothing appears:** Check that it's a trading day and within session hours.
### Step 3: Settings (2 minutes)
Click indicator name → Settings icon (gear) → Inputs tab
**Verify timezone:**
```
Timezone: America/New_York ✓
```
**Recommended starting values (already defaults):**
```
Sweep Distance (ATR): 1.5 ✓
Displacement ATR: 2.0 ✓
FVG Min Size: 0.5 ✓
Entry Timeout: 60 minutes ✓
Max Entries Per Day: 1 ✓
```
**Visual settings:**
- Enable all checkboxes (Show Session Ranges, Show Liquidity Levels, etc.)
- Adjust opacity if chart is too cluttered (default 90 is good)
**Alert settings:**
- Enable all 5 alert types
- You'll set up actual alerts in Step 4
Click "OK"
---
## 🔔 Setting Up Alerts (3 minutes)
### Critical Alert: Entry Allowed
1. Click indicator name on chart
2. Click "⋮" (three dots) → "Add alert on AMD Visual State Model"
3. **Condition:** "Any alert() function call" OR specific "Entry Allowed" message
4. **Alert name:** "AMD Entry Signal - "
5. **Options:**
- Trigger: "Once Per Bar Close" ✓
- Expiration: "Open-ended" ✓
6. **Notifications:**
- ✓ Notify on app
- ✓ Show popup
- ✓ Send email (optional)
- ✓ Webhook URL (if using automation - leave blank for now)
7. Click "Create"
### Optional: Set Up All 5 Alerts
Repeat above for each alert type:
1. Manipulation Detected
2. Distribution Confirmed
3. FVG Formed
4. Price in Entry Zone
5. Entry Allowed ⭐ (most critical)
---
## 📊 First Day Usage
### Pre-Market (Before 09:30 NY)
**Action:** None - just ensure indicator is on chart
### Asian Session (18:00-02:00 NY)
**What to expect:**
- Blue box appears showing Asian high/low range
- This happens automatically
**Action:** None required
### London Session (03:00-08:00 NY)
**What to expect:**
- Orange box appears showing London high/low range
- At 08:00, yellow lines appear = liquidity levels
- State advances to ACCUMULATION_READY
**Action:** None required - just observation
### NY Open (09:30 NY)
**What to expect:**
- Gray vertical line appears
- State is still ACCUMULATION_READY
**Action:** Get ready to watch
### Decision Point (10:00 NY) ⭐
**What to expect:**
- Orange vertical line appears
- State advances to MANIPULATION_ARMED
- Now watching for liquidity sweep
**Action:** Active monitoring begins
### 10:00-11:00 (The Trading Window)
**Watch for this sequence:**
#### 1. 🔼/🔽 MANIPULATION LABEL
- Price sweeps liquidity level (high or low)
- Reverses quickly
- Label appears: "🔼 BULLISH SWEEP" or "🔽 BEARISH SWEEP"
- Alert fires: "Manipulation Detected"
**What this means:** Setup is activating. Direction is determined.
#### 2. ⚡ DISPLACEMENT LABEL
- Large candle appears in direction opposite the sweep
- Label: "⚡ DISPLACEMENT"
- State: DISTRIBUTION_ARMED
**What this means:** Institutional involvement confirmed.
#### 3. 📊 STRUCTURE SHIFT LABEL
- Price breaks swing high (bullish) or swing low (bearish)
- Label: "📊 STRUCTURE SHIFT"
- Alert fires: "Distribution Confirmed"
**What this means:** Trend change confirmed. Watch for entry zone.
#### 4. FVG BOX APPEARS
- Green box (bullish) or red box (bearish)
- Shows "gap" in price where imbalance occurred
- Alert fires: "FVG Formed"
**What this means:** Entry zone identified. Wait for price to retrace.
#### 5. 🎯 ENTRY SIGNAL
- Price touches/enters FVG zone
- Big label appears: "🎯 LONG ENTRY" or "🎯 SHORT ENTRY"
- Alert fires: "ENTRY ALLOWED" ⭐
**What this means:** ALL CONDITIONS MET. Execute trade.
---
## 💡 Your First Trade (Paper Trading Recommended)
### When Entry Signal Appears:
**For LONG Entry (Bullish Sweep):**
```
Entry: Current price (in FVG zone)
Stop Loss: Below manipulation low
Take Profit: 1.5-2x risk
```
**For SHORT Entry (Bearish Sweep):**
```
Entry: Current price (in FVG zone)
Stop Loss: Above manipulation high
Take Profit: 1.5-2x risk
```
### Example Trade (Bullish)
```
Manipulation low: 4845.00
Entry price: 4850.00 (in FVG)
Stop loss: 4843.00 (2 points below manip low)
Risk: 7 points
Target: 4860.50 (1.5R) or 4871.00 (3R)
```
**Position sizing:**
- Determine $ risk per trade (e.g., $500)
- Calculate: Contracts = $500 / (7 points × $50/point) = 1.4 → round to 1 contract
---
## 🐛 Troubleshooting First Day Issues
### "I don't see any boxes or lines"
**Check:**
1. Is it a trading day? (Not weekend/holiday)
2. Is it within session hours?
3. Are visual settings enabled? (Click indicator → Settings → Inputs → scroll to Visual Settings)
### "I see session boxes but no liquidity levels"
**Reason:** Liquidity levels only appear after sessions complete (after 08:00 NY)
**Solution:** Wait until London session ends
### "I got manipulation alert but no FVG formed"
**Possible reasons:**
1. Distribution phase incomplete (need displacement + structure shift)
2. No valid FVG detected (gap too small)
3. Settings too strict
**Solution:** Enable debug mode to see what's blocking progression
### "Entry signal never appeared"
**Check debug table:**
- Is FVG detected? ✓
- Is price in FVG? (may have missed it)
- Is entry timeout reached? (>60 minutes past 10am)
**Solutions:**
- Increase entry timeout to 90 minutes
- Watch price more closely when FVG forms
---
## 🎓 Learning Mode (First Week)
### Day 1-2: Observation Only
- Watch indicator state progression
- Note when each label appears
- Don't take trades yet - just learn the flow
### Day 3-5: Paper Trading
- Take trades on paper when entry signal appears
- Track outcomes in spreadsheet
- Refine understanding of risk/reward
### Day 6-10: Small Size Live
- If paper results positive, start with 1 micro contract (MES/MNQ)
- Gradually increase as confidence builds
---
## 📈 Success Metrics (First 30 Days)
Track these metrics:
**Setup Quality:**
- Total days with complete AMD cycle: ___ / 20 trading days
- % of cycles that completed: ___% (target: >50%)
**Entry Quality:**
- Total entry signals: ___
- Signals taken: ___
- Win rate: ___% (target: >55%)
**Execution Quality:**
- Average R-multiple: ___ (target: >1.5R)
- Max adverse excursion: ___ (should be < stop distance)
- Max favorable excursion: ___ (should be > 2R minimum)
---
## 🔧 Settings Adjustment After First Week
### If too many false signals:
```
Sweep ATR: 1.5 → 2.0
Displacement ATR: 2.0 → 2.5
FVG Min Size: 0.5 → 0.7
```
### If missing good setups:
```
Sweep ATR: 1.5 → 1.2
Displacement ATR: 2.0 → 1.7
FVG Min Size: 0.5 → 0.4
Entry Timeout: 60 → 90 minutes
```
### If setups never complete:
```
Structure Confirm: 2 → 1 bar
Swing Length: 5 → 3
FVG Lookback: 10 → 15 bars
```
---
## 📱 Mobile Setup (Optional)
1. Download TradingView app
2. Open saved chart with AMD indicator
3. Alerts will push to phone when conditions met
4. Can monitor progression on mobile
**Limitations:**
- Smaller screen (harder to see details)
- Debug table may be hard to read
- Recommend tablet over phone for active monitoring
---
## ✅ Day 1 Checklist
Before market open tomorrow:
- Indicator installed on chart
- Settings verified (timezone, defaults)
- At least "Entry Allowed" alert set up
- Alert notifications working (test with random alert)
- Risk management plan documented
- Position size calculated
- Stop loss strategy defined
- Trading journal ready to log results
---
## 🎯 Key Reminders
1. **One setup per day maximum** (unless max entries increased)
2. **Only trade after 10:00 AM** (decision point)
3. **Wait for entry signal** (don't anticipate)
4. **Stop loss is mandatory** (below/above manipulation level)
5. **If in doubt, sit out** (better to miss setup than lose capital)
---
## 📞 Next Steps
**After first successful setup observed:**
→ Review full documentation (AMD_DOCUMENTATION.md)
**After 10-20 trades:**
→ Analyze results, adjust parameters
**After 60 days with positive results:**
→ Consider strategy version for automation
---
**Good luck with your first AMD setup!**
Remember: The indicator prevents premature entry. Trust the state progression.
Индикаторы и стратегии
Quant Squeeze: Institutional GradeQuant Squeeze: Institutional Grade
This indicator is a comprehensive volatility trading system designed to identify high-probability Breakouts and Reversions using a quantitative scoring engine (0-100). It combines the classic TTM Squeeze logic with Multi-Timeframe (MTF) trend filtering, Statistical Volume analysis, and Linear Momentum.
Key Features:
Institutional Squeeze Logic: Identifies periods where Bollinger Bands (2.0) contract inside Keltner Channels (1.5). This indicates potential energy accumulation.
Quantitative Scoring (0-100): Every signal is graded based on 5 factors: Trend Alignment, Volume Strength, Momentum Delta, Squeeze Duration (Energy), and RSI Context.
MTF Trend Filter: Confirms the current chart signal with a Higher Timeframe (e.g., Daily) trend to filter out fake-outs.
Hybrid Volume Engine:
Sniper Mode (BB): Uses Bollinger Bands on the Volume oscillator to detect statistical anomalies (Best for Crypto/Forex).
Sensitive Mode (SMA): Uses a simpler threshold for low-float or lower liquidity assets.
Kill Zone Protection: Automatically disables "Reversion" signals immediately after a Squeeze fires, preventing trading against a fresh explosion.
Dashboard: A real-time table displays the current Market Phase, Momentum direction, HTF Trend status, and Risk Targets (SL/TP based on ATR).
3. Operational Guide: How to read the chart
The indicator visualizes the market in a 3-Act structure. Follow the colors to understand the market phase.
Phase 1: The Squeeze (Gray Background)
What it means: The market is compressing. Volatility is low, and energy is building up (Accumulation).
Action: WAIT. Do not enter trades here.
Context: Watch the dashboard. The "Energy" of the squeeze increases the longer this phase lasts. Longer squeezes often result in more explosive moves.
Phase 2: The Firing Zone (Purple Background)
What it means: The Squeeze has fired. The bands have expanded, and price is breaking out.
Signals: Look for "BO" (Breakout) labels.
Strategy: This is the primary entry zone for trend-following trades.
BO + High Score (80+): Institutional Grade setup. Strong trend, volume spike, and momentum.
Note: Reversion signals are strictly disabled in this zone to protect you from catching a falling knife.
Phase 3: The Trend Run (Blue Background)
What it means: Volatility has normalized. The price is trending or ranging normally.
Signals: Look for "REV" (Reversion) labels.
Strategy: These are "Pullback" or "Mean Reversion" entries. They are only valid if they align with the trend (or if scoring suggests a high-probability scalp).
Understanding the Score (0-100)
Each signal comes with a numeric score:
65-75: Standard Setup. Good momentum, but perhaps lacking Volume or HTF confirmation.
75-85: Strong Setup. Solid confluence.
85-100: "All-In" Setup. Perfect alignment of Chart Trend, Higher Timeframe Trend, Statistical Volume Spike, and Accelerating Momentum.
Momentum Candle by kakashifx“Displays momentum signals from individual candles to indicate the entry of buyers or sellers. Designed for quick decision-making and effective scalping.”
Taipan's Linear Regression Signals with TPHave fun. You can basically figure out how it works. Works best at finding breakouts and where it returns.
Happy New Year Kalman bands Oscillator🎄 Happy New Year Kalman bands Oscillator 🎆
Kalman bands + william's wix fix + price elasticity
VIXO - VIX Oscillator// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © emreiletrade
//@version=6
indicator(title="VIXO - VIX Oscillator", shorttitle="VIXO", overlay=false)
// === Inputs ===
rsiLen = input.int(defval=14, title="RSI Length", minval=11, maxval=55)
momLen = input.int(defval=11, title="Momentum Length", minval=9, maxval=21)
normLookback = input.int(defval=100, title="Momentum Normalization Lookback", minval=20, maxval=200)
// === Data (OHLC needed) ===
=
request.security("TVC:VIX", timeframe.period, )
// === RSI Oscillator ===
vixRsi = ta.sma(ta.rsi(vixClose, rsiLen), 5)
// === Momentum (ROC) ===
vixMom = ta.roc(vixClose, momLen)
// === Momentum Normalization (0–100, 50 neutral) ===
momMin = ta.lowest(vixMom, normLookback)
momMax = ta.highest(vixMom, normLookback)
vixMomNorm = ta.sma(100 * (vixMom - momMin) / math.max(momMax - momMin, 1e-6), 3)
// === Helpers ===
vixMa = ta.sma(vixClose, 21)
ratio = vixMa != 0.0 ? (vixClose / vixMa) : 0.0
clampedRatio = math.min(math.max(ratio, 0.0), 1.6)
dynamicTransparency = 100.0 - (clampedRatio * 40.0)
dynamicTransparency := math.min(math.max(dynamicTransparency, 0.0), 100.0)
dynamicTransparency := vixHigh < 30 ? 100 : dynamicTransparency
// === Colors ===
color baseColor = close > close ? color.new(#00FF00, 0)
: close < close ? color.new(#FF0080, 0) : color.gray
color vixBarColor = color.new(baseColor, dynamicTransparency)
color pointColor = color.new(baseColor, dynamicTransparency)
// === Levels ===
hline(80, "Panic of Market", color=color.rgb(0, 255, 0, 40))
hline(60, "VIX says BUY", color=color.rgb(0, 255, 0, 70))
hline(50, "Neutral / Momentum Mid", color=color.new(color.gray, 50))
hline(40, "Get Ready", color=color.new(color.gray, 60))
// === Plots ===
plot(vixRsi, title="VIX RSI", color=color.rgb(0, 255, 255), linewidth=2)
plot(vixMomNorm, title="VIX Normalized Momentum", color=color.new(color.gray, 50), linewidth=1)
plot(vixHigh > 50 ? vixHigh : na, title = "High Points", style = plot.style_cross, color = color.new(pointColor,0))
plot(vixHigh, title="VIX Value Bars", style=plot.style_histogram, color=vixBarColor, linewidth=1)
FIBO888 buy sell Fib (V4 -)Fibonacci Levels, Code Names, Usage Strategies, Colors
78.6% (fib_786_buy) 💰 Buy Trap (78.6%) A very important entry point (Buy Trap). Considered the deepest level of the consolidation before the uptrend continues. Blue
61.8% (fib_618_buy) 💰 Buy Trap (61.8%) The most common entry point (Buy Trap). When the price consolidates in an uptrend: Green
50.0% 50.00% Mid-trend consolidation level. Yellow
127.2% (fib_1272_sell) 🎯 127.2% target (sell trap) Profit target (Target/Sell Trap) for uptrend trading after the price breaks through the previous High. Orange
161.8% (fib_1618_sell) 🎯 161.8% target (sell trap) Profit target (Target/Sell Trap) The most important and popular for Fibonacci extensions. Red
I created this indicator to help traders who know nothing about trading. It might be worthless if you don't use it. Only 200 baht for this amazing indicator.
4H candle high/low4h first candle of the week. Support/ Resistance. When price go to 4h candle we can use it for support or resitance. Don't trade only with this. This is extra for your setups. If price go in 4h first week candle you can watch for setups on lower time frame like 15m.
Easy Risk Calculator with FeesThis Pine Script creates a position sizing calculator for TradingView that helps traders understand the true cost and risk of a trade when accounting for exchange fees. Here's what it does:
Core Purpose
The script calculates the actual position size, costs, and risk for a trade based on a minimum position value in USDT, while factoring in trading fees that affect both entry and exit prices.
Key Calculations
Position Size Determination:
Takes a desired position value in USDT and adjusts for fees
For longs: divides by entry price × (1 + fee) since you pay fees when buying
For shorts: divides by entry price × (1 - fee) since you receive less when shorting
Risk Analysis:
Calculates the reverse risk - determining how much you'd actually lose based on your position size, rather than starting with a target risk amount
Computes effective entry/exit values - the true USDT value after accounting for fees on both sides of the trade
Expected loss shows the actual dollar amount you'd lose if your stop loss is hit
Risk deviation reveals the percentage difference between your expected loss and calculated risk amount
Visual Output
The script displays a table on the chart showing:
Trade direction (LONG/SHORT with color coding)
Entry price and stop loss levels
Fee percentage used
Position size in both USDT and units of the asset
Effective entry and exit values (after fees)
Expected loss if stopped out
Deviation from target risk
Calculated risk amount in USDT
This tool is particularly useful for traders who need to work with minimum position sizes on exchanges and want to understand exactly how fees impact their actual risk exposure.Claude is AI and can make mistakes. Please double-check responses. Sonnet 4.5Claude is AI and can make mistakes. Please double-check responses.
SMC Market Structure (HH/HL/LH/LL + BOS/CHoCH/MSS)SMC Market Structure (HH/HL/LH/LL + BOS/CHoCH/MSS) is a clean price-action / Smart Money Concepts market structure tool designed to automatically identify and label key structural events on the chart:
Swing structure points: HH, HL, LH, LL
Continuation confirmations: BOS (Break of Structure)
Early reversal warnings: CHoCH (Change of Character)
Stronger reversal signals: MSS (Market Structure Shift) using a displacement filter
The script is built to remain visually tidy: it draws simple horizontal structure lines at the broken swing level and prints small abbreviations (BOS / CHoCH / MSS) directly on the chart without cluttering candles or adding heavy panels.
What the Indicator Detects
1) Swing Points (HH / HL / LH / LL)
Swings are detected using confirmed pivots (left/right “Swing length” bars).
HH (Higher High): a swing high above the previous swing high
LH (Lower High): a swing high below the previous swing high
HL (Higher Low): a swing low above the previous swing low
LL (Lower Low): a swing low below the previous swing low
These labels help define the market’s active structure:
Bullish structure: HH + HL sequence
Bearish structure: LL + LH sequence
Range / consolidation: mixed swing progression
2) BOS (Break of Structure) – Trend Continuation
A BOS prints when price breaks the most recent swing level in the direction of the current structure:
In a bullish market state → break above the most recent swing high
In a bearish market state → break below the most recent swing low
This is typically treated as confirmation that the existing trend is continuing.
3) CHoCH (Change of Character) – Early Reversal Signal
A CHoCH prints on the first break against the current structure:
In a bullish market state → break below the most recent swing low
In a bearish market state → break above the most recent swing high
CHoCH is intended as an early warning that the market may be transitioning into a new directional bias.
4) MSS (Market Structure Shift) – Stronger Reversal via Displacement
MSS is treated as a “strong CHoCH” and requires a decisive, displacement-style candle at the break.
To qualify as MSS, the script requires:
A break against structure with a CLOSE break, and
A displacement candle where:
Candle body > ATR × Displacement Multiplier
This helps filter out shallow wicks or minor liquidity grabs and highlights shifts that show stronger participation and momentum.
How the Indicator Draws on the Chart
When a BOS / CHoCH / MSS occurs:
A horizontal line is drawn from the swing point to the break bar at the broken level.
A small abbreviation label (BOS / CHoCH / MSS) is placed either:
In the middle of the line segment, or
On the break bar (selectable)
Swing labels (HH/HL/LH/LL) are optional and can be disabled for a cleaner “event-only” layout.
Inputs & Settings
Swing Length (Pivot Left/Right)
Controls how sensitive the swing detection is.
Lower values (3–5): more structure points, more signals
Higher values (8–14): fewer, cleaner swings (better for higher timeframes)
Break Confirmation (Wick vs Close)
Wick: break triggers when the candle’s wick crosses the swing level
Close: break triggers only when the candle closes beyond the swing level
Many SMC traders prefer Wick for detecting liquidity runs and early breaks, while others prefer Close to reduce false signals.
MSS Displacement Filter
ATR Length: ATR calculation period
Displacement Multiplier: Minimum body size = ATR × multiplier
Higher multiplier = fewer MSS signals, but stronger quality threshold.
Display Toggles
Show/Hide Swing Labels (HH/HL/LH/LL)
Show/Hide BOS, CHoCH, MSS
Optional EQH/EQL labeling (equal highs/lows)
Visual Controls
Bullish / bearish structure colors
Line width / style
Text offset (in ticks) to keep labels neat above/below level
Maximum structure objects to keep on screen (prevents object-limit issues)
Recommended Usage
Trend Following
Use HH/HL or LL/LH progression to define the trend.
Wait for BOS to confirm continuation.
Use BOS levels as:
Bias confirmation
Potential retest zones
Risk reference for stop placement
Reversal / Shift Detection
Identify prevailing structure (bullish or bearish).
Watch for CHoCH as the first sign of a possible reversal.
Treat MSS as a stronger “shift” event (displacement + close break), often suitable for:
Changing directional bias
Switching from pullback trading to reversal continuation setups
Multi-Timeframe Workflow (Common SMC Method)
Higher timeframe (HTF): use swings and BOS to define macro bias
Lower timeframe (LTF): use CHoCH/MSS to time entries and manage risk
Confirm entries with your preferred tools (order blocks, FVGs, liquidity pools, session timing, etc.)
Notes & Limitations
This script uses confirmed pivots, so swing labels appear only after the swing is fully formed (after Swing length bars). This avoids repainting swing points.
BOS/CHoCH/MSS events are derived from the most recent confirmed swing levels.
MSS requires a close break and displacement threshold even if “Wick” breaks are enabled for other events (by design, to keep MSS strict).
Best Settings by Timeframe (General Guide)
Scalping (1–5m): Swing length 3–5, Wick breaks, MSS multiplier 1.2–1.8
Intraday (15m–1h): Swing length 5–8, Wick or Close, MSS multiplier 1.5–2.0
Swing trading (4h–1D): Swing length 8–14, Close breaks, MSS multiplier 1.8–2.5
Adaptive Momentum Oscillator [AMO]# Adaptive Momentum Oscillator
## Description
**What it does:**
AMO measures buying vs selling pressure by weighting price changes with volume. It automatically adjusts smoothing based on market conditions - faster response in trends, more filtering in choppy markets.
**How it works:**
1. Calculates market efficiency (trending vs choppy)
2. Applies adaptive smoothing to volume
3. Measures volume-weighted bullish/bearish momentum
4. Outputs normalized 0-100 oscillator
**How to read:**
- Above 50 = Bullish momentum (blue zone)
- Below 50 = Bearish momentum (red zone)
- Above 60 = Overbought, watch for reversal
- Below 40 = Oversold, watch for bounce
**Signals:**
- ◆ Blue at 50: Bullish shift (potential long entry)
- ◆ Red at 50: Bearish shift (potential short entry)
- ▽ at 75: Overbought warning
- △ at 25: Oversold warning
**Settings:**
- Lookback Period: Lower = more signals, Higher = smoother
- Adaptation Period: Controls efficiency calculation speed
**Use as:** Trend confirmation, entry timing, or exit signals when reaching extreme zones.
[turpsy]MOR-Fractal-Opening RangeThis script combines the Midnight Opening Range and the Fractal identification that I have published individually before. The original authors have been credited too.
The combination helps to reduce multiple indicators on your chart. Also, you can enable or disable the MOR.
Moreso, with the previous separate indicators, the current opening range and historical opening range do not show on 4hr timeframe, in this combined one, I have fixed that. the current opening range shows up to daily and weekly timeframe.
It also shows the 1st presented fair value gap, pivot points are also identified based on the session.
TSI Oscillator [Standalone]TITLE: TSI Oscillator
DESCRIPTION:
📈 TSI OSCILLATOR
A clean True Strength Index with smoothed signal line and OB/OS zones.
🎯 HOW TO USE:
• TSI > 0 = Bullish | TSI < 0 = Bearish
• Above +1.5 = Overbought (look for sells)
• Below -1.5 = Oversold (look for buys)
• TSI crosses signal line = Entry signal
⚙️ SETTINGS:
• TSI Length: 4
• Signal Length: 9
• Smoothing: 0.5
🎨 COLORS:
• Yellow = TSI Line
• White = Signal Line
• Red Zone = Sell Area
• Green Zone = Buy Area
🔔 ALERTS INCLUDED:
• OB/OS alerts
• Zero line cross
• Signal line cross
TAGS: tsi, momentum, oscillator, oversold, overbought, signals
Momentum Wave Projector [Scalping-Algo]
══════════════════════════════════════════════════════════════════════════════
█ OVERVIEW
The Momentum Wave Projector (MWP) is an advanced momentum analysis tool that goes beyond traditional oscillators by projecting potential future momentum paths. While standard indicators only show you where momentum IS, MWP shows you where momentum is LIKELY TO GO.
This indicator combines:
• Adaptive momentum calculation with dynamic trend coloring
• Signal line crossover system for entry/exit timing
• Predictive wave projection using damped harmonic oscillation
• Confidence bands that expand with uncertainty over time
█ HOW IT WORKS
The indicator consists of three main components:
1. MOMENTUM LINE (Cyan/Red)
The core momentum oscillator that measures the speed and magnitude of price changes. The color automatically shifts based on trend direction:
• Cyan = Bullish momentum (above signal line)
• Red = Bearish momentum (below signal line)
2. SIGNAL LINE (Thick Red)
A smoothed average of momentum that acts as a trigger line. Crossovers between momentum and signal generate trading signals.
3. WAVE PROJECTION (Dashed Lines)
The unique feature of this indicator. It projects the probable future path of momentum using:
• Current velocity (how fast momentum is moving)
• Acceleration (is momentum speeding up or slowing down)
• Mean reversion (tendency to return to equilibrium)
• Cycle analysis (historical rhythm of momentum swings)
The projection uses a damped sine wave formula that naturally models how momentum oscillates and eventually returns toward the middle.
█ HOW TO USE
─────────────────────────────
ENTRY SIGNALS - LONG
─────────────────────────────
✓ Momentum crosses ABOVE signal line
✓ Cross occurs in oversold zone (below 30) = STRONG signal
✓ Wave projection is curving upward
✓ Triangle marker appears at bottom of indicator
Example setup:
1. Wait for momentum to drop into oversold zone (<30)
2. Watch for wave projection to start curving up
3. Enter when momentum crosses above signal line
4. Place stop loss below recent swing low
─────────────────────────────
ENTRY SIGNALS - SHORT
─────────────────────────────
✓ Momentum crosses BELOW signal line
✓ Cross occurs in overbought zone (above 70) = STRONG signal
✓ Wave projection is curving downward
✓ Triangle marker appears at top of indicator
Example setup:
1. Wait for momentum to rise into overbought zone (>70)
2. Watch for wave projection to start curving down
3. Enter when momentum crosses below signal line
4. Place stop loss above recent swing high
─────────────────────────────
EXIT SIGNALS
─────────────────────────────
For LONG positions:
• Take profit when momentum reaches projected wave peak
• Exit when momentum enters overbought zone (>70)
• Exit if momentum crosses back below signal line
For SHORT positions:
• Take profit when momentum reaches projected wave trough
• Exit when momentum enters oversold zone (<30)
• Exit if momentum crosses back above signal line
─────────────────────────────
TREND IDENTIFICATION
─────────────────────────────
STRONG UPTREND:
• Momentum stays above signal line consistently
• Momentum holds above 50 level
• Wave projection shows shallow dips that stay above 50
STRONG DOWNTREND:
• Momentum stays below signal line consistently
• Momentum holds below 50 level
• Wave projection shows shallow bounces that stay below 50
RANGING/CHOPPY:
• Momentum oscillates around signal line frequently
• Multiple crossovers in short period
• Wave projection shows full oscillation cycles
REVERSAL WARNING:
• Extreme reading (>80 or <20)
• Wave projection curving opposite to current direction
• Divergence between price and momentum
█ SETTINGS GUIDE
MOMENTUM SETTINGS
• Momentum Length (default: 14)
Lower = more sensitive, more signals, more noise
Higher = smoother, fewer signals, less noise
Recommended: 10-14 for scalping, 14-21 for swing trading
• Source (default: close)
Use 'close' for most cases
Use 'hlc3' for smoother readings
SIGNAL LINE SETTINGS
• Signal Length (default: 20)
Controls how smooth the signal line is
Higher values = slower, more reliable signals
Recommended: 14-21
• Signal Type (default: SMA)
SMA = balanced response
EMA = faster response to recent changes
WMA = weighted toward recent data
RMA = very smooth, slow response
WAVE PROJECTION SETTINGS
• Projection Length (default: 20)
How many bars into the future to project
Longer projections have more uncertainty
• Cycle Estimate (default: 28)
Estimated length of one full momentum cycle
Adjust based on your observed patterns
Tip: Count bars between momentum peaks
• Wave Strength (default: 1.0)
Controls amplitude of projected waves
Increase if your asset has large momentum swings
Decrease for more stable assets
• Show Confidence Bands (default: on)
Displays upper/lower probability envelope
Bands widen over time showing increasing uncertainty
LEVELS
• Overbought (default: 70)
• Oversold (default: 30)
Adjust based on asset volatility
More volatile assets: use 80/20
Less volatile assets: use 70/30
█ BEST PRACTICES
1. TIMEFRAME SELECTION
• Scalping: 1m, 5m, 15m
• Day trading: 15m, 1H
• Swing trading: 4H, Daily
2. COMBINE WITH PRICE ACTION
• Use support/resistance levels for confirmation
• Look for candlestick patterns at signal points
• Check higher timeframe trend direction
3. RISK MANAGEMENT
• Wave projection is probabilistic, NOT guaranteed
• Always use stop losses
• Don't risk more than 1-2% per trade
• Higher confidence when projection aligns with trend
4. AVOID FALSE SIGNALS
• Skip signals during major news events
• Be cautious of signals against the higher timeframe trend
• Wait for candle close before entering
• Look for confluence with other indicators
5. OPTIMAL CONDITIONS
• Best in trending markets with clear cycles
• Works well on liquid assets (major forex, crypto, indices)
• Less reliable during low volume/choppy conditions
█ ALERTS
The indicator includes 6 built-in alerts:
1. Bullish Crossover - Momentum crosses above signal
2. Bearish Crossover - Momentum crosses below signal
3. Strong Buy Signal - Bullish cross from oversold zone
4. Strong Sell Signal - Bearish cross from overbought zone
5. Entering Overbought - Momentum rising above 70
6. Entering Oversold - Momentum falling below 30
To set alerts:
1. Right-click on the indicator
2. Select "Add Alert"
3. Choose your preferred condition
4. Set notification preferences
█ DISCLAIMER
This indicator is for educational and informational purposes only. Past performance does not guarantee future results. Trading involves substantial risk of loss. Always do your own research and consider your financial situation before trading. Use proper risk management and never trade with money you cannot afford to lose.
══════════════════════════════════════════════════════════════════════════════
END OF DESCRIPTION
══════════════════════════════════════════════════════════════════════════════
══════════════════════════════════════════════════════════════════════════════
SHORT DESCRIPTION (For the brief description field)
══════════════════════════════════════════════════════════════════════════════
Advanced momentum oscillator with predictive wave projection. Features adaptive coloring, signal line crossovers, and future momentum path forecasting using damped harmonic oscillation. Includes confidence bands and built-in alerts for scalping and swing trading.
══════════════════════════════════════════════════════════════════════════════
SB - HULL MANifty Options Scalping @ 1 Minute TF
Call Entry - If both MA turns bullish.
Put Entry - If Both MAs turns bearish.
Best results - If both MAs complement each other in the same direction.
Exit Plan - My opinion, If slow MA turns bearish. However one can also plan to exit if any one of the MA turns bearish.
Display - Make your own setting as per your own comfort
Keep this indicator in a separate pane below the chart. It will give clarity view of the chart.
Works well on nifty derivatives @ 1 minute TF , can do well on other instruments too.
ICT Clean CISD & Mitigated MTF FVGs Clean CISD & MTF FVGs
Minimalist Institutional Order Flow Tool
Key Features:
CISD (Change in State of Delivery): Marks the first sign of an order flow shift. Displayed as a clean black line + label (no bulky boxes).
High-Probability FVGs: Scans 15m, 1h, and 4h timeframes for gaps.
Displacement Filter: Only shows "Crucial" gaps. Tiny, insignificant imbalances are automatically filtered out using an ATR threshold.
Auto-Cleaning Logic: Boxes are automatically deleted once price fills or closes through them, keeping your chart 100% clean.
Bull Bear Candle Directional Pressure [FXSMARTLAB]Bull–Bear Candle Directional Pressure is a directional market analysis indicator designed to measure the effective pressure exerted by bullish and bearish candles over a given lookback period.
Rather than focusing on momentum, overbought/oversold conditions, or price velocity, it quantifies who is actually in control of price action: buyers or sellers.
🔹 Core Idea
Markets do not move solely because price changes, but because directional pressure is sustained over time.
This indicator evaluates the relative dominance of bullish versus bearish candles, while deliberately excluding neutral candles from the directional calculation.
By doing so, it isolates active participation from indecision and noise, providing a clearer picture of real directional commitment.
🔹 What the Indicator Measures
Bullish candle pressure → buying-side dominance
Bearish candle pressure → selling-side dominance
Neutral candle participation → indecision, balance, or compression
Bull and Bear percentages are normalized only on directional candles, ensuring that the resulting pressure reflects engaged market activity, not low-conviction movement.
🔹 Reading the Indicator
• Centered Histogram (Primary View)
Represents the Bull–Bear pressure balance
Positive values indicate bullish directional pressure
Negative values indicate bearish directional pressure
Greater amplitude reflects stronger dominance
This view is particularly useful for identifying:
Sustained directional control
Progressive shifts in pressure before price acceleration
Structural weakening of trends
• Alternative Views
Dual-line mode compares Bull and Bear pressure directly
Area mode visualizes dominance over time
An optional Neutral pressure line highlights periods where directional participation fades, often preceding consolidation, range expansion, or regime change.
CME Gap Tracker [captainua]CME Gap Tracker - Advanced Gap Detection & Tracking System
Overview
This indicator provides comprehensive gap detection and tracking capabilities for both consecutive bar gaps and weekly CME trading session gaps. It automatically detects gaps, tracks their fill progress in real-time, provides detailed statistics, and includes backtesting features to validate gap trading strategies. The script is optimized for CME futures trading but works with any instrument, automatically handling ticker conversion between CME futures and spot markets.
Gap Detection Types
Consecutive Bar Gaps:
Detects gaps between any two consecutive bars on the current timeframe. Two detection modes are available:
- High/Low Mode: Detects gaps when current bar's low > previous bar's high (gap up) or current bar's high < previous bar's low (gap down). This is more sensitive and detects more gaps.
- Close/Open Mode: Detects gaps when current bar's open > previous bar's close (gap up) or current bar's open < previous bar's close (gap down). This is more conservative.
Weekly CME Gaps:
Detects gaps between weekly trading sessions, specifically designed for CME futures markets. The script automatically detects the first bar of each new week and compares the current week's open with the previous week's close/high/low. This is particularly useful for tracking weekend gaps in CME futures markets where price can gap significantly between Friday close and Monday open.
Smart Ticker Detection
The script automatically converts between CME futures tickers (e.g., BTC1!, ETH1!) and spot tickers (e.g., BTCUSDT, ETHUSDT). When viewing a CME futures chart, it can automatically detect and use the corresponding spot ticker for gap analysis, and vice versa. This allows traders to:
- View CME futures but track spot market gaps
- View spot markets but track CME futures gaps
- Manually override with custom ticker specification
The ticker validation system uses caching to prevent race conditions during initial script load, ensuring reliable ticker resolution.
Gap Filtering & Tolerance
Static Tolerance:
Set minimum and maximum gap sizes as percentages (default: show only gaps > 0.333% and < 100%). This filters out noise and focuses on significant gaps.
Dynamic Tolerance:
When enabled, tolerance is calculated dynamically based on ATR (Average True Range). The formula: Dynamic Tolerance = (ATR × ATR Multiplier / Close Price) × 100%. This adapts to market volatility - in volatile markets, only larger gaps are shown; in calm markets, smaller gaps are displayed. This is particularly useful for instruments with varying volatility.
Absolute Size Filtering:
In addition to percentage filtering, gaps can be filtered by absolute price size (e.g., show only gaps > $100). This is useful for instruments where percentage alone doesn't capture significance (e.g., high-priced stocks).
Fill Confirmation System
To reduce false gap closure signals, the script requires multiple consecutive bars to confirm gap closure. The default is 2 bars, but can be adjusted from 1-10 bars. Lower values (1) confirm faster but may produce false signals from temporary wicks. Higher values (3-5) reduce false fill signals but delay confirmation. This prevents temporary price spikes from triggering false gap closure alerts.
Gap Fill Tracking
The script tracks gap fill progress in real-time:
- Fill Percentage: How much of the gap has been filled (0-100%)
- Fill Speed: Whether fill is accelerating, decelerating, or constant
- Time to Fill: For closed gaps, how many bars it took to fill
- Fill Status: Unfilled, partially filled, or fully filled
Visual Features
Heatmap Colors:
Gap colors can be adjusted based on gap size, with larger gaps appearing more intense and smaller gaps more faded.
Adaptive Line Width:
Line thickness automatically adjusts based on gap size, making larger gaps more prominent.
Age-Based Coloring:
Gaps can be color-coded by age, with newer gaps appearing brighter and older gaps more faded.
Confluence Zones:
Areas where multiple gaps overlap are highlighted with enhanced visuals, indicating stronger support/resistance zones.
Gap Statistics
A comprehensive statistics table provides:
- Total gaps created, open, and closed
- Fill rates by direction (up vs down) and size category (small, medium, large)
- Average fill time, fastest fill, slowest fill
- Oldest gap and oldest unfilled gap
- Backtesting results: success rate, reversal rate, average move after fill
- CME gap expiration statistics: Gaps expired unfilled (for Weekly CME gaps only)
Statistics can be filtered by period (All Time, Last 100/500/1000/5000 bars) and can be reset via toggle button.
Backtesting
When enabled, the script tracks price movement after gap fills:
- Price after fill: Captures price when gap closes
- Move after fill: Percentage price movement after closure
- Success/Reversal tracking: Determines if price continued in fill direction or reversed
- Success rate: Percentage of gaps where price continued in fill direction
This data helps validate gap trading strategies and understand gap fill behavior.
Gap Re-opening Detection
When enabled, the script detects when a previously filled gap reopens (price gaps back through the filled gap zone). This is useful for identifying when support/resistance levels break and can signal trend reversals.
CME-Specific Features
Monday Opening Volume Analysis:
For Weekly CME gaps detected on Monday openings, the script tracks Monday opening volume relative to average volume. Higher Monday volume ratios indicate stronger gap significance. This ratio is integrated into gap strength calculations and can be displayed in gap labels. Gaps with Monday volume > 1.5x average receive priority score boosts.
CME Gap Expiration Tracking:
Weekly CME gaps that remain unfilled beyond a configurable threshold (default 1000 bars) are automatically marked as "expired" and tracked separately in statistics. This helps identify gaps that act as strong support/resistance levels and never fill. Expired gaps are displayed with special labeling and counted in the "Gaps Expired (CME)" statistic.
CME Gap Priority Scoring Enhancement:
The priority scoring system includes special boosts for CME gaps:
- Monday gaps: +10 points (gaps detected on Monday openings)
- High Monday volume gaps: +15 points (Monday volume ratio > 1.5x average)
- Gaps at key weekly levels: +10 points (gaps aligning with previous week's high, low, or close within 0.5% tolerance)
These enhancements help prioritize the most significant CME gaps for trading decisions.
Custom Gap Zones
Traders can manually mark custom gap zones by specifying top and bottom levels. These zones are tracked like automatically detected gaps, allowing traders to:
- Mark historical gaps that weren't detected
- Create support/resistance zones based on other analysis
- Track specific price levels of interest
Multi-Timeframe Support
The script can detect gaps on higher timeframes simultaneously. For example, when viewing a 1-hour chart, it can also detect and display gaps from the weekly timeframe. This provides multi-timeframe context for gap analysis.
Alert System
Comprehensive alert system with multiple trigger types:
- Gap Creation: Alert when new gaps are detected
- Gap Closure: Alert when gaps are fully filled
- Partial Fill: Alert when gaps reach specific fill percentages (e.g., 25%, 50%, 75%, 90%)
- Approaching Closure: Alert when gaps reach high fill levels (e.g., 90%, 95%) before closing
- Gap Re-opening: Alert when previously filled gaps reopen
Alerts can be filtered to trigger only on Mondays (useful for CME weekly gaps) or any day.
Filtering Options
Gaps can be filtered by:
- Fill Status: Show all, unfilled only, partially filled only, or fully filled only
- Fill Percentage Range: Show gaps within specific fill percentage ranges
- Gap Age: Show only gaps within specific age ranges (bars)
- Gap Expiration: Automatically remove gaps older than specified number of bars (for Weekly CME gaps, uses separate CME expiration threshold)
Performance & Safety
The script includes several safety features:
- Safe array operations to prevent index out-of-bounds errors
- Memory leak prevention through proper visual object cleanup
- Ticker validation caching to prevent race conditions
- Week boundary detection for accurate CME gap identification
- Fill confirmation system to reduce false signals
- Monday opening volume analysis for CME gap strength assessment
- CME gap expiration tracking with configurable thresholds
- Priority scoring enhancement for Monday gaps, high Monday volume, and key weekly levels
Usage Recommendations
For CME Weekly Gaps:
1. Set "Gap Detection Type" to "Weekly CME"
2. View a CME futures chart (e.g., BTC1!) or enable auto-detect spot ticker
3. Set tolerance to filter gap size (default 0.333%)
4. Enable statistics to track fill rates
5. Configure alerts for gap creation/closure
For Consecutive Bar Gaps:
1. Set "Gap Detection Type" to "Consecutive Bars"
2. Choose "High/Low" for more gaps or "Close/Open" for fewer gaps
3. Adjust tolerance based on instrument volatility
4. Enable fill confirmation (2-3 bars) for more reliable signals
5. Use filtering to focus on specific gap types
For Gap Trading Strategies:
1. Enable backtesting to validate strategy performance
2. Review statistics to understand gap fill patterns
3. Use confluence zones to identify strong support/resistance
4. Configure alerts for gap events matching your strategy
5. Use custom zones to mark important levels
Technical Details:
• Pine Script v6 | Overlay indicator
• Safe array operations with index validation
• Memory leak prevention through proper object cleanup
• Ticker validation caching for reliable ticker resolution
• Works on all timeframes and instruments
• Comprehensive edge case handling
• Week boundary detection using ta.change(weekofyear)
• Fill confirmation system with configurable bars
For detailed documentation and usage instructions, see the script comments.
Engulfing + EMA + WMA Alejandraseñal de vela engulfing
emas
wma
multiples emas, velas engulfing y vma en un solo indicador
Cosmic Volume Analyzer [JOAT]
Cosmic Volume Analyzer - Astrophysics Edition
Overview
Cosmic Volume Analyzer is an open-source oscillator indicator that applies astrophysics-inspired concepts to volume analysis. It classifies volume into buy/sell categories, calculates volume flow, detects accumulation/distribution phases, identifies climax volume events, and uses gravitational and stellar mass analogies to visualize volume dynamics.
What This Indicator Does
The indicator calculates and displays:
Volume Classification - Categorizes each bar as CLIMAX_BUY, CLIMAX_SELL, HIGH_BUY, HIGH_SELL, NORMAL_BUY, or NORMAL_SELL
Volume Flow - Percentage showing buy vs sell pressure over a lookback period
Buy/Sell Volume - Separated volume based on candle direction
Accumulation/Distribution - Phase detection using Money Flow Multiplier
Volume Oscillator - Fast vs slow volume EMA comparison
Gravitational Pull - Volume-weighted price attraction metric
Stellar Mass Index - Volume ratio combined with price momentum
Black Hole Detection - Identifies extremely low volume periods (liquidity voids)
Supernova Events - Detects extreme volume with extreme price movement
Orbital Cycles - Sine-wave based cyclical visualization
How It Works
Volume classification uses volume ratio and candle direction:
classifyVolume(series float vol, series float close, series float open) =>
float avgVol = ta.sma(vol, 20)
float volRatio = avgVol > 0 ? vol / avgVol : 1.0
if volRatio > 1.5
if close > open
classification := "CLIMAX_BUY"
else
classification := "CLIMAX_SELL"
else if volRatio > 1.2
// HIGH_BUY or HIGH_SELL
else
// NORMAL_BUY or NORMAL_SELL
Volume flow separates buy and sell volume over a period:
calculateVolumeFlow(series float vol, series float close, simple int period) =>
float currentBuyVol = close > open ? vol : 0.0
float currentSellVol = close < open ? vol : 0.0
// Accumulate in buffers
float flow = (buyVolume - sellVolume) / totalVol * 100
Accumulation/Distribution uses the Money Flow Multiplier:
float mfm = ((close - low) - (high - close)) / (high - low)
float mfv = mfm * vol
float adLine = ta.cum(mfv)
if adLine > adEMA and ta.rising(adLine, 3)
phase := "ACCUMULATION"
else if adLine < adEMA and ta.falling(adLine, 3)
phase := "DISTRIBUTION"
Gravitational pull uses volume-weighted price distance:
gravitationalPull(series float vol, series float price, simple int period) =>
float massCenter = ta.vwma(price, period)
float distance = math.abs(price - massCenter)
float mass = vol / ta.sma(vol, period)
float gravity = distance > 0 ? mass / (distance * distance) : 0.0
Signal Generation
Signals are generated based on volume conditions:
Buy Climax: Volume exceeds 2 standard deviations above average on bullish candle
Sell Climax: Volume exceeds 2 standard deviations above average on bearish candle
Strong Buy Flow: Volume flow exceeds positive threshold (default 45%)
Strong Sell Flow: Volume flow exceeds negative threshold (default -45%)
Supernova: Volume 3x average AND price change 3x average
Black Hole: Volume 2 standard deviations below average
Dashboard Panel (Top-Right)
Volume Class - Current volume classification
Volume Flow - Buy/sell flow percentage
Buy Volume - Accumulated buy volume
Sell Volume - Accumulated sell volume
A/D Phase - ACCUMULATION/DISTRIBUTION/NEUTRAL
Volume Strength - Normalized volume strength
Gravity Pull - Current gravitational metric
Stellar Mass - Current stellar mass index
Cosmic Field - Combined cosmic field strength
Black Hole - Detection status and void strength
Signal - Current actionable status
Visual Elements
Volume Ratio Columns - Colored bars showing normalized volume
Volume Flow Line - Main oscillator showing flow direction
Flow EMA - Smoothed flow for trend reference
Volume Oscillator - Area plot showing fast/slow comparison
Gravity Field - Area plot showing gravitational pull
Orbital Cycle - Circle plots showing cyclical pattern
Stellar Mass Line - Line showing mass index
Climax Markers - Fire emoji for buy climax, snowflake for sell climax
Supernova Markers - Diamond shapes for extreme events
Black Hole Markers - X-cross for liquidity voids
A/D Phase Background - Subtle background color based on phase
Input Parameters
Volume Period (default: 20) - Period for volume calculations
Distribution Levels (default: 5) - Granularity of distribution analysis
Flow Threshold (default: 1.5) - Multiplier for flow significance
Accumulation Period (default: 14) - Period for A/D calculation
Gravitational Analysis (default: true) - Enable gravity metrics
Black Hole Detection (default: true) - Enable void detection
Stellar Mass Calculation (default: true) - Enable mass index
Orbital Cycles (default: true) - Enable cyclical visualization
Supernova Detection (default: true) - Enable extreme event detection
Suggested Use Cases
Identify accumulation phases for potential long entries
Watch for distribution phases as potential exit signals
Use climax volume as potential exhaustion indicators
Monitor volume flow for directional bias
Avoid trading during black hole (low liquidity) periods
Watch for supernova events as potential trend acceleration
Timeframe Recommendations
Best on 15m to Daily charts. Volume analysis requires sufficient trading activity for meaningful readings.
Limitations
Volume data quality varies by exchange and instrument
Buy/sell separation is based on candle direction, not actual order flow
Astrophysics concepts are analogies, not literal physics
A/D phase detection may lag during rapid transitions
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
RAPF Plus - Forecast Cones - Payoff Greeks - Calibration HarnessRAPF+ Manual (v2.2 — “variable ↔ chart label” clarified)
RAPF+ — Forecast Cones + Payoff Greeks + Calibration Harness
──────────────────────────────────────────────────────────────────────────────
0) What this indicator is
──────────────────────────────────────────────────────────────────────────────
RAPF+ is a forecast-and-score system: it predicts a future price range, then later
checks whether that prediction was accurate — and only generates signals whenthe
conditions are trustworthy.
Core idea (the “lightbulb moment”):
You’re not trading a static band. You’re trading “today’s range that was predicted
h bars ago.”
──────────────────────────────────────────────────────────────────────────────
1) Mental Model (Non-Quant Friendly)
──────────────────────────────────────────────────────────────────────────────
Weather Forecast Analogy
- Bollinger Bands are like looking out the window to see if it’s raining now.
- RAPF+ is like checking the forecast made 3 days ago for today, then grading it.
Interpretation:
- If the forecast said “normal range” and the price stays inside the cone:
→ forecast held → “hold/trend environment”
- If price breaks outside the cone:
→ forecast failed → “breakout shock” or “overextension” (depends on mode)
Why this matters:
RAPF+ is about whether the *old forecast* was correct, not just where the price is now.
──────────────────────────────────────────────────────────────────────────────
2) What You See on the Chart (and what the internal variables are called)
──────────────────────────────────────────────────────────────────────────────
Important: Variable names like aUp/aDn/aMid are INTERNAL to the code.
On the chart and in the Data Window, you’ll see them by their PLOT NAMES.
How to read exact values:
- Hover a candle → open TradingView “Data Window” → find this indicator → read plot values.
- Or hover the plotted line to see its value.
- Or enable “Indicators Values” on the right scale to see last values.
A) Forecast Cones (future projections)
These are projected to the right of current candles (offset by H1/H2/H3).
Code variables (forecast for each horizon):
- mid1 / up1 / dn1 = forecast median/upper/lower at Horizon H1 (projected right)
- mid2 / up2 / dn2 = forecast median/upper/lower at Horizon H2 (projected right)
- mid3 / up3 / dn3 = forecast median/upper/lower at Horizon H3 (projected right)
Chart plot names (what users will see):
- “P50 H1”, “Upper H1”, “Lower H1”
- “P50 H2”, “Upper H2”, “Lower H2”
- “P50 H3”, “Upper H3”, “Lower H3”
Use forecast cones for planning (expectations, targets), NOT direct signal triggers.
B) Density Fan (optional)
Layered confidence bands (50–95%) for a selected horizon.
Code variables:
- upDen50/dnDen50 … upDen95/dnDen95 (selected density horizon)
Chart plot names:
- “Den Up 50”, “Den Dn 50”, … “Den Up 95”, “Den Dn 95” (usually hidden; fills visible)
C) Applied Cone (the tradeable one)
This is the cone that actively interacts with the CURRENT candle.
The Applied Cone is a “prediction made h bars ago, applied to today.”
It uses “old” cone values (shifted buffers) and then selects one horizon.
Internal variables (used by signals):
- aMid = applied median line for the selected Signal Horizon (H1/H2/H3)
- aUp = applied upper bound for the selected Signal Horizon
- aDn = applied lower bound for the selected Signal Horizon
Chart plot names (what users will see):
- aMid → “Applied Mid”
- aUp → “Applied Up”
- aDn → “Applied Dn”
Trading cue:
- Signals are generated by price crossing the Applied Cone (aUp/aDn),
meaning price broke outside the range that was predicted h bars ago for today.
Visual cue (important):
- Applied Cone = the one interacting with current candles (now).
- Forecast Cones = projected to the right into the future.
──────────────────────────────────────────────────────────────────────────────
3) The Stats Table (How to Trust It)
──────────────────────────────────────────────────────────────────────────────
The table grades the model across H1/H2/H3:
Coverage (most important)
- “How often did realized price land inside the predicted cone?”
- Target ≈ conf (e.g., 80%)
Interpretation:
- Coverage below target: cones too tight OR regime changed
- Coverage above target: cones conservative (wider than needed)
Dir Acc (Direction Accuracy)
- “How often was the direction of the forecast correct?”
- Compares sign(forecast mid - old spot) vs sign(realized move)
MAE (Mean Absolute Error)
- Average miss from the predicted midline (lower is better)
Avg Width
- Average cone width (how “expensive” the forecast is in range terms)
Warm-up note (important)
- Stats use warmupBars (default 50) to avoid early-history spikes.
- If you see dashes/empty values on load, wait for more bars to load/scroll back.
Horizon selection tip
Pick the horizon that best balances:
- Coverage near/above target
- Dir Acc acceptable
- MAE low
- Width reasonable
──────────────────────────────────────────────────────────────────────────────
4) The Risk Gate (When Signals Matter)
──────────────────────────────────────────────────────────────────────────────
RAPF+ has an explicit “stand down” filter.
Signals are considered valid only when okRisk = YES, based on:
- Trust ≥ Min Trust
- RegimeRisk ≤ Max RegimeRisk
- Coverage(selected horizon) ≥ Min Coverage
- Enough bars have elapsed for that horizon
HUD labels (what users see) vs code variables:
- “RegimeRisk” in HUD = regimeRisk in code
- “Trust” in HUD = trustTrend in code
- “μ(bar)” in HUD = muBar in code
- “σ(bar)” in HUD = sigmaBar in code
- “okRisk YES/no” = okRisk boolean in code
If okRisk = NO:
DEFAULT ACTION = HOLD / reduce risk / stay flat
This is “no signal.” It is a “low-quality environment.”
What RegimeRisk/Trust mean (simple)
- RegimeRisk rises when volatility is high and/or unstable.
- Trust = 1 − RegimeRisk
- Drift (μ) is damped when Trust is low.
──────────────────────────────────────────────────────────────────────────────
5) Buy / Sell / Hold Playbooks
──────────────────────────────────────────────────────────────────────────────
All rules below assume okRisk = YES.
A) Breakout Mode (continuation/trend)
Signal logic:
- BUY/LONG when price crosses above Applied Upper:
• internal: close crosses above aUp
• chart: close crosses above “Applied Up”
- SELL/SHORT when price crosses below Applied Lower:
• internal: close crosses below aDn
• chart: close crosses below “Applied Dn”
Drift direction filter (recommended ON):
- Longs require μ > 0 (muBar > 0)
- Shorts require μ < 0 (muBar < 0)
Management / Hold:
- Long bias while price is above aMid (“Applied Mid”)
- Short bias while price is below aMid (“Applied Mid”)
Exit ideas (choose your style):
- Conservative: exit if price re-enters inside the cone (failed breakout)
- Balanced: exit on cross back through aMid
- Hard stop: exit on cross opposite band
Best conditions for Breakout:
- Coverage at/above target
- Dir Acc decent
- Trust healthy (RegimeRisk contained)
B) Fade Mode (mean reversion/overextension)
Signal logic (opposite philosophy):
- SHORT when price breaks above aUp (“Applied Up”)
- LONG when price breaks below aDn (“Applied Dn”)
Profit logic:
- aMid (“Applied Mid”) is the “magnet” / mean reversion target
- Many traders scale out toward aMid
Re-entry circles (what they mean):
- When the price was outside, then it crossed back INSIDE the Applied Cone.
- In code: reenterFromAbove / reenterFromBelow
- On the chart: small yellow circles near the candle
Use as confirmation that the “shock” is fading and/or as take-profit prompts.
Best conditions for Fade:
- Dir Acc mediocre/low (choppy drift)
- Coverage struggling vs target (more violations)
- RegimeRisk higher (but still within your maxRisk gate)
C) Auto (Cal Error) Mode (adaptive behavior)
If Signal Mode = Auto (Cal Error):
- If realized coverage ≥ target → uses Breakout
- If realized coverage < target → uses Fade
Plain English:
“If my cones are behaving well, ride continuation.
If they’re failing, mean-revert the brakes.”
──────────────────────────────────────────────────────────────────────────────
6) What HOLD Means (3 distinct cases)
──────────────────────────────────────────────────────────────────────────────
Hold Type 1: No-trade hold (risk gate fails)
- If Trust too low OR RegimeRisk too high OR Coverage too low:
→ HOLD / reduce risk / stand down
Hold Type 2: Inside-cone hold (normal noise)
- Inside the Applied Cone is often “business as usual.”
- Breakout traders: wait, avoid impulsive adds
- Fade traders: take profit / don’t overstay
Hold Type 3: Midline bias hold
- aMid (“Applied Mid”) acts like “forecast fair value”
- Above aMid: bullish bias
- Below aMid: bearish bias
- Frequent flips around aMid: chop → prefer Fade or no-trade
──────────────────────────────────────────────────────────────────────────────
7) Setup Checklist (Practical Defaults)
──────────────────────────────────────────────────────────────────────────────
Step 0 — Select Your Timeframe (avoid noise first)
- Daily (1D): Recommended for most crypto assets.
Best balance of signal stability + trend capture.
- Weekly (1W): Use for macro trend bias (Drift check).
Great for direction context, but signals are slower/fewer.
- Intraday (1H/4H): Advanced users only.
Noisier; typically requires:
• Higher confidence (e.g., 0.90+)
• Stricter risk gates (higher Min Trust, higher Min Coverage, lower Max RegimeRisk)
• Patience with calibration stability
Step 1 — Pick Signal Horizon
- H1: quick swing
- H2: typical swing
- H3: position-style
Step 2 — Calibrate Coverage (don’t guess)
- Coverage below target → increase Cone Width Multiplier
- Coverage above target → decrease Cone Width Multiplier
- Optional: enable Auto-calibrate Cone Width (servo toward conf + margin)
Important: Use Cone Width Multiplier for coverage tuning (that’s what it’s for).
Avoid “fixing” coverage by changing cycle settings.
Step 3 — Set risk gates (reasonable baseline)
- Min Trust ≈ 0.45
- Max RegimeRisk ≈ 0.70
- Min Coverage ≈ 0.55+ (raise for fewer, higher-quality trades)
Step 4 — Keep Drift Filter ON (recommended)
Prevents trading against μ (drift direction).
──────────────────────────────────────────────────────────────────────────────
8) Optional: Payoff + Greeks (Advanced Layer)
──────────────────────────────────────────────────────────────────────────────
(Note: The Greeks engine is disabled by default to save performance.
You must enable it in indicator settings to see these metrics.)
If enabled, RAPF+ estimates the expected payoff for Straddle/Call/Put under the model
distribution (with optional fat-tail mixture) plus Δ / Γ / ν / Θ.
Use cases:
- Assess convexity vs mean reversion preference
- Spot/vol sensitivity awareness
- Horizon comparisons for “optionality-like” behavior
If you’re a spot-only trader, you can ignore this section.
──────────────────────────────────────────────────────────────────────────────
9) One-Page Rules Card
──────────────────────────────────────────────────────────────────────────────
PRE-CHECK
- Choose timeframe (prefer 1D for most crypto)
- Choose signal horizon (H1/H2/H3)
- Prefer horizon with good Coverage and acceptable Dir Acc
- Trade only if okRisk = YES
BREAKOUT MODE
- Buy on cross above “Applied Up” (aUp) (μ>0 if drift filter ON)
- Sell/short on cross below “Applied Dn” (aDn) (μ<0 if drift filter ON)
- Hold while aligned with “Applied Mid” (aMid)
- Exit on re-entry / aMid cross / opposite band (your style)
FADE MODE
- Short on break above “Applied Up” (aUp)
- Long on break below “Applied Dn” (aDn)
- Target “Applied Mid” (aMid) as the mean reversion magnet
- Re-entry circles confirm the “shock fade”
STAND DOWN
- If okRisk = NO → HOLD / reduce risk / no-trade
──────────────────────────────────────────────────────────────────────────────
Quick Glossary
──────────────────────────────────────────────────────────────────────────────
H1/H2/H3: Forecast horizons in bars
conf: Desired coverage probability (e.g., 0.80)
Coverage: % of times realized price stayed inside the cone
Dir Acc: % of times direction was correct
MAE: Avg error vs forecast midline
Width: Avg cone width (upper-lower)/spot
RegimeRisk: Combined “vol high/unstable” score
Trust: 1 − RegimeRisk (how much to trust drift)
μ(bar): Estimated per-bar drift (directional bias)
σ(bar): Estimated per-bar volatility
Applied Cone (present, tradeable):
- aMid / aUp / aDn are internal variables
- On the chart/Data Window, they appear as:
aMid = “Applied Mid”
aUp = “Applied Up”
aDn = “Applied Dn”
Forecast Cones (future projections):
- mid1/up1/dn1 (H1), mid2/up2/dn2 (H2), mid3/up3/dn3 (H3)
- On the chart, they appear as:
“P50 H1/Upper H1/Lower H1”, etc.
Gold Bullish Order Blocks - 3 Candle Confirmation after the OBBest Order blocks finder created by Marky using claude AI.






















