Al Sat Alpha Hunter System [MTF + Risk Manager]çok güzel yerlerden al sat komutu çıkıyor ve bunu size ücretsiz vermek istedim sizde faydalanın
Candlestick analysis
Market State Engine V2# Market State Engine
**Deterministic Confidence-Scoring System for TradingView**
A professional-grade PineScript v5 indicator that scores market conditions from 0-100, helping traders identify high-quality trading opportunities through systematic structure analysis, VWAP positioning, order flow dynamics, and time-based context.
---
## 🎯 Overview
The **Market State Engine** is not a trading bot—it's a **noise-reduction and opportunity-ranking system** designed to filter market conditions and surface only the highest-quality setups.
Instead of blindly taking every signal, this indicator:
- ✅ **Scores** market conditions objectively (0-100 scale)
- ✅ **Filters** out low-probability setups automatically
- ✅ **Classifies** opportunities into A, A+, and A++ grades
- ✅ **Alerts** only on confirmed structure shifts with supporting context
- ✅ **Keeps the human in control** - provides intelligence, not automation
### Philosophy: Reduce Noise. Enforce Discipline. Surface Quality.
---
## 🚀 Key Features
- **Deterministic Scoring** - No black boxes, fully explainable logic
- **Multi-Factor Analysis** - Combines 4 independent market state components
- **Structure-First Approach** - Only alerts on confirmed pivot breaks
- **VWAP Mean Reversion Logic** - Directional filtering based on VWAP zones
- **Order Flow Proxy** - CVD divergence and confirmation detection
- **Session-Aware Scoring** - Prioritizes high-volume New York sessions
- **Alert De-Duplication** - One alert per unique structure shift
- **Zero Repainting** - Uses confirmed pivots only (left=2, right=2)
- **Fully Configurable** - All parameters exposed as inputs
- **Visual Feedback** - VWAP bands, setup labels, and real-time score panel
---
## 📊 Scoring System (0-100)
The Market State Engine evaluates **four independent components**, each contributing up to **25 points** for a maximum total score of **100**.
### 🎯 Component Breakdown
| Component | Max Points | Description |
|-----------|------------|-------------|
| **VWAP Context** | 25 | Measures price deviation from session VWAP |
| **Structure Shift** | 25 | Confirms pivot breakout (HARD GATE) |
| **CVD Alignment** | 25 | Detects order flow divergence/confirmation |
| **Time-of-Day** | 25 | Identifies high-probability trading sessions |
---
### 1️⃣ VWAP Context (Max 25 Points)
**Purpose:** Identifies extreme price deviations from fair value for mean-reversion opportunities.
VWAP (Volume-Weighted Average Price) is calculated session-anchored to New York market time, with standard deviation bands creating zones of opportunity.
#### Band Structure:
- **1st Band**: ±1σ from VWAP (fair value zone)
- **2nd Band**: ±2σ from VWAP (moderate deviation)
- **3rd Band**: ±3σ from VWAP (extreme deviation)
#### Scoring Logic (Exclusive):
```
Price in 3rd VWAP Band (>2σ and ≤3σ) → +25 points
Price in 2nd VWAP Band (>1σ and ≤2σ) → +15 points
Otherwise (inside 1σ or beyond 3σ) → 0 points
```
**Key Insight:** The further price stretches from VWAP, the higher the probability of mean reversion.
---
### 2️⃣ Structure Shift (Max 25 Points) — **HARD GATE**
**Purpose:** Confirms momentum shift through confirmed pivot breakouts.
⚠️ **CRITICAL:** Structure shift is **mandatory**. If no valid structure shift occurs, the **total score becomes 0** regardless of other factors.
#### Detection Method:
Uses TradingView's `ta.pivothigh()` and `ta.pivotlow()` functions with **locked parameters**:
- **Left bars**: 2
- **Right bars**: 2
- **Source**: Configurable (Wick or Body)
- **Break confirmation**: Candle close only
#### Bullish Structure Shift:
- ✅ Prior swing high exists (confirmed pivot)
- ✅ Current candle **closes above** swing high + tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or below VWAP** (lower bands)
#### Bearish Structure Shift:
- ✅ Prior swing low exists (confirmed pivot)
- ✅ Current candle **closes below** swing low - tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or above VWAP** (upper bands)
#### Scoring:
```
Valid structure shift → +25 points
No structure shift → Total score = 0
```
**Tick Buffer:** Default 5 ticks (configurable) - prevents false breaks from minor price noise.
---
### 3️⃣ CVD Alignment (Max 25 Points)
**Purpose:** Detects institutional order flow through volume delta analysis.
CVD (Cumulative Volume Delta) is a proxy for order flow:
```
Close > Open → +Volume (buying pressure)
Close < Open → -Volume (selling pressure)
```
#### Scoring Logic:
| Condition | Points | Description |
|-----------|--------|-------------|
| **Divergence** | +25 | Price makes higher high + CVD makes lower high (bearish)Price makes lower low + CVD makes higher low (bullish) |
| **Confirmation** | +20 | Price and CVD both make higher highs or lower lows |
| **Neutral** | 0 | No clear divergence or confirmation |
**Lookback Window:** Last 20 bars (configurable) - prevents stale divergences.
**Key Insight:** Divergences suggest weakening momentum, while confirmations validate the trend.
---
### 4️⃣ Time-of-Day Context (Max 25 Points)
**Purpose:** Prioritizes high-volume, high-volatility New York sessions.
#### Scored Sessions (America/New_York timezone):
| Session | Time Range (NY) | Points | Description |
|---------|-----------------|--------|-------------|
| **Pre-Market** | 03:00 - 04:00 | +25 | Early liquidity injection |
| **Market Open** | 09:30 - 11:30 | +25 | Highest volume period |
| **Off-Hours** | All other times | 0 | Lower probability setups |
**Key Insight:** Structure shifts during active sessions have higher follow-through probability.
---
## 🏆 Setup Classification
Setups are graded based on total score thresholds (configurable):
| Grade | Score Range | Typical Components | Quality Level |
|-------|-------------|-------------------|---------------|
| **A++ Setup** | ≥90 | All 4 factors aligned(VWAP 3rd band + Structure + CVD + Session) | Premium - Rare |
| **A+ Setup** | ≥75 | Structure + VWAP + CVD or Session(3 of 4 factors) | High - Select |
| **A Setup** | ≥60 | Structure + VWAP + Session(Minimum viable setup) | Good - Regular |
| **No Grade** | <60 | Insufficient confluence | Filtered out |
**Default Thresholds:**
- A Setup: 60 points
- A+ Setup: 75 points
- A++ Setup: 90 points
---
## 📥 Installation
### Step 1: Download the Indicator
Download the `market_state_engine.pine` file from this repository.
### Step 2: Add to TradingView
1. Open (www.tradingview.com)
2. Open the **Pine Editor** (bottom panel)
3. Click **"New"** → **"Blank indicator"**
4. Delete all default code
5. Paste the contents of `market_state_engine.pine`
6. Click **"Add to Chart"**
### Step 3: Configure for Your Symbol
1. Click the **gear icon** next to the indicator name
2. Adjust **Tick Size** for your instrument:
- ES futures: `0.25`
- NQ futures: `0.25`
- Stocks: `0.01`
3. Save settings
---
## ⚙️ Configuration
### Symbol Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Tick Size** | 0.25 | Minimum price movement for your symbol |
| **Tick Buffer Count** | 5 | Ticks beyond swing for valid break |
### VWAP Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **VWAP Band 1 (σ)** | 1.0 | 1st standard deviation multiplier |
| **VWAP Band 2 (σ)** | 2.0 | 2nd standard deviation multiplier |
| **VWAP Band 3 (σ)** | 3.0 | 3rd standard deviation multiplier |
### Session Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Session 1** | 0300-0400 | Pre-market window (NY time) |
| **Session 2** | 0930-1130 | Market open window (NY time) |
### Score Thresholds
| Parameter | Default | Description |
|-----------|---------|-------------|
| **A Setup Threshold** | 60 | Minimum score for A grade |
| **A+ Setup Threshold** | 75 | Minimum score for A+ grade |
| **A++ Setup Threshold** | 90 | Minimum score for A++ grade |
### CVD Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **CVD Divergence Lookback** | 20 | Maximum bars for divergence detection |
### Swing Settings
| Parameter | Default | Options | Description |
|-----------|---------|---------|-------------|
| **Swing Detection Method** | Wick | Wick / Body | Use high/low or open/close for pivots |
### Visual Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Show VWAP Bands** | ✅ | Display VWAP and standard deviation bands |
| **Show Setup Labels** | ✅ | Display setup markers on chart |
| **Show Score Panel** | ✅ | Display real-time score breakdown |
---
## 📖 How to Use
### Step 1: Apply to 1-Minute Chart
⚠️ **The indicator is locked to 1-minute timeframe** - do not use on other timeframes.
### Step 2: Understand the Visual Signals
#### Setup Labels
- **Green Triangle (▲)** - Bullish (Long) setup detected
- **Red Triangle (▼)** - Bearish (Short) setup detected
- Label shows **Grade** (A/A+/A++) and **Total Score**
#### VWAP Bands
- **Yellow Line** - Session VWAP (fair value)
- **Blue Bands** - ±1σ (fair value zone)
- **Purple Bands** - ±2σ (moderate deviation)
- **Red Bands** - ±3σ (extreme deviation)
#### Score Panel (Top Right)
Real-time breakdown of all four components:
```
Component Score
VWAP Zone 15/25
Structure 25/25
CVD 20/25
Session 25/25
TOTAL 85/100 (A+)
```
### Step 3: Interpret Signals
#### Valid Long Setup:
✅ Green triangle below candle
✅ Price in **lower VWAP bands** (below VWAP)
✅ Structure shift breaks swing high
✅ Score ≥60
#### Valid Short Setup:
✅ Red triangle above candle
✅ Price in **upper VWAP bands** (above VWAP)
✅ Structure shift breaks swing low
✅ Score ≥60
### Step 4: Set Up Alerts (See Alert Conditions section)
---
## 🚦 Signal Filters (VWAP Zone Logic)
The indicator uses **directional VWAP filtering** to prevent counter-trend signals:
### Long Signals (Green)
**Only allowed when price is AT or BELOW VWAP**
- ✅ Lower 2nd band (-2σ to -1σ)
- ✅ Lower 3rd band (-3σ to -2σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in upper bands (above VWAP)
**Logic:** Longs when price is stretched below fair value (mean reversion)
### Short Signals (Red)
**Only allowed when price is AT or ABOVE VWAP**
- ✅ Upper 2nd band (+1σ to +2σ)
- ✅ Upper 3rd band (+2σ to +3σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in lower bands (below VWAP)
**Logic:** Shorts when price is stretched above fair value (mean reversion)
---
## 🎨 Visual Elements
### Chart Overlays
| Element | Color | Description |
|---------|-------|-------------|
| **VWAP Line** | Yellow | Session-anchored fair value |
| **±1σ Bands** | Blue | Fair value zone (no score) |
| **±2σ Bands** | Purple | Moderate deviation (15 pts) |
| **±3σ Bands** | Red | Extreme deviation (25 pts) |
| **Swing Highs** | Red ▼ | Confirmed pivot highs |
| **Swing Lows** | Green ▲ | Confirmed pivot lows |
| **Session Background** | Light Green | Active high-value session |
### Setup Labels
**Bullish Setup:**
```
A+
▲ 75
```
Green label below candle, shows grade and score
**Bearish Setup:**
```
A++
▼ 90
```
Red label above candle, shows grade and score
### Score Panel
Real-time table in top-right corner:
- Individual component scores (0-25 each)
- Total score (0-100)
- Current setup grade (A/A+/A++)
- Updates in real-time as market conditions change
---
## 🔔 Alert Conditions
### Setting Up Alerts
#### Method 1: Built-in Alert Conditions
1. Click **"Create Alert"** in TradingView
2. Select **Market State Engine** as condition
3. Choose alert type:
- **Bullish Setup** - Long signals only
- **Bearish Setup** - Short signals only
- **Any Setup** - All signals
4. Set to **"Once Per Bar Close"**
5. Configure notification method (app, email, webhook)
#### Method 2: Custom Alert Message
Alert messages include full breakdown:
```
A+ Setup Detected (Score: 85)
Components: VWAP(25) + Structure(25) + CVD(20) + Time(15)
CVD State: Confirmation
Direction: Long
Timeframe: 1m
```
### Alert Behavior
✅ **One alert per unique pivot break** - no spam
✅ **Fires on candle close only** - no repainting
✅ **Minimum score filter** - only A grade or higher (≥60)
✅ **Direction-specific** - separate bullish/bearish conditions
⚠️ **No cooldown between different pivots** - multiple alerts per session allowed if different swing levels break
---
## 🔧 Technical Details
### Timeframe Lock
- **Required**: 1-minute chart only
- **Reason**: Scoring model calibrated for 1m micro-structure
- **Future**: Multi-timeframe support planned for v2
### Timezone Configuration
- **Hard-coded**: `America/New_York`
- **Session Detection**: Uses TradingView's native session functions
- **Consistency**: All time-based logic uses NY timezone
### Swing Detection Parameters
**Locked to specification:**
- `ta.pivothigh(source, left=2, right=2)`
- `ta.pivotlow(source, left=2, right=2)`
**Implications:**
- Pivots confirmed 2 bars after formation
- No repainting - historical pivots don't move
- 4-bar minimum swing structure (2 left + pivot + 2 right)
### VWAP Calculation
- **Type**: Session-anchored (resets daily)
- **Source**: Typical price `(high + low + close) / 3`
- **Weighting**: Volume-weighted
- **Standard Deviation**: True population standard deviation
### CVD Proxy Formula
```pine
barDelta = close > open ? volume : close < open ? -volume : 0
CVD = cumulative sum of barDelta (session-reset)
```
### Performance Limits
- **Max Labels**: 500 (TradingView limit)
- **Max Bars Back**: 500
- **Memory**: Lightweight - uses only essential variables
---
## 💡 Best Practices
### 1. **Use as a Filter, Not a Strategy**
❌ Don't: Blindly take every signal
✅ Do: Use score as confluence for your existing analysis
### 2. **Higher Grades = Better Probability**
- **A Setups (60-74)**: Regular opportunities, still require discretion
- **A+ Setups (75-89)**: High-quality, multiple factors aligned
- **A++ Setups (90-100)**: Rare premium opportunities, strongest edge
### 3. **Respect the VWAP Zone Filter**
The indicator **automatically blocks**:
- Longs in upper VWAP bands (counter-trend)
- Shorts in lower VWAP bands (counter-trend)
Trust this logic - it enforces mean reversion discipline.
### 4. **Monitor the Score Panel**
Watch which components are scoring to understand **why** a setup formed:
- Missing CVD score? → No order flow confirmation
- Missing Time score? → Outside high-volume sessions
- Low VWAP score? → Weak deviation from fair value
### 5. **Combine with Risk Management**
The indicator provides **opportunity scoring**, not position sizing:
- Use stop losses based on swing structure
- Scale position size with setup grade (larger on A++, smaller on A)
- Set profit targets at VWAP or opposing band
### 6. **Session Awareness**
Prioritize signals during **active sessions**:
- **03:00-04:00 NY**: Pre-market momentum
- **09:30-11:30 NY**: Highest volume, tightest spreads
Off-hours signals (0 time score) are lower probability but still valid if other factors strong.
### 7. **Understand the Hard Gate**
If **no structure shift** occurs:
- Total score = 0
- No alerts fire
- Other components irrelevant
**Why?** Structure shift confirms momentum change - without it, there's no tradable opportunity.
### 8. **Avoid Over-Optimization**
Default settings are well-calibrated:
- Don't chase "perfect" parameters
- Test changes on historical data before live use
- Document any modifications
### 9. **Leverage Alert De-Duplication**
The indicator prevents spam automatically:
- One alert per unique swing break
- New swing levels = new alerts
- No need to manually filter notifications
### 10. **Supplement with Price Action**
Use the indicator alongside:
- Support/resistance levels
- Order flow footprint charts
- Volume profile
- Market internals (breadth, TICK, etc.)
---
## 📚 Example Scenarios
### Example 1: A++ Premium Setup (Score: 95)
```
Price: In lower 3rd VWAP band (-2.8σ) → VWAP: 25 pts
Structure: Close breaks swing high → Structure: 25 pts
CVD: Price LL + CVD HL (bullish div) → CVD: 25 pts
Time: 10:15 AM NY (market open) → Time: 25 pts
Direction: LONG (price below VWAP) → Valid
Grade: A++ (95/100)
```
**Interpretation:** All factors aligned - premium mean-reversion long opportunity.
---
### Example 2: A+ Strong Setup (Score: 80)
```
Price: In upper 2nd VWAP band (+1.5σ) → VWAP: 15 pts
Structure: Close breaks swing low → Structure: 25 pts
CVD: Price HH + CVD LH (bearish div) → CVD: 25 pts
Time: 2:00 PM NY (off-hours) → Time: 0 pts
Direction: SHORT (price above VWAP) → Valid
Grade: A+ (65/100)
```
**Interpretation:** Strong setup despite off-hours, bearish divergence adds confidence.
---
### Example 3: Filtered Setup (Score: 0)
```
Price: In upper 3rd VWAP band (+2.5σ) → VWAP: 25 pts (if allowed)
Structure: Close breaks swing high → Structure: BLOCKED
CVD: Price HH + CVD HH (confirmation) → CVD: 20 pts (if allowed)
Time: 10:00 AM NY → Time: 25 pts (if allowed)
Direction: LONG (price ABOVE VWAP) → ❌ INVALID ZONE
Grade: None (0/100) - NO ALERT
```
**Interpretation:** VWAP filter blocked long signal in upper band - prevents counter-trend trade.
---
## 🛠️ Troubleshooting
### No Signals Appearing
- ✅ Verify you're on **1-minute chart**
- ✅ Check **Tick Size** matches your symbol
- ✅ Ensure **VWAP Bands** are visible
- ✅ Wait for confirmed pivots (requires at least 5 bars of history)
### Alerts Not Firing
- ✅ Confirm alert is set to **"Once Per Bar Close"**
- ✅ Check score threshold (must be ≥60 by default)
- ✅ Verify VWAP zone filter isn't blocking signals
- ✅ Check that structure shift is actually occurring
### Score Always Zero
- ✅ No structure shift detected (hard gate active)
- ✅ Price may not be in valid VWAP zone (2nd or 3rd band)
- ✅ Insufficient swing history (wait for pivots to form)
### Too Many/Too Few Signals
**Too many signals:**
- Increase **A Setup Threshold** (e.g., 70 instead of 60)
- Increase **Tick Buffer Count** (reduces false breaks)
**Too few signals:**
- Decrease **A Setup Threshold** (e.g., 50 instead of 60)
- Decrease **Tick Buffer Count** (more sensitive to breaks)
---
## 📜 License
This indicator is provided under the **Mozilla Public License 2.0**.
---
## 🤝 Credits
Developed as a professional trading tool for systematic opportunity identification.
**Philosophy:** Reduce noise. Enforce discipline. Keep the human in control.
---
## 📞 Support
For questions, issues, or feature requests, please consult:
1. This README documentation
2. The specification document (`pinescript_market_state_engine_spec.docx`)
3. Inline code comments in `market_state_engine.pine`
---
## 🔄 Version History
**v1.0** (Current)
- Initial release
- 4-component scoring model (VWAP + Structure + CVD + Time)
- VWAP zone directional filtering
- Alert de-duplication
- Configurable inputs
- Real-time score panel
- Session-aware logic
---
## 🎓 Understanding the Numbers
### Quick Reference Card
| Score Range | Grade | Quality | Typical Use |
|-------------|-------|---------|-------------|
| 90-100 | A++ | Premium | Highest conviction trades |
| 75-89 | A+ | High | Strong probability setups |
| 60-74 | A | Good | Acceptable with discretion |
| 0-59 | None | Filtered | Skip or wait for confluence |
### Component Contribution Examples
**Minimum A Setup (60 points):**
- Structure (25) + VWAP 3rd band (25) + Time (25) = 75 ✅
**Typical A+ Setup (75 points):**
- Structure (25) + VWAP 2nd band (15) + CVD confirm (20) + Time (25) = 85 ✅
**Maximum A++ Setup (100 points):**
- Structure (25) + VWAP 3rd band (25) + CVD divergence (25) + Time (25) = 100 ✅
---
## 🎯 Final Reminder
**This is NOT a trading bot.**
**This is NOT financial advice.**
**This is a decision-support tool.**
Always:
- ✅ Use proper risk management
- ✅ Understand the logic before trading
- ✅ Backtest on your symbols
- ✅ Keep the human in control
**Happy Trading! 📈**
Order Blocks & Breaker Blocks Destek DirencOrder Blocks & Breaker Blocks Destek Direnc Al Sat Bölgeleri
ASK Capital Camarilla Pivots══════════════════════════════════════════════════════════
ASK CAPITAL CAMARILLA PIVOTS - TRADINGVIEW DESCRIPTION
══════════════════════════════════════════════════════════
Copy everything below this line for TradingView:
──────────────────────────────────────────────────────────
A clean, efficient Camarilla Pivot Points indicator that plots all 12 levels (R1-R6 and S1-S6) with full customization options.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 **WHAT ARE CAMARILLA PIVOTS?**
Camarilla Pivot Points are a set of support and resistance levels calculated from the previous day's High, Low, and Close. Developed by Nick Stott in 1989, they are widely used by intraday traders to identify potential reversal zones and breakout levels.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 **THE LEVELS EXPLAINED**
**Inner Levels (R1/R2 & S1/S2):**
These are the closest levels to the current price. Price often oscillates between these during low-volatility periods.
**Core Levels (R3/R4 & S3/S4):**
The most important Camarilla levels. R3/S3 act as the primary reversal zones, while R4/S4 signal potential breakout points.
• **R3/S3** → Mean reversion zones (fade the move)
• **R4/S4** → Breakout confirmation levels (trade with momentum)
**Extreme Levels (R5/R6 & S5/S6):**
Extended levels for strong trending days. When price reaches R5/R6 or S5/S6, it indicates exceptional momentum.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 **HOW TO USE**
**Range-Bound Strategy (Most Common):**
1. If price opens between S3 and R3, expect mean reversion
2. Go long near S3 with target at R3
3. Go short near R3 with target at S3
4. Stop loss beyond S4/R4
**Breakout Strategy:**
1. If price breaks and holds above R4 → Bullish breakout (go long)
2. If price breaks and holds below S4 → Bearish breakout (go short)
3. Target R5/R6 or S5/S6 respectively
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ **FEATURES**
✅ All 12 Camarilla levels (R1-R6, S1-S6)
✅ RTH/ETH toggle - choose Regular Trading Hours or include Pre/Post market data
✅ Individual color customization for each level
✅ Toggle visibility for level groups (R1-R2, R3-R4, R5-R6)
✅ Optional labels on chart
✅ Optional info table with prices and distance from current price
✅ Line style options (Solid, Dashed, Dotted)
✅ Adjustable line width
✅ Clean, minimal design
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 **FORMULAS**
Standard Camarilla (R1-R4, S1-S4):
```
R1 = Close + Range × 1.1/12
R2 = Close + Range × 1.1/6
R3 = Close + Range × 1.1/4
R4 = Close + Range × 1.1/2
```
Extended Levels (R5-R6, S5-S6):
```
R5 = R4 + 1.168 × (R4 - R3)
R6 = Close × High / Low
```
Support levels (S1-S6) mirror resistance levels below the close.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 **TIPS**
• R3/S3 are your bread-and-butter levels for intraday reversals
• R4/S4 breaks often lead to strong trending moves
• Use the RTH toggle to switch between regular hours and extended hours data
• The info table is helpful for seeing exact prices and % distance at a glance
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Made by ASK Capital**
If you find this indicator useful, please give it a ⭐ and follow for more trading tools!
#camarilla #pivotpoints #daytrading #intraday #support #resistance #technicalanalysis
4H-15m FVG ModelThis is a privet trail script trading FVGs on 4hr charts to 15m chart. do not use until it's ready then I will sell it to you
Fixed Price Levels with Zones (1000 / 750 / 500 / 250)idywbdiawunadnaw oidnawidnawodnaw wadaw dawd awdaw
Week High/LowThis indicator plots the Previous Week High and Low as two horizontal dashed lines.
It is designed to appear only on the Daily (D) and Weekly (W) timeframes, ensuring a clean higher-timeframe context without lower-timeframe noise.
The levels are calculated from the completed weekly candle and automatically update at the start of each new week.
These levels serve as weekly liquidity references, commonly used to assess premium/discount zones, potential stop-run areas, and higher-timeframe market reactions.
Previous Day High/Low - by Praveen Sigrohavery helpful tool if you consider previous day high and low important to use as benchmark for the next big move.
Order Blocks ScannerHighlights order blocks with inneficiencies onto the chart, while removing mitigated blocks if price has touched that supply or demand area.
Also by default changes the candle color of the order block origin candle to make it easier to see already mitigated blocks for potential breaker block zones.
ABCD Strategy (v7 Ready)//@version=6
indicator("ABCD Strategy v7 – MTF S/R Filter", overlay=true, max_lines_count=300, max_labels_count=300)
//━━━━━━━━━━━━━━━━━━━━━
// INPUTS
//━━━━━━━━━━━━━━━━━━━━━
pivotLen = input.int(5, "Swing Strength", minval=2)
bcMin = input.float(0.618, "BC Min Fib")
bcMax = input.float(0.786, "BC Max Fib")
cdMin = input.float(1.272, "CD Min Extension")
cdMax = input.float(1.618, "CD Max Extension")
htfTF = input.timeframe("240", "Higher Timeframe (S/R)")
srLookback = input.int(200, "HTF S/R Lookback")
srTolerance = input.float(0.002, "S/R Zone Tolerance (0.2%)")
showSR = input.bool(true, "Show HTF S/R Zones")
showTargets = input.bool(true, "Show Targets")
//━━━━━━━━━━━━━━━━━━━━━
// HIGHER TF SUPPORT / RESISTANCE
//━━━━━━━━━━━━━━━━━━━━━
htfHigh = request.security(syminfo.tickerid, htfTF, ta.highest(high, srLookback))
htfLow = request.security(syminfo.tickerid, htfTF, ta.lowest(low, srLookback))
srHighZoneTop = htfHigh * (1 + srTolerance)
srHighZoneBottom = htfHigh * (1 - srTolerance)
srLowZoneTop = htfLow * (1 + srTolerance)
srLowZoneBottom = htfLow * (1 - srTolerance)
//━━━━━━━━━━━━━━━━━━━━━
// DRAW HTF ZONES
//━━━━━━━━━━━━━━━━━━━━━
if showSR
box.new(bar_index - 5, srHighZoneTop, bar_index + 5, srHighZoneBottom,
bgcolor=color.new(color.red, 85), border_color=color.red)
box.new(bar_index - 5, srLowZoneTop, bar_index + 5, srLowZoneBottom,
bgcolor=color.new(color.green, 85), border_color=color.green)
//━━━━━━━━━━━━━━━━━━━━━
// SWING DETECTION
//━━━━━━━━━━━━━━━━━━━━━
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float A = na
var float B = na
var float C = na
var float D = na
var int Ab = na
var int Bb = na
var int Cb = na
var int Db = na
if not na(pl)
A := B
Ab := Bb
B := C
Bb := Cb
C := low
Cb := bar_index
if not na(ph)
A := B
Ab := Bb
B := C
Bb := Cb
C := high
Cb := bar_index
//━━━━━━━━━━━━━━━━━━━━━
// ABCD LOGIC
//━━━━━━━━━━━━━━━━━━━━━
ab = math.abs(B - A)
bc = math.abs(C - B)
bcFib = bc / ab
validBC = bcFib >= bcMin and bcFib <= bcMax
bull = C > B
cdMinPrice = bull ? C - bc * cdMin : C + bc * cdMin
cdMaxPrice = bull ? C - bc * cdMax : C + bc * cdMax
inDzone = low <= cdMaxPrice and high >= cdMinPrice
//━━━━━━━━━━━━━━━━━━━━━
// MTF STRUCTURE FILTER
//━━━━━━━━━━━━━━━━━━━━━
nearResistance = close <= srHighZoneTop and close >= srHighZoneBottom
nearSupport = close <= srLowZoneTop and close >= srLowZoneBottom
structureOK =
(bull and nearSupport) or
(not bull and nearResistance)
//━━━━━━━━━━━━━━━━━━━━━
// FINAL D CONFIRMATION
//━━━━━━━━━━━━━━━━━━━━━
if validBC and inDzone and structureOK
D := close
Db := bar_index
//━━━━━━━━━━━━━━━━━━━━━
// TARGETS
//━━━━━━━━━━━━━━━━━━━━━
tp1 = bull ? D + math.abs(D - C) * 0.382 : D - math.abs(D - C) * 0.382
tp2 = bull ? D + math.abs(D - C) * 0.618 : D - math.abs(D - C) * 0.618
//━━━━━━━━━━━━━━━━━━━━━
// DRAW PATTERN
//━━━━━━━━━━━━━━━━━━━━━
if not na(D)
line.new(Ab, A, Bb, B, width=2, color=color.blue)
line.new(Bb, B, Cb, C, width=2, color=color.orange)
line.new(Cb, C, Db, D, width=2, color=color.green)
label.new(Db, D, "D (HTF CONFIRMED)", style=label.style_label_down, color=color.yellow)
if showTargets
line.new(Db, tp1, Db + 12, tp1, color=color.green)
line.new(Db, tp2, Db + 12, tp2, color=color.teal)
alertcondition(validBC and inDzone and structureOK,
"ABCD v7 Confirmed",
"ABCD Pattern confirmed at Higher-Timeframe Support/Resistance — wait for price action.")
Gold Futures Prop-Firm Strategy (GC) 1-18-2026Overview
This is a long-only, session-based, multi-regime trading strategy designed specifically for Gold futures (GC / GC1!) on intraday timeframes (typically 5–15 minutes).
The strategy aims to capture high-probability moves during the New York and Asian sessions while avoiding major economic news events and enforcing strict daily risk limits — making it suitable for prop firm challenges (e.g. FTMO, FundedNext, Apex, etc.) that require consistent profitability, limited drawdown, and disciplined risk management.
Core Philosophy
Trade longs only (shorts were removed after analysis showed they were consistently unprofitable)
Different logic depending on session and market regime (trending vs ranging)
Heavy filtering using trend strength (ADX), volume confirmation, EMA alignment, Bollinger Bands, and RSI
Strict position sizing, daily loss cap, per-session trade limits, and news blackout periods
Trailing stop mechanism to let winners run while protecting against reversals
Trading Sessions & Time Windows (Eastern Time)
NY Session: 08:30 – 15:00 ET
NY AM (trend/breakout zone): 08:30 – 11:30 ET
NY PM (mean-reversion zone): 11:30 – 15:00 ET
Asia Session (mean-reversion zone): 18:00 – 02:00 ET
News blackouts: short windows around high-impact releases (CPI/NFP, ISM/Fed, FOMC)
Entry Logic (Long Only)
NY AM – Trend Following & Breakouts (strongest trend filter)
ADX > 30 (strong trend)
Price above 200 EMA (bull regime)
Fast EMA (21) crosses above Slow EMA (55) or breakout above 20-bar high
Volume spike (> 1.4 × 20-period SMA)
Max 2 trades per NY session per day
NY PM & Asia – Mean Reversion
ADX ≤ 30 (ranging market)
Price below lower Bollinger Band (20, 2.0)
RSI < 25 (deep oversold)
No volume filter required here
Max 2 trades per Asia session per day
Risk Management Rules
Position size: Fixed 1–2 contracts (user selectable)
Initial stop: 1.7 × ATR(14) below entry (tightened from original)
Trailing stop:
Activates after price moves +1.0 × ATR in profit
Trails by 1.0 × ATR (locked-in profits aggressively)
Daily loss limit: -$600 (stops all trading for the day once hit)
No trading during defined news windows
Pyramiding disabled (only one position at a time)
No short entries (removed after backtest analysis)
Indicators Used
EMA 21 / 55 / 200 (trend direction & filter)
ATR(14) × 0.85 (volatility base)
ADX(14) threshold 30 (strong trend confirmation)
Bollinger Bands (20, 2.0) for mean-reversion entries
RSI(14) with oversold < 25
Volume spike filter (1.4× SMA) for trend/breakout entries
20-bar highest high / lowest low for breakout detection
Visual Elements on Chart
Fast (blue), Slow (orange), and Filter (red) EMAs
Bollinger Bands (gray, semi-transparent fill)
Background coloring:
Red tint during news blackout periods
Purple tint when daily loss limit is hit
Intended Use Case
Prop trading firm evaluation accounts
Conservative intraday gold trading
Focus on high-quality long setups in trending (NY AM) and mean-reverting (Asia/PM) environments
Goal: positive expectancy with controlled drawdown, suitable for passing drawdown and profit targets
BTCUSD 1D Trend Strategy [Gemini]1Dchart
100% of equity per trade
0.1% commission
1 tick slippage
please convert this indicator to a trading strategy as you see fit
find attached the date of the chart and the indicator on BTCUSD 1D chart so you can make a better decision when to buy and sell
avoid forward looking and repainting at all costs.
Don't add tables to the chart
don't ever use line breaks in function calls:
long only
2018-2069
1D chart
100% of
Multi-Data Chart-AnalyticsDynamic Sentiment & Contextual Trend Analysis
Function Description
The Multi-Data Chart-Analytics is a comprehensive market context indicator designed to convert complex technical data into a readable, real-time narrative. Unlike traditional visual-only indicators, this script acts as an on-chart "trading assistant" that evaluates price action, momentum, volatility, and institutional volume simultaneously.
Key Technical Features:
Adaptive Trend Engine: Automatically scales its lookback period based on available historical data (up to 200 periods). This ensures accurate analysis for "young" assets or high timeframes (like BTC on Monthly charts) where standard fixed-length EMAs fail.
Momentum & Feel Tracking: Integrates RSI and DMI (ADX) to determine if the market is overextended (expensive) or undervalued (cheap), and whether the trend has sufficient strength.
Volatility Squeeze Detection: Monitors Bollinger Band width to alert users to "coiling" phases, signaling imminent breakouts.
Institutional Volume Filter: Compares current volume against its 20-period moving average to identify "Smart Money" conviction.
Who is this for?
Discretionary Traders: Who want a quick "second opinion" or sanity check before entering a trade.
Beginners: Who find it difficult to read multiple indicators at once; the terminal translates lines into actionable insights.
Systematic Traders: Who need to maintain awareness of higher-timeframe context without cluttering their main chart window.
How to Use It
Look at the Environment: Start by checking the long-term trend status to ensure you aren't trading against the dominant market force.
Verify Momentum: Check "Market Feel" to avoid buying at exhaustion points (Overbought) or selling at bottoms (Oversold).
Prepare for Breakouts: Keep an eye on the "Volatility" section. If it indicates a "Squeeze," tighten your stops or prepare for a large move.
Confirm with Smart Money: Only trust significant moves if the terminal confirms "Institutional Activity" is present.
Customize: Use the settings menu to adjust the box width, colors, and font size to fit your personal chart layout.
Technical Breakdown (Short Form)
Trend: Adaptive EMA/SMA (max 200).
Momentum: RSI (14) + ADX (14).
Volatility: Bollinger Band Width (20).
Volume: SMA (20) based Volume multiplier.
You might want to use this script in combination with our "Range Indicator Golden Pocket" and "Multi Asset & Multi Timeframe Trend Dashoboard" and the "Risk & Reward Position Planner"
TradeSkull Opening Candle Range BoxThis will give you and extended range box of the opening candle of your choice on what ever timeframe you like
TradeSkull Opening Candle Box range of your choiceopening candle range box....pick your time and you will have the high/low and extended range box that you can edit
Wick & Body % with upper wick thresholdA simple indicator to give the sizes of wicks and main body of the last candle as percentage of high - low. No negative figures. If the candle is red, the table will be red and vice versa. Table could be located as per user preference. Upper wick threshold is user defined and will be red beyond the threshold.
MFI/RSI Divergence Lower하단 지표 구성 및 활용법
MFI (Aqua Line): 거래량이 가중된 자금 흐름입니다. 지지선 근처에서 이 선이 저점을 높이면(다이버전스) 강력한 매수 신호입니다.
RSI (Yellow Line): 가격의 상대적 강도입니다. MFI와 함께 움직임을 비교하여 보조적으로 활용합니다.
리페인팅 방지 핵심: offset=-lb_r 설정을 통해, 지표가 확정되는 시점(피벗 완성 시점)에 정확히 신호가 표시되도록 구현했습니다. 이는 과거 백테스트 결과와 실시간 매매 결과가 일치하도록 보장합니다.
실전 응용
지지/저항 필터: 이 지표 단독으로 사용하기보다, 차트 상의 주요 지지선에 가격이 위치했을 때 발생하는 BULL DIV 신호만 골라 매수하면 승률이 극대화됩니다.
손절/익절 최적화: 현재 1.5% 손절, 3% 익절로 설정되어 있습니다. 종목의 변동성(ATR)에 따라 group_risk에서 수치를 조정하며 최적의 수익 곡선을 찾아보십시오.
//@version=6
strategy("Hybrid MFI/RSI Divergence Lower",
overlay=false, // 하단 지표 설정을 위해 false
initial_capital=10000,
default_qty_type=strategy.percent_of_equity,
default_qty_value=10,
commission_type=strategy.commission.percent,
commission_value=0.05,
slippage=1)
// --- ---
group_date = "1. 백테스트 기간"
start_time = input.time(timestamp("2024-01-01 00:00:00"), "시작일", group=group_date)
end_time = input.time(timestamp("2026-12-31 23:59:59"), "종료일", group=group_date)
within_window() => time >= start_time and time <= end_time
group_osc = "2. 오실레이터 설정"
mfi_len = input.int(14, "MFI 기간", group=group_osc)
rsi_len = input.int(14, "RSI 기간", group=group_osc)
ob_level = input.int(80, "과매수 기준", group=group_osc)
os_level = input.int(20, "과매도 기준", group=group_osc)
group_div = "3. 다이버전스 감도"
lb_l = input.int(5, "피벗 왼쪽 범위", group=group_div)
lb_r = input.int(5, "피벗 오른쪽 범위", group=group_div)
group_risk = "4. 리스크 관리"
tp_pct = input.float(3.0, "익절 (%)", step=0.1, group=group_risk) / 100
sl_pct = input.float(1.5, "손절 (%)", step=0.1, group=group_risk) / 100
// --- ---
mfi_val = ta.mfi(close, mfi_len)
rsi_val = ta.rsi(close, rsi_len)
avg_val = (mfi_val + rsi_val) / 2 // MFI와 RSI의 평균값으로 부드러운 흐름 파악
// --- ---
// 저점 피벗 탐지 (MFI 기준)
pl = ta.pivotlow(mfi_val, lb_l, lb_r)
ph = ta.pivothigh(mfi_val, lb_l, lb_r)
// Bullish Divergence (상승 다이버전스)
var float last_pl_mfi = na
var float last_pl_price = na
bool is_bull_div = false
if not na(pl)
last_pl_mfi := mfi_val
last_pl_price := low
// 이전 저점 탐색
float prev_pl_mfi = ta.valuewhen(not na(pl), mfi_val , 1)
float prev_pl_price = ta.valuewhen(not na(pl), low , 1)
if low < prev_pl_price and mfi_val > prev_pl_mfi
is_bull_div := true
// Bearish Divergence (하락 다이버전스)
var float last_ph_mfi = na
var float last_ph_price = na
bool is_bear_div = false
if not na(ph)
last_ph_mfi := mfi_val
last_ph_price := high
float prev_ph_mfi = ta.valuewhen(not na(ph), mfi_val , 1)
float prev_ph_price = ta.valuewhen(not na(ph), high , 1)
if high > prev_ph_price and mfi_val < prev_ph_mfi
is_bear_div := true
// --- ---
if within_window()
if is_bull_div
strategy.entry("Bull", strategy.long, comment="Bull Div")
if is_bear_div
strategy.entry("Bear", strategy.short, comment="Bear Div")
strategy.exit("ExB", "Bull", limit=strategy.position_avg_price * (1 + tp_pct), stop=strategy.position_avg_price * (1 - sl_pct))
strategy.exit("ExS", "Bear", limit=strategy.position_avg_price * (1 - tp_pct), stop=strategy.position_avg_price * (1 + sl_pct))
// --- ---
// 배경 레이아웃
hline(ob_level, "Overbought", color=color.new(color.red, 50), linestyle=hline.style_dashed)
hline(50, "Middle", color=color.new(color.gray, 70))
hline(os_level, "Oversold", color=color.new(color.green, 50), linestyle=hline.style_dashed)
// 메인 지표 플롯
plot(mfi_val, "MFI (Money Flow)", color=color.new(color.aqua, 0), linewidth=2)
plot(rsi_val, "RSI (Momentum)", color=color.new(color.yellow, 50), linewidth=1)
// 다이버전스 발생 시 하단 지표 영역에 선 그리기
plotshape(is_bull_div ? mfi_val : na, "Bull Div Circle", shape.circle, location.absolute, color.green, size=size.tiny, offset=-lb_r)
plotshape(is_bear_div ? mfi_val : na, "Bear Div Circle", shape.circle, location.absolute, color.red, size=size.tiny, offset=-lb_r)
// 과매수/과매도 배경색
fill(hline(ob_level), hline(100), color.new(color.red, 90))
fill(hline(0), hline(os_level), color.new(color.green, 90))
MFI-RSI Convergence Strategy거래량(Volume)과 가격 모멘텀을 동시에 고려하는 **MFI(Money Flow Index)**는 지지선에서의 '진짜 반등'을 포착하는 데 가장 강력한 도구입니다. 여기에 RSI를 결합하여 모멘텀의 강도까지 확인하는 'Hybrid Volume-Momentum Oscillator' 전략을 작성해 드립니다.
하이브리드 지표의 핵심 메커니즘
MFI(Money Flow Index)의 역할:
MFI는 단순히 가격이 낮아졌는가만 보는 것이 아니라, **'낮은 가격에서 거래량이 터졌는가'**를 계산합니다.
지지선에서 MFI가 20 이하로 떨어진다는 것은 "스마트 머니"가 매집을 준비하는 단계이거나, 투매가 정점에 달해 거래량이 실린 반등이 임박했음을 뜻합니다.
RSI와의 컨버전스(Convergence):
RSI는 가격의 속도를 측정합니다. MFI가 과매도인데 RSI가 아직 높다면, 거래량은 들어오지만 가격의 하락 관성이 여전히 강하다는 뜻입니다.
이 코드의 핵심은 mfi_val <= mfi_low와 rsi_val <= rsi_low가 동시에 만족될 때만 진입하는 것입니다. 이는 거래량 유입 + 하락 관성 둔화가 일치하는 고확률 타점입니다.
리페인팅 차단 및 현실적 시뮬레이션:
ta.mfi와 ta.rsi는 기본적으로 현재 봉의 종가를 기준으로 계산되므로 리페인팅이 발생하지 않습니다.
commission_value=0.05를 통해 거래소 수수료를 반영하여, 잦은 매매로 인한 손실 가능성을 미리 확인할 수 있게 설계했습니다.
//@version=6
strategy("MFI-RSI Convergence Strategy",
overlay=false, // 하단 지표 형태 확인을 위해 false 설정 (차트 위 신호는 별도 plotshape 사용)
initial_capital=10000,
default_qty_type=strategy.percent_of_equity,
default_qty_value=10,
commission_type=strategy.commission.percent,
commission_value=0.05,
slippage=1)
// --- ---
group_date = "1. 백테스트 기간"
start_time = input.time(timestamp("2024-01-01 00:00:00"), "시작일", group=group_date)
end_time = input.time(timestamp("2026-12-31 23:59:59"), "종료일", group=group_date)
within_window() => time >= start_time and time <= end_time
group_mfi = "2. MFI (Volume) 설정"
mfi_length = input.int(14, "MFI 기간", minval=1, group=group_mfi)
mfi_low = input.int(20, "MFI 과매도 (매수세 유입 대기)", group=group_mfi)
mfi_high = input.int(80, "MFI 과매수 (매도세 유입 대기)", group=group_mfi)
group_rsi = "3. RSI (Momentum) 설정"
rsi_length = input.int(14, "RSI 기간", minval=1, group=group_rsi)
rsi_low = input.int(30, "RSI 과매도", group=group_rsi)
rsi_high = input.int(70, "RSI 과매수", group=group_rsi)
group_risk = "4. 리스크 관리"
tp_pct = input.float(3.0, "익절 (%)", step=0.1, group=group_risk) / 100
sl_pct = input.float(1.5, "손절 (%)", step=0.1, group=group_risk) / 100
// --- ---
// MFI (가격 + 거래량 가중)
mfi_val = ta.mfi(close, mfi_length)
// RSI (가격 변동 강도)
rsi_val = ta.rsi(close, rsi_length)
// --- ---
// 매수 조건: MFI와 RSI가 모두 과매도 구간일 때 (강력한 반등 예상 지점)
long_condition = (mfi_val <= mfi_low) and (rsi_val <= rsi_low)
// 매도 조건: MFI와 RSI가 모두 과매수 구간일 때
short_condition = (mfi_val >= mfi_high) and (rsi_val >= rsi_high)
// --- ---
if within_window()
if long_condition
strategy.entry("Long", strategy.long, comment="VLM+MOM Bottom")
if short_condition
strategy.entry("Short", strategy.short, comment="VLM+MOM Top")
// 익절 및 손절 설정
strategy.exit("Ex Long", "Long", limit=strategy.position_avg_price * (1 + tp_pct), stop=strategy.position_avg_price * (1 - sl_pct))
strategy.exit("Ex Short", "Short", limit=strategy.position_avg_price * (1 - tp_pct), stop=strategy.position_avg_price * (1 + sl_pct))
// --- ---
// 배경 가이드라인
hline(mfi_high, "Upper Boundary", color=color.gray, linestyle=hline.style_dashed)
hline(50, "Middle", color=color.new(color.gray, 50))
hline(mfi_low, "Lower Boundary", color=color.gray, linestyle=hline.style_dashed)
// 지표 플롯
plot(mfi_val, "MFI (Volume Flow)", color=color.aqua, linewidth=2)
plot(rsi_val, "RSI (Momentum)", color=color.yellow, linewidth=1)
// 중첩 구간 강조 (Convergence)
fill_color = (mfi_val <= mfi_low and rsi_val <= rsi_low) ? color.new(color.green, 70) :
(mfi_val >= mfi_high and rsi_val >= rsi_high) ? color.new(color.red, 70) : na
bgcolor(fill_color)
// 신호 발생 시 하단에 아이콘 표시
plotshape(long_condition, title="Buy Signal", location=location.bottom, color=color.green, style=shape.triangleup, size=size.small)
plotshape(short_condition, title="Sell Signal", location=location.top, color=color.red, style=shape.triangledown, size=size.small)
EMA 9, 20, 30, 200 (Buy Trend Filter Only)EMA 9, 20, 30, 200 (Buy Trend Filter Only) simple ema crossing analysis






















