Stratégie SMC V18.2 (BTC/EUR FINAL R3 - Tendance)This strategy is an automated implementation of Smart Money Concepts (SMC), designed to operate on the Bitcoin/Euro (BTC/EUR) chart using the 15-minute Timeframe (M15).It focuses on identifying high-probability zones (Order Blocks) after a confirmed Break of Structure (BOS) and a Liquidity Sweep, utilizing an H1/EMA 200 trend filter to only execute trades in the direction of the dominant market flow.Risk management is strict: every trade uses a fixed Risk-to-Reward Ratio (R:R) of 1:3.🧱 Core Logic Components
1. Trend Filter (H1/EMA 200)Objective: To avoid counter-trend entries, which has allowed the success rate to increase to nearly $65\%$ in backtests.Mechanism: A $200$-period EMA is plotted on a higher timeframe (Default: H1/60 minutes).Long (Buy): Entry is only permitted if the current price (M15) is above the trend EMA.Short (Sell): Entry is only permitted if the current price (M15) is below the trend EMA.
2. Order Block (OB) DetectionA potential Order Block is identified on the previous candle if it is
accompanied by an inefficiency (FVG - Fair Value Gap).
3. Advanced SMC ValidationBOS (Break of Structure): A recent BOS must be confirmed by breaking the swing high/low defined by the swing length (Default: 4 M15 candles).Liquidity (Liquidity Sweep): The Order Block zone must have swept recent liquidity (defined by the Liquidity Search Length) within a certain tolerance (Default: $0.1\%$).Point of Interest: The OB must form in a premium zone (for shorts) or a discount zone (for longs) relative to the current swing range (above or below the $50\%$ level of the range).
4. Execution and Risk ManagementEntry: The trade is triggered when the price touches the active Order Block (mitigation).Stop Loss (SL): The SL is fixed at the low of the OB (for longs) or the high of the OB (for shorts).Take Profit (TP): The TP is strictly set at a level corresponding to 3 times the SL distance (R:R 1:3).Lot Sizing: The trade quantity is calculated to risk a fixed amount (Default: 2.00 Euros) per transaction, capped by a Lot Max and Lot Min defined by the user.
Input Parameters (Optimized for BTC/EUR M15)Users can adjust these parameters to modify sensitivity and risk profile. The default values are those optimized for the high-performing backtest (Profit Factor $> 3$).ParameterDescriptionDefault Value (M15)Long. Swing (BOS)Candle length used to define the swing (and thus the BOS).4Long. Recherche Liq.Number of candles to scan to confirm a liquidity sweep.7Tolérance Liq. (%)Price tolerance to validate the liquidity sweep (as a percentage of price).0.1Timeframe TendanceChart timeframe used for the EMA filter (e.g., 60 = H1).60 (H1)Longueur EMA TendancePeriods used for the trend EMA.200Lot Max (Quantité Max BTC)Maximum quantity of BTC the strategy is allowed to trade.0.01Lot Min Réel (Exigence Broker)Minimum quantity required by the broker/exchange.0.00001
Pesquisar nos scripts por "BOS"
Madstrat Strategy - Dual TF# Madstrat Strategy - Dual TF: Complete User Guide
## Overview
The Madstrat Strategy indicator is a comprehensive forex trading system that identifies high-probability trade setups based on a day-counting methodology combined with multi-timeframe EMA alignment analysis. It generates two primary signal types:
1. **Day 3 Signals** - Based on the GSD/RSD (Green Setup Day/Red Setup Day) counting system
2. **Pure Price Action (PA) Signals** - Based on EMA alignment across multiple timeframes with EQ rejection
The indicator operates on **two timeframe combinations simultaneously**:
- **15-minute / 1-hour** combo
- **30-minute / 2-hour** combo
---
## Section 1: Timeframe Signals
### Settings
| Input | Default | Description |
|-------|---------|-------------|
| Show 15m/1hr Signals | ✓ Enabled | Displays signals from the 15-minute LTF with 1-hour HTF confirmation |
| Show 30m/2hr Signals | ✓ Enabled | Displays signals from the 30-minute LTF with 2-hour HTF confirmation |
| Trade Levels Source | Most Recent | Determines which combo draws SL/TP levels |
### How It Works
Each timeframe combination operates independently with its own:
- Signal spacing rules (4 bars for 15m, 2 bars for 30m = both equal ~1 hour)
- Daily signal limits (3 Day 3 signals + 3 Pure PA signals per combo per day)
- EMA alignment checks on both LTF and HTF
**Trade Levels Source Options:**
- **15m/1hr** - Only 15m/1hr signals draw trade levels
- **30m/2hr** - Only 30m/2hr signals draw trade levels
- **Most Recent** - Whichever signal fires most recently draws levels (15m/1hr takes priority if both fire simultaneously)
---
## Section 2: Signal Colors
Customize the appearance of each signal type for each timeframe combination:
### 15m/1hr Combo
| Signal Type | Default Color |
|-------------|---------------|
| Day 3 Buy | Blue |
| Day 3 Sell | Red |
| Pure PA Buy | Aqua |
| Pure PA Sell | Fuchsia |
### 30m/2hr Combo
| Signal Type | Default Color |
|-------------|---------------|
| Day 3 Buy | Teal |
| Day 3 Sell | Orange |
| Pure PA Buy | Lime |
| Pure PA Sell | Maroon |
---
## Section 3: Enhanced FBR Rules
### What is FBR?
**FBR (Failed Breakout Retest)** occurs when price breaks below the previous week's low (or above the previous week's high) but fails to close outside the range, closing back inside instead. This signals a potential reversal and resets the day count to "Day 1" of a new setup sequence.
### Settings
| Input | Default | Description |
|-------|---------|-------------|
| Enable Enhanced FBR Rule | ✓ Enabled | Prevents FBR detection after a clean breakout |
| Show Clean Breakout Labels | ✓ Enabled | Displays labels when clean breakouts occur |
| Bull Breakout Label Color | Blue (25% transparent) | Background color for bullish breakout labels |
| Bear Breakout Label Color | Red (25% transparent) | Background color for bearish breakout labels |
### How Enhanced FBR Works
1. **Clean Breakout Detection**: A clean breakout occurs when price breaks AND closes outside the previous week's range
2. **FBR Blocking**: Once a clean breakout occurs in a week, FBR detection is disabled for the remainder of that week
3. **Weekly Reset**: Both clean breakout and FBR flags reset at the start of each new trading week (Sunday rollover)
### Label Types
- **"CLEAN BULL BO"** - Price broke above previous week high and closed above it
- **"CLEAN BEAR BO"** - Price broke below previous week low and closed below it
- **"FBR Day 1"** - Failed breakout retest detected, count reset to Day 1
---
## Section 4: Real-Time Day Labels
### Purpose
The real-time label shows a **live projection** of what today's day classification will be, updating throughout the trading session as price action develops.
### Settings
| Input | Default | Description |
|-------|---------|-------------|
| Enable Real-Time Day Labels | ✓ Enabled | Shows dynamic label that updates during trading |
| Real-Time Label Position | Right | Position of label relative to current candle |
| Real-Time Label Background | Yellow (20% transparent) | Background color |
| Real-Time Label Text | White | Text color |
### Label Text Meanings
| Label | Meaning |
|-------|---------|
| LIVE: GSD Day X | Projected Green Setup Day (after 2+ red days) |
| LIVE: GD Day X | Projected Green Day (continuing green trend) |
| LIVE: RSD Day X | Projected Red Setup Day (after 2+ green days) |
| LIVE: RD Day X | Projected Red Day (continuing red trend) |
| LIVE: INSIDE DAY | Price range is entirely within previous day's range |
| LIVE: FBR - GSD Day 1 | Bullish failed breakout retest detected |
| LIVE: FBR - RSD Day 1 | Bearish failed breakout retest detected |
| LIVE: ... CLEAN BULL BO | Clean bullish breakout detected |
| LIVE: ... CLEAN BEAR BO | Clean bearish breakout detected |
---
## Section 5: Daily Session Definition
### Instrument Presets
| Preset | Sunday Open | Friday Close | Rollover | Use Case |
|--------|-------------|--------------|----------|----------|
| Forex (FX Pairs) | 17:05 ET | 16:59 ET | 17:00 ET | EUR/USD, GBP/USD, etc. |
| Metals (XAU/XAG) | 18:05 ET | 16:59 ET | 17:00 ET | Gold, Silver |
| Custom | User-defined | User-defined | User-defined | Other instruments |
### Why This Matters
The indicator uses **OANDA-style daily rollover** (5 PM Eastern) rather than UTC midnight. This ensures:
- Accurate day counting for forex markets
- Correct GSD/RSD classification
- Proper weekly level calculations
### Session Break Line
| Input | Default | Description |
|-------|---------|-------------|
| Show Session Break Line | ✓ Enabled | Draws vertical line at daily rollover |
| Session Break Line Color | Black | Line color |
| Width | 2 | Line thickness (1-5) |
| Style | Solid | Solid, dashed, or dotted |
---
## Section 6: Day Labels (GSD/RSD System)
### The Core Day Counting Methodology
This is the foundation of the Madstrat Strategy:
1. **Green Day (GD)**: Daily candle closes higher than it opened
2. **Red Day (RD)**: Daily candle closes lower than it opened
3. **Green Setup Day (GSD)**: A green day that follows 2 or more consecutive red days
4. **Red Setup Day (RSD)**: A red day that follows 2 or more consecutive green days
### The Day 3 Signal
**Day 3** is when the setup is "mature" and ready for a trade:
- **GSD Day 3**: Third consecutive green day after a red sequence of 2+ days
- **RSD Day 3**: Third consecutive red day after a green sequence of 2+ days
### Settings
| Input | Default | Description |
|-------|---------|-------------|
| Max Historical Labels | 60 | Number of day labels to retain on chart |
| Show Day of Week Labels | ✓ Enabled | Shows M O N, T U E, etc. |
| Label Position | Top | Top or bottom of chart |
| Label Hour | 6 | Hour (0-23) when day labels appear |
| GSD/GD Label Background | Blue (25% transparent) | Green day label color |
| RSD/RD Label Background | Red (25% transparent) | Red day label color |
| Inside Day Label Background | Gray (25% transparent) | Inside day label color |
### Important Notes
- **Inside Days** do not increment the count - they are neutral
- **FBR events** reset the count to Day 1 and establish a new trend direction
- **Clean Breakouts** also reset to Day 1 but block further FBR detection that week
---
## Section 7: Daily Levels
Displays the previous day's key price levels:
### Available Levels
| Level | Default | Description |
|-------|---------|-------------|
| Previous Day's High (PDH) | ✓ Enabled, Blue | Highest price of previous session |
| Previous Day's Low (PDL) | ✓ Enabled, Green | Lowest price of previous session |
| Previous Day's EQ | ✓ Enabled, Black | Equilibrium (midpoint of PDH/PDL) |
| 75% Level | ✗ Disabled | 75% of previous day's range |
| 25% Level | ✗ Disabled | 25% of previous day's range |
### EQ Rejection (Critical for Signals)
The **EQ (Equilibrium)** level is crucial for signal generation:
- **Bullish EQ Rejection**: Price wicks down to touch EQ, then closes above it
- **Bearish EQ Rejection**: Price wicks up to touch EQ, then closes below it
The indicator tracks these rejections throughout the day and uses them as a key filter for both Day 3 and Pure PA signals.
---
## Section 8: Weekly Levels
### Previous Week Levels
| Level | Description |
|-------|-------------|
| PWH (Previous Week High) | Highest price of the completed previous week |
| PWL (Previous Week Low) | Lowest price of the completed previous week |
| PWEQ (Previous Week EQ) | Midpoint of PWH and PWL |
### Current Week Levels
| Level | Description |
|-------|-------------|
| WH (Week High) | Running high of the current week |
| WL (Week Low) | Running low of the current week |
| WEQ (Week EQ) | Running midpoint of current week |
### Settings
| Input | Default | Description |
|-------|---------|-------------|
| Show Weekly Levels | ✓ Enabled | Master toggle for all weekly levels |
| Show Previous Week High/Low/EQ | ✓ Enabled | PWH, PWL, PWEQ lines |
| Previous Week Line Color | Black | Color for PW levels |
| Previous Week Line Width | 2 | Thickness of PW lines |
| Show Current Week High/Low | ✓ Enabled | WH, WL lines (dashed) |
| Current Week Line Color | Blue | Color for current week levels |
| Show Weekly Level Labels | ✓ Enabled | Text labels at line ends |
| Weekly Label Size | Normal | Tiny to Huge |
| Lines & Labels End Day | Friday | Extend lines to which day |
---
## Section 9: Session Overlays
Visual boxes showing major forex trading sessions:
### Available Sessions
| Session | Default Times (ET) | Default State |
|---------|-------------------|---------------|
| Sydney | 18:00 - 02:00 | ✗ Disabled |
| Asian | 19:00 - 04:15 | ✓ Enabled |
| London | 01:00 - 11:15 | ✓ Enabled |
| New York | 07:30 - 17:15 | ✓ Enabled |
### Customization Options
For each session:
- Start/End Hour and Minute
- Timezone
- Background color (with transparency)
- Border color
- Border style (solid, dashed, dotted)
- Border width
### General Session Settings
| Input | Default | Description |
|-------|---------|-------------|
| Show Session Overlays | ✓ Enabled | Master toggle |
| Show Session Names on Boxes | ✓ Enabled | Display "Sydney", "Asia", etc. |
| Session Box Border Width | 1 | Border thickness |
| Session Name Text Color | Black | Label text color |
| Session Name Size | Normal | Tiny to Huge |
---
## Section 10: Chart Visuals (Moving Averages)
### Available Moving Averages
| MA | Default | Default Color | Purpose |
|----|---------|---------------|---------|
| 9 EMA | ✓ Shown | Green | Fast trend |
| 18 EMA | ✓ Shown | Orange | Medium trend |
| 50 EMA | ✓ Shown | Blue | Slow trend |
| 50 SMA | ✓ Shown | Purple | Alternative slow trend |
| 200 EMA | ✗ Hidden | Red | Long-term trend |
### EMA Alignment Requirement
For signals to fire, the EMAs must be properly "stacked":
**Bullish Alignment:**
```
Price > 9 EMA > 18 EMA > 50 EMA
```
**Bearish Alignment:**
```
Price < 9 EMA < 18 EMA < 50 EMA
```
This alignment must be present on **both** the LTF (15m or 30m) **and** the HTF (1hr or 2hr) for a signal to generate.
---
## Section 11: Signal Filters
### EQ Rejection Recency
| Input | Default | Description |
|-------|---------|-------------|
| EQ Rejection Recency (bars) | 4 | EQ rejection must occur within this many bars |
On a 15-minute chart, 4 bars = 1 hour. This ensures the EQ rejection is "fresh" and relevant.
### Session Filter
| Input | Default | Description |
|-------|---------|-------------|
| Enable Session Filter | ✗ Disabled | Only allow signals during selected sessions |
| Allow Sydney Session Signals | ✓ Enabled | (Only applies if filter enabled) |
| Allow Asian Session Signals | ✓ Enabled | |
| Allow London Session Signals | ✓ Enabled | |
| Allow New York Session Signals | ✓ Enabled | |
### ADX Filter
| Input | Default | Description |
|-------|---------|-------------|
| Enable ADX Filter | ✓ Enabled | Require minimum trend strength |
| ADX Threshold | 20.0 | Minimum ADX value (5.0 - 50.0) |
The ADX (Average Directional Index) measures trend strength. Values above 20-25 indicate a trending market suitable for directional trades.
---
## Section 12: Signal Types Explained
### Day 3 Signals (Primary)
Day 3 signals come in two forms:
#### Day 3 Detected (Live)
Fires when the **current day is projected** to become Day 3 based on real-time price action. This is an early signal that may change if the daily candle reverses before close.
#### Day 3 Confirmed
Fires when Day 3 has been **officially confirmed** by the previous day's close. This is a more reliable signal as the day count is locked in.
**Requirements for Day 3 Buy:**
1. GSD Count = 3 (confirmed) OR Projected GSD Count = 3 (live)
2. Not an inside day (current or previous)
3. Recent bullish EQ rejection (within recency bars)
4. Bullish EMA alignment on LTF
5. Bullish EMA alignment on HTF
6. Adequate candle body (not all wick)
7. ADX above threshold (if enabled)
8. Within allowed session (if filter enabled)
9. Signal spacing requirement met
10. Less than 3 Day 3 signals already today for this combo
**Day 3 Sell** - Same requirements but bearish (RSD Count = 3, bearish alignment, bearish EQ rejection)
### Pure PA Signals (Secondary)
Pure PA signals also come in two forms:
#### Pure PA Detected (LTF Only)
Fires when the **lower timeframe conditions** are met but HTF confirmation is still pending. This is an early warning that a full signal may be imminent.
#### Pure PA Confirmed (LTF + HTF)
Fires when **both LTF and HTF** conditions are aligned. This is the full confirmation signal.
**Requirements for Pure PA Buy:**
1. Recent bullish EQ rejection
2. Bullish EMA alignment on LTF (Price > 9 > 18 > 50)
3. Bullish EMA alignment on HTF (Price > 9 > 18 > 50)
4. Adequate candle body ratio (≥30%)
5. ADX above threshold on LTF
6. Not currently an inside day
7. Signal spacing requirement met
8. Less than 3 Pure PA signals already today for this combo
9. Within allowed session (if filter enabled)
**Pure PA Sell** - Same requirements but bearish
---
## Section 13: Trade Levels
When a signal fires, the indicator can draw:
| Level | Style | Description |
|-------|-------|-------------|
| Stop Loss (SL) | Red dashed | Entry price ± (ATR × 1.5) |
| Take Profit 1 | Green dashed | 1:1 Risk/Reward |
| Take Profit 2 | Green dotted | 2:1 Risk/Reward |
| Take Profit 3 | Green dotted | 3:1 Risk/Reward |
These levels use a 14-period ATR for the stop loss calculation.
---
## Section 14: Debug Table
Enable **Show Debug Table** to display real-time diagnostic information:
### Information Displayed
| Category | Variables |
|----------|-----------|
| Day Counting | GSD Count, RSD Count, Projected GSD, Projected RSD |
| Day State | Is Projected D3?, Currently Inside?, Week Has FBR?, Clean Breakout (Week)? |
| 15m/1hr Combo | LTF Bull/Bear Positioning, HTF Bull/Bear Positioning, D3/PA Signals Today, Signal Spacing OK |
| 30m/2hr Combo | LTF Bull/Bear Positioning, HTF Bull/Bear Positioning, D3/PA Signals Today, Signal Spacing OK |
| Shared | EQ Rejection Recent (Bull/Bear), Session Filter OK, 15m ADX, 30m ADX, Trade Levels Source |
Green cells = condition met (true)
Red cells = condition not met (false)
Gray cells = informational values
---
## Section 15: Alert Settings
The indicator features a comprehensive **enhanced alert system** with granular control over when and how alerts fire.
### Alert Settings Inputs
| Input | Default | Description |
|-------|---------|-------------|
| Enable Dynamic Alerts | ✓ Enabled | Master toggle for all dynamic alerts with detailed messages |
| Day 3 Detected (Live) | ✓ Enabled | Alert when Day 3 is projected based on current price action |
| Day 3 Confirmed | ✓ Enabled | Alert when Day 3 is officially confirmed |
| Pure PA Detected (LTF) | ✓ Enabled | Alert when LTF conditions are met (early warning) |
| Pure PA Confirmed (LTF+HTF) | ✓ Enabled | Alert when both LTF and HTF conditions align |
### Alert Message Format
All dynamic alerts follow a standardized format for easy parsing:
```
TYPE | SYMBOL @ PRICE | DAY_CLASS | SESSION | DIRECTION | COMBO
```
**Example alerts:**
```
D3 DETECTED | EURUSD @ 1.08542 | GSD Day 3 | London | BUY | 15m/1hr
D3 CONFIRMED | GBPJPY @ 192.456 | RSD Day 3 | New York | SELL | 30m/2hr
PA DETECTED | XAUUSD @ 2345.67 | GSD Day 2 | Asian | BUY | 15m/1hr (LTF only)
PA CONFIRMED | EURJPY @ 164.123 | RSD Day 1 | London | SELL | 30m/2hr
```
### Alert Types Explained
| Alert Type | Meaning | Use Case |
|------------|---------|----------|
| **D3 DETECTED** | Day 3 projected based on current candle | Early entry opportunity; may invalidate if candle reverses |
| **D3 CONFIRMED** | Day 3 locked in from previous close | Higher confidence entry; day count is confirmed |
| **PA DETECTED** | LTF alignment met, waiting for HTF | Heads-up alert; prepare for potential entry |
| **PA CONFIRMED** | Both LTF and HTF aligned | Full confirmation; ready to execute |
### TradingView Alert Dialog Options
When creating an alert in TradingView, you'll see these condition options in the dropdown:
#### Day 3 Detected (Live Projection)
- D3 Detected: Buy 15m/1hr
- D3 Detected: Sell 15m/1hr
- D3 Detected: Buy 30m/2hr
- D3 Detected: Sell 30m/2hr
#### Day 3 Confirmed
- D3 Confirmed: Buy 15m/1hr
- D3 Confirmed: Sell 15m/1hr
- D3 Confirmed: Buy 30m/2hr
- D3 Confirmed: Sell 30m/2hr
#### Pure PA Detected (LTF Only)
- PA Detected: Buy 15m/1hr
- PA Detected: Sell 15m/1hr
- PA Detected: Buy 30m/2hr
- PA Detected: Sell 30m/2hr
#### Pure PA Confirmed (LTF + HTF)
- PA Confirmed: Buy 15m/1hr
- PA Confirmed: Sell 15m/1hr
- PA Confirmed: Buy 30m/2hr
- PA Confirmed: Sell 30m/2hr
#### Combined Alerts (Any Combo)
- D3 Detected: Any Buy
- D3 Detected: Any Sell
- D3 Confirmed: Any Buy
- D3 Confirmed: Any Sell
- PA Confirmed: Any Buy
- PA Confirmed: Any Sell
#### Master Alerts
- ALL Day 3: Any Buy
- ALL Day 3: Any Sell
- ALL PA: Any Buy
- ALL PA: Any Sell
### Setting Up Alerts
1. **Click the Alert icon** in TradingView (or press Alt+A)
2. **Select the indicator** "Madstrat Strategy - Dual TF"
3. **Choose the condition** from the dropdown (e.g., "D3 Confirmed: Any Buy")
4. **Configure notification options** (popup, email, webhook, etc.)
5. **Set alert name** and click "Create"
### Recommended Alert Configurations
**Conservative Approach:**
- Enable only "Day 3 Confirmed" and "PA Confirmed" alerts
- These fire after full confirmation on both timeframes
**Aggressive Approach:**
- Enable all alert types including "Detected" alerts
- Get early warnings but verify manually before entry
**Session-Specific:**
- Create separate alerts for each session you trade
- Use the session filter to limit when signals can fire
---
## Section 16: Signal Identification on Chart
| Shape | Text | Meaning |
|-------|------|---------|
| ▲ Triangle Up | D3-15 | Day 3 Buy from 15m/1hr combo |
| ▲ Triangle Up | D3-30 | Day 3 Buy from 30m/2hr combo |
| ▼ Triangle Down | D3-15 | Day 3 Sell from 15m/1hr combo |
| ▼ Triangle Down | D3-30 | Day 3 Sell from 30m/2hr combo |
| ◆ Diamond | PA-15 | Pure PA signal from 15m/1hr combo |
| ◆ Diamond | PA-30 | Pure PA signal from 30m/2hr combo |
---
## Quick Start Guide
### Recommended Setup for Forex
1. **Timeframe**: Apply indicator to a 15-minute chart
2. **Instrument Preset**: Select "Forex (FX Pairs)"
3. **Enable both** 15m/1hr and 30m/2hr signals initially
4. **Trade Levels Source**: "Most Recent"
5. **ADX Filter**: Enabled with threshold 20
6. **Alerts**: Enable "D3 Confirmed" and "PA Confirmed" for reliable signals
### Reading Signals
1. Look for **Day 3 signals** (triangles) as primary entries
2. Use **Pure PA signals** (diamonds) as supplementary entries
3. Check the debug table to understand why signals did/didn't fire
4. Reference the real-time day label to anticipate upcoming Day 3 opportunities
### Alert Strategy
**For active monitoring:**
- Enable "Detected" alerts as early warnings
- Manually verify conditions before entry
**For set-and-forget:**
- Enable only "Confirmed" alerts
- Trust the full confirmation system
---
## Troubleshooting
### No Signals Appearing?
Check the debug table for:
1. **EQ Rejection Recent** - Is there a recent EQ rejection?
2. **LTF/HTF Positioning** - Are EMAs properly aligned?
3. **GSD/RSD Count** - Is it actually Day 3?
4. **Currently Inside?** - Inside days block signals
5. **Signal Spacing OK** - Has enough time passed since last signal?
6. **ADX value** - Is it above the threshold?
### Day Labels Not Matching Expected Count?
- Verify **Instrument Preset** matches your trading instrument
- Check if an **FBR** or **Clean Breakout** reset the count
- **Inside days** don't increment the count
- Week resets occur at **Sunday 5 PM ET** for forex
### Alerts Not Firing?
1. Ensure **Enable Dynamic Alerts** is checked
2. Verify the specific alert type is enabled (D3 Detected, D3 Confirmed, etc.)
3. Check that the alert condition is properly set up in TradingView
4. Confirm signal filters (session, ADX) aren't blocking the signal
### Understanding Detected vs Confirmed
| Scenario | Detected Alert | Confirmed Alert |
|----------|----------------|-----------------|
| Current day projected to be Day 3, candle still open | ✓ Fires | ✗ Won't fire |
| Previous day closed as Day 3, conditions met today | ✓ May fire | ✓ Fires |
| LTF aligned, HTF not yet aligned | ✓ PA Detected fires | ✗ PA Confirmed won't fire |
| Both LTF and HTF aligned | ✓ May fire | ✓ PA Confirmed fires |
---
## Glossary
| Term | Definition |
|------|------------|
| **GSD** | Green Setup Day - Green day following 2+ red days |
| **RSD** | Red Setup Day - Red day following 2+ green days |
| **GD** | Green Day - Regular green day (not a setup) |
| **RD** | Red Day - Regular red day (not a setup) |
| **FBR** | Failed Breakout Retest - Price breaks weekly level but closes back inside |
| **EQ** | Equilibrium - Midpoint of previous day's range |
| **LTF** | Lower Timeframe (15m or 30m) |
| **HTF** | Higher Timeframe (1hr or 2hr) |
| **PWH/PWL** | Previous Week High/Low |
| **PDH/PDL** | Previous Day High/Low |
| **Clean Breakout** | Price breaks AND closes outside previous week's range |
---
This documentation covers the complete functionality of the Madstrat Strategy - Dual TF indicator including the enhanced alert system. For further assistance with specific scenarios or edge cases, enable the debug table and analyse the real-time variable states.
BORSA 321 - Care PackageOverview
Care Package is a complete higher-timeframe and intraday context tool designed to map out every important environmental factor on your chart: sessions, opening levels, gaps, market structure, order blocks, fair value gaps, volume imbalance and more.
It automatically plots:
Sessions / killzones (Asia, London, New York AM/Lunch/PM)
Key opening levels (00:00, 08:30, 09:30, 13:30)
Previous day AM/PM high–low ranges
New Day and New Week Opening Gaps (NDOG / NWOG)
RTH gap and RTH zone levels
Multi-timeframe Fair Value Gaps (up to 4)
Fractals and Order Blocks (with optional FVG confirmation)
Market structure (HH/HL/LL/LH, CHoCH, BOS)
Volume Imbalance zones with mitigation logic
All session logic runs on IANA time zones (like America/New_York), giving accurate sessions and market opens regardless of DST or broker feed.
Care Package serves as the full “context layer” for intraday execution charts.
What It Shows
1. Sessions / Killzones
The indicator automatically highlights:
Asia Session
London Session
New York AM
New York Lunch
New York PM
Each session displays:
A high–low range box
Labels for session high and session low
A midline showing the mean price
Optional forward extensions of session levels to the current bar
This cleanly outlines intraday phases for ICT/SMC execution.
2. Opening Price Levels
Key market open levels tracked:
00:00
08:30
09:30
13:30
For each open, the script draws:
A horizontal line at the opening price
A label showing time and price
An optional vertical line marking the opening bar
These opens often act as liquidity or reversal areas.
3. Previous Day AM/PM Levels
The script splits the prior day into:
Previous Day AM (first half)
Previous Day PM (second half)
Both provide:
PD AM High, PD AM Low
PD PM High, PD PM Low
Forward-projected levels
Labels for easy identification
Useful for navigating intraday targets and reaction zones.
4. Last N Days High/Low
Tracks a rolling daily range:
Each day’s High and Low
Labels containing the date
Forward extension into today’s price action
This shows where price sits relative to recent daily extremes.
5. New Day & New Week Opening Gaps (NDOG / NWOG)
The script automatically identifies:
NDOG (New Day Open Gap)
NWOG (New Week Open Gap)
Each gap includes:
A shaded zone between the two opens
Labels showing the gap type and date/week
Forward extension (optional)
Limiting the number of historical gaps (optional)
Critical for identifying unfilled imbalance zones across sessions and weeks.
6. RTH Gap & RTH Zone
You define RTH open/close times, and the indicator:
Detects RTH gaps
Draws a full zone based on direction
Plots subdivision lines (top, 75%, mid, 25%, bottom)
Extends the RTH Close reference line forward
Can extend old RTH zones automatically
Ideal for futures traders and equities.
7. Higher-Timeframe Fair Value Gaps (up to 4 TFs)
Supports up to four selectable FVG timeframes such as:
Chart timeframe
5m, 15m, 1H, 4H, 1D, 1W, 1M
Each FVG includes:
Top and bottom boundary
A midline (mean threshold)
Colored bullish or bearish fill
A label showing FVG + timeframe
Automatic cleanup when mitigated (close/wick based)
You get a clean and accurate HTF FVG map without clutter.
8. Fractals & Order Blocks
Fractals:
Standard or 5-bar fractals
Plotted as swing highs and lows
Order Blocks:
Bullish OB → down candle before up displacement
Bearish OB → up candle before down displacement
Optionally require OB to be near an FVG
Wick-based or body-based OB size
Forward-projected OB boxes
Auto-delete after mitigation
This keeps your OBs clean and execution-focused.
9. Market Structure (HH/HL/LL/LH, CHoCH, BOS)
The indicator automatically detects:
HH (Higher High)
HL (Higher Low)
LH (Lower High)
LL (Lower Low)
And also identifies:
CHoCH (Change of Character)
BOS (Break of Structure)
Each break includes:
A horizontal level at the break point
A color-coded label
Bullish (green) or bearish (red) styling
A complete market structure map is built automatically.
10. Volume Imbalances (VI)
Detects and displays:
Bullish VI (VI+)
Bearish VI (VI-)
Features:
Configurable colors
Custom label size
Max visible boxes
Extension until mitigation
Automatic mitigation detection (close or wick)
Highlight when price enters an active VI
Perfect for tracking aggressive buying/selling footprints.
11. Timezone & Date/Time Widget
Uses IANA timezones for:
Accurate session boundaries
Proper DST handling
Multi-market consistency
Also includes a small on-chart table showing:
Your timezone date/time
Exchange timezone date/time
Great for globally active traders.
12. Max Display Timeframe
To prevent clutter, the script disables visuals above a chosen timeframe.
If you exceed it:
A clean on-chart message appears
Tells you to lower your chart TF or adjust the Max Display TF
Keeps charts fast and clean
Key Inputs & Customization
Timezone (IANA format)
Max Display Timeframe
Session/Killzone toggles, colors, naming
Opening levels (00:00 / 08:30 / 09:30 / 13:30)
Previous Day AM/PM highs/lows
NDOG / NWOG gap settings
RTH gap settings
FVG batching (4 independent timeframes)
Fractal type
Order Block settings (range type, deletion, FVG filter)
Market structure settings
Volume Imbalance settings
Date/time widget settings
Everything is modular — turn features on/off individually.
How It Helps Traders
For Intraday Traders / Scalpers:
Session mapping for timing setups
Exact key opening prices
RTH gaps and internals
Precise daily AM/PM high–low context
HTF FVGs, OBs, VI zones for higher-timeframe bias
Real-time CHoCH/BOS for entry timing
For Swing Traders:
Daily/weekly context plotted automatically
NDOG, NWOG, RTH gap awareness
Macro structure levels
HTF FVGs and OBs for HTF targets
ILM & IFVG StrategyPlease feel free to adjust in any way possible. Let me know if you can create something better from this initial coding.
//═══════════════════════════════════════════════════════════════════════
// Inverted Liquidity Model (ILM) – Strategy
//═══════════════════════════════════════════════════════════════════════
//
// The **Inverted Liquidity Model (ILM)** is a liquidity-based algorithm
// built to capture high-probability reversals after:
//
// • A liquidity sweep (SSL/BSL taken)
// • Rejection back inside the range
// • A Fair Value Gap (FVG) forms
// • That FVG becomes invalidated → becomes an IFVG entry zone
//
// ILM combines:
// • LTF BOS / CHOCH structure confirmation
// • HTF structure (expansion) filtering
// • Premium / Discount filter (17:00 CST session midline)
// • Optional ATR volatility filter
// • Optional trading session restrictions
// • Optional partial profit-taking + runners
//
// When all conditions align, the strategy enters:
// ✔ Long after sweep of SSL + valid long IFVG + trend confirmation
// ✔ Short after sweep of BSL + valid short IFVG + trend confirmation
//
// Stops are placed at the sweep wick.
// Full target is set at the next structural high/low.
// Optional partial TP sends a runner to full target.
//
// Visual tools (labels, sweep lines, IFVG boxes, midline) assist
// with review and forward testing.
//
//───────────────────────────────────────────────────────────────────────
// USER CONFIGURABLE FEATURES
//───────────────────────────────────────────────────────────────────────
//
// • **Liquidity & Structure**
// - pivotLen → swing length for pivots / liquidity
// - htfOn → toggle higher-timeframe pivots
// - htfTF → timeframe for HTF structure/liquidity
// - useStructureFilter → enforce LTF BOS/CHOCH trend
// - useHtfExpansionFilter → enforce HTF trend
// - showStructureLabels → show BOS/CHOCH labels
// - showHtfStructureLabels → show HTF BOS/CHOCH labels
//
// • **Premium / Discount Midline**
// - usePremiumDiscountFilter → only long in discount / short in premium
// - pdSession → session used for midline (default 17:00 CST)
// - showPdMidLine → show 50% midline
//
// • **FVG / IFVG Detection**
// - useBodyGapFVG → FVG uses candle bodies instead of wicks
// - useDisplacementFVG → require displacement bar
// - dispAtrMult → minimum ATR threshold for displacement
// - showIFVG → draw IFVG boxes
//
// • **ATR / Volatility / Sessions**
// - useRangeFilter → require minimum ATR%
// - atrLen → ATR period
// - minAtrPerc → minimum ATR% of price
// - useSessionFilter → restrict trading hours
// - sessionTimes → allowed trading session
//
// • **Sweep Visualization**
// - showSweepLines → draw sweep lines at SSL/BSL sweeps
// - sweepLineWidth → thickness of sweep lines
//
// • **Exits: Partial Targets & Runners**
// - usePartialTargets → enable partial TP logic
// - tp1QtyPercent → percent closed at TP1
// - tp1FractionOfPath → TP1 relative to path to full target
//
// • **Formatting / Visibility**
// - labelFontSizeInput → tiny / small / normal / large / huge
// - showEntries → entry markers
// - showTargets → target lines
//
//═══════════════════════════════════════════════════════════════════════
// END OF STRATEGY DESCRIPTION
//═══════════════════════════════════════════════════════════════════════
Session Breakout, Retest, Reversal + Large Move Alert## **Session Breakout, Retest, Reversal + Large Move Alert**
### Overview
A powerful multi-functional indicator designed for day traders and futures traders to identify session-based breakout opportunities, retest confirmations, and significant price movements across all futures contracts (Gold, E-mini S&P 500, Nasdaq, Crude Oil, and more).
### Key Features
**📊 Pre-Market Session Tracking**
- Automatically calculates pre-market/overnight session highs and lows
- Displays session ranges with customizable colors and styling
- Extends lines through the entire trading session for easy reference
- Supports overnight sessions (e.g., 4 PM – 7:30 AM for Gold futures)
**🚀 Breakout Detection**
- Identifies breakouts above/below pre-market highs and lows
- Uses close-price confirmation to filter false signals from wicks
- Displays "BO ↑" and "BO ↓" labels at breakout points
- Generates instant alerts when breakouts occur
**♻️ Retest Failed Tracking**
- Monitors price retests after breakouts
- Detects when retests fail to reach previous support/resistance
- Labels "RF" (Retest Failed) for high-probability trade setups
- Helps identify reversal opportunities
**📈 First 5-Minute Analysis**
- Captures first 5 minutes of market open (customizable timeframe)
- Tracks first 5-minute highs and lows separately
- Essential for mean-reversion and breakout confirmation strategies
- Blue lines extend through the trading session for easy tracking
**⚡ Large Move Alerts**
- Detects significant price movements based on point thresholds
- Individual thresholds for 5+ different symbols:
- GC (Gold): 15 points
- ES (E-mini S&P 500): 15 points
- NQ (E-mini Nasdaq): 50 points
- CL (Crude Oil): 1.5 points
- Custom: Fully adjustable
- Auto-detects symbol from chart ticker
- Labels show exact point movement and candle direction
### Customization Options
**Symbol Configuration**
- **Auto-Mode**: Automatically detects trading symbol from chart ticker
- **Manual-Mode**: Select specific symbol (GC, ES, NQ, CL, or Custom)
**Session Settings**
- Fully customizable pre-market session time (24-hour format)
- Adjustable market open time for first 5-minute window
- Market close hour and minute configuration
- Support for any timezone
**Point Move Thresholds by Symbol**
- Set independent thresholds for each of your trading symbols
- Quickly adjust settings when switching between different futures
- Includes helpful tooltips for recommended values
**Display & Styling**
- Toggle all visual elements on/off individually
- Customizable colors for all lines and labels:
- Pre-market high/low colors
- Breakout labels (up/down)
- Retest failed labels
- First 5-minute session lines
- Large move indicators
- Text size options: tiny, small, normal, large, huge
### How It Works
1. **Session Tracking**: The indicator identifies your pre-market session and marks the high and low with labeled lines (PH/PL)
2. **Breakout Signal**: Once the market opens, it monitors for close prices above/below the pre-market levels and alerts you with "BO ↑" or "BO ↓"
3. **Retest Confirmation**: After a breakout, it tracks retests and labels "RF" when the retest fails to reach the opposite extreme, confirming trade direction
4. **Large Move Detection**: Simultaneously monitors for significant point moves that exceed your symbol-specific thresholds
5. **Alert Triggers**: Get real-time alerts for:
- Breakout Up/Down
- Any Breakout
- Large Move events
### Alert Conditions
The indicator includes four alert conditions:
- **Breakout Up Alert**: Price closes above pre-market high
- **Breakout Down Alert**: Price closes below pre-market low
- **Any Breakout Alert**: Either breakout condition triggers
- **Large Move Alert**: Point movement exceeds threshold for current symbol
### Ideal For
- ✅ Day traders (breakout/retest strategies)
- ✅ Futures traders (Gold, Oil, Stock Index Contracts)
- ✅ Intraday scalpers (first 5-minute analysis)
- ✅ Swing traders (session-based levels)
- ✅ Multi-symbol traders (independent thresholds per symbol)
### Disclaimer
This indicator is designed for educational and informational purposes. Past performance does not guarantee future results. Always use proper risk management and position sizing. Test thoroughly on historical data before trading live.
Screener (ILPAC) [AlgoAlpha]🟠 OVERVIEW
This script is a powerful multi-symbol scanner designed to work as a companion to the "Institutional Liquidity & PA Concepts" (ILPAC) indicator. It allows you to monitor the key price action and liquidity signals from the ILPAC suite across a watchlist of up to 18 assets, all from a single dashboard. The primary goal of this tool is to provide a high-level market overview, enabling you to efficiently spot assets that are showing strong structural trends, interacting with key liquidity zones, or exhibiting signs of FOMO-driven volatility.
Instead of switching between dozens of charts, you can use this screener to quickly filter for assets that meet your specific trading criteria based on the advanced concepts of market structure, liquidity analysis, trend lines, and market sentiment.
🟠 CONCEPTS
The screener is built upon the core analytical engine of the "Institutional Liquidity & PA Concepts" indicator. It applies the proprietary algorithms of the ILPAC indicator to each symbol in your watchlist and presents the results in an easy-to-digest table. The concepts are combined to create a holistic view of the market.
Each column in the table is a window into a specific trading concept:
Market Structure: This is the foundation of price action analysis. The screener identifies the current market trend (bullish or bearish) by tracking swing highs and lows. It also flags critical events like a Break of Structure (BOS), which signals trend continuation, and a Change of Character (CHoCH), which suggests a potential trend reversal.
Liquidity Analysis: The screener analyzes order flow to determine where significant liquidity is resting. The "Liquidity Bias" column shows the net direction of this pressure, while the "Liquidity Event" column alerts you when price interacts with these key zones, either by forming a new one or mitigating an old one.
Trend Lines: This concept automates the classic technical analysis technique of drawing trend lines. The screener identifies significant swing points to form trend lines and then monitors them, alerting you to potential trend continuations or breakouts.
FOMO Bubbles: This concept measures crowd psychology by identifying sudden spikes in volume and price movement that are characteristic of "Fear of Missing Out." These signals can help identify potential trend exhaustion points or the start of a speculative rally.
By presenting these distinct but interconnected concepts together, the screener provides a multi-faceted view that allows traders to build a strong, confluence-based trading thesis.
🟠 FEATURES
This screener organizes a vast amount of data into a simple, color-coded table. Here is a breakdown of each column and the values you can expect to see:
Asset: Displays the ticker symbol for the asset being analyzed.
Market Structure: Shows the dominant trend based on swing highs and lows.
Bull: The asset is in a structural uptrend (making higher highs and higher lows).
Bear: The asset is in a structural downtrend (making lower highs and lower lows).
Detecting: The trend is neutral or a clear structure has not yet been established.
Structure Event: Flags the most recent significant market structure event.
Bull CHoCH: A bullish Change of Character, signaling a potential shift from a downtrend to an uptrend.
Bear CHoCH: A bearish Change of Character, signaling a potential shift from an uptrend to a downtrend.
Bull BOS: A bullish Break of Structure, confirming the continuation of an uptrend.
Bear BOS: A bearish Break of Structure, confirming the continuation of a downtrend.
–: No significant event has occurred recently.
Latest Swing Label: Identifies the most recently confirmed swing point.
HH: Higher High.
HL: Higher Low.
LH: Lower High.
LL: Lower Low.
–: No new swing point has been confirmed.
Liquidity Bias: Measures the net direction of liquidity and its relative strength.
▲ : A bullish liquidity bias, where the number indicates the strength.
▼ : A bearish liquidity bias, where the number indicates the strength.
Balanced: Liquidity is relatively balanced between buyers and sellers.
Liquidity Event: Indicates recent interactions with key liquidity zones.
New▲: A new bullish liquidity zone has just formed.
New▼: A new bearish liquidity zone has just formed.
Mit▲: Price has just tested (mitigated) a key bullish liquidity zone.
Mit▼: Price has just tested (mitigated) a key bearish liquidity zone.
–: No recent interaction.
Trend Line: Displays the status of automatically drawn trend lines.
Break▲: Price has broken above a key bearish trend line.
Break▼: Price has broken below a key bullish trend line.
Bull TL: Price is respecting an active bullish trend line.
Bear TL: Price is respecting an active bearish trend line.
–: No significant trend line is currently active.
FOMO: Detects sentiment-driven price moves of varying intensity.
Big▲/Med▲/Small▲: A bullish FOMO bubble has been detected (large, medium, or small).
Big▼/Med▼/Small▼: A bearish FOMO bubble has been detected (large, medium, or small).
–: No FOMO activity detected.
🟠 USAGE
The primary way to use this screener is to quickly scan your watchlist for assets that exhibit a confluence of bullish or bearish signals, which can significantly improve the probability of a trade.
1. Setup and Configuration:
Add the screener to your chart.
Open the settings and populate the "Watchlist" section with the symbols you want to track.
Fine-tune the input settings for each component (Market Structure, Liquidity, etc.) to match your preferred trading style. These settings will apply to all symbols in the table.
2. Interpreting the Columns for Trading Decisions:
Market Structure Columns: Use the first three structure columns to define your trading bias. For a high-probability long setup, you would look for an asset with a "Bull" structure, a recent "Bull BOS" event, and a "HL" as the latest swing point. This confirms the uptrend is healthy and ongoing.
Liquidity Columns: These are crucial for identifying key price levels. A strong "Liquidity Bias" can confirm your directional bias. A "Mit▲" (mitigation) event at a support level can be a powerful entry trigger, as it shows that institutional buy orders are defending that zone.
Trend Line Column: This is ideal for breakout traders. A "Break▲" signal can serve as an excellent entry confirmation, especially if the overall "Market Structure" is already "Bull".
FOMO Column: This column is best used for identifying potential exhaustion points. For instance, if you are in a long trade and a "Big▲" FOMO signal appears after a strong rally, it could be a sign that the move is overextended and it's a good time to consider taking profits.
Script pago
量价策略信号+K线pinbar+波动率出场+市场结构【梦喂马】v3Part 1: Indicator Module Explained (Code Analysis and Function Description)
Module 1: Master Switches
This is your "dashboard master control." Due to the numerous indicator functions, charts can appear cluttered. Here, you can easily turn each major function module on or off, allowing you to focus on the information you need most.
- Suggested Usage: When using it for the first time, you can start by only turning on the Vegas Channel and Core Entry Signals to familiarize yourself with the system's main trend judgment and entry logic. Then gradually turn on other modules to experience how they work together.
Module 2: Core Entry Signals (Long/Short Signals)
This is the "engine" of the entire system, responsible for generating the highest quality trend-following trading signals. The appearance of a "long" or "short" signal represents the resonance of multiple indicators, satisfying extremely stringent filtering conditions:
- 1. Vegas Channel Filtering:
- When going long, the price must be above the slow channel (576/676 EMA) and the fast channel (21/55 EMA).
- When shorting, the price must break below both the slow and fast channels.
- Interpretation: This ensures your trading direction is perfectly aligned with the medium- to long-term macro trend.
- 2. Alligator Line Confirmation:
- When going long, the price must be above the alligator lines (lips, teeth, jaws), and the alligator lines must be in a bullish alignment (opening upwards).
- When shorting, the opposite applies.
- Interpretation: This confirms that short-term momentum aligns with the long-term trend, avoiding hasty entry at the start or end of a trend.
- 3. OBV (On-Balance Volume) Filter:
- When going long, the OBV value must be above its own moving average (default 34 periods).
- When shorting, the OBV value must be below its moving average.
- Interpretation: OBV is a key indicator measuring fund inflows and outflows. This condition ensures that trading volume (funds) is supporting your trading direction.
- 4. ADX Trend Strength Filter:
- Whether going long or short, the ADX value must be greater than the set threshold (default 20).
- Interpretation: This is a crucial "insurance" layer. It helps filter out volatile market conditions with no clear direction, prone to repeated "misjudgments." We only act in markets with clear and strong trends.
Core Usage: Once a "long"/"short" signal appears, it represents a high-certainty trend-following trading opportunity. Due to the very strict nature of the signals, they appear infrequently, but each one deserves your close attention.
Module Three: Vegas Channel & Alligator Line (Trend Judgment Tool)
- Vegas Channel: Composed of two sets of EMAs.
- Slow Channel (576/676): Your "bull/bear dividing line." Above this line, only consider going long; below this line, only consider going short. It is your strategic compass.
- Fast Channel (21/55): Your "short-term momentum line." In an uptrend, price pullbacks to the vicinity of the fast channel are potential areas for adding to positions or entering.
- Alligator Line:
- Widening divergence: Indicates that a trend is underway.
- Convergence/Entanglement: Indicates the market is dormant or consolidating.
- Interpretation: Alligator lines allow you to visually see whether the market is in a "trending" or "consolidating" state. We primarily trade when the alligator lines widen.
Module Four: R/C Volume-Price Signals (Refined Entry/Warning Signals)
This is the system's "special forces," specifically designed to identify abnormal volume and price movements on key candlesticks. It is divided into the R series (Reversal) and the C series (Continuation).
- Prerequisites: All signals are based on trading volume. A signal's appearance must be accompanied by a significantly higher-than-average trading volume (increased volume). This indicates large capital participation at that price level, making the signal more reliable.
- R Series - Trend Reversal Signals (Warning/Opportunity):
- R1 (Core Reversal): In a downtrend, a sudden increase in volume on a bullish candlestick; or in an uptrend, an increase in volume on a bearish candlestick.
- Interpretation: This is the most basic reversal warning signal. It tells you that counter-trend forces are emerging, but it doesn't mean the trend will immediately reverse. Confirmation needs to be combined with other signals.
- R2 (Pattern Confirmation): In addition to R1, this candlestick must also be a well-defined Pin Bar (a bullish Pin Bar with a long lower shadow, or a bearish Pin Bar with a long upper shadow).
- Interpretation: This is a more reliable reversal signal. The Pin Bar pattern represents a strong rejection of the price after an attempt to break through; combined with increased volume, this indicates strong reversal momentum.
- R3 (Top Momentum): In addition to R2, the trading volume reaches a "massive" level (default is more than 4 times the average volume).
- Interpretation: This is the highest level reversal signal. It usually appears at the end of a trend, representing the extreme struggle and conversion of bullish and bearish forces, and is a potential sign of a "V-shaped reversal" or a deep V-bottom/top.
- C Series - Trend Continuation/Termination Signals:
- C0 (Trend Continuation): In a clear uptrend, a bearish Pin Bar (long upper shadow) with increased volume appears during a price pullback; or in a downtrend, a bullish Pin Bar (long lower shadow) with increased volume appears during a rebound.
- Interpretation: This is a classic "buy on pullback/sell on rebound" signal. It indicates that the pullback/rebound attempt to counterattack is quickly suppressed by the strong main trend, making it an excellent entry point for adding to positions or following the trend.
- CX (Exhaustion Signal): A C-series signal that appears when the price has moved far away from the slow Vegas Channel (default more than 5 times the ATR distance).
- Interpretation: This is an advanced use of the C-series. After a trend has run for a long time, market sentiment may be overly enthusiastic. The high-volume PinBar appearing at this time, while trend-following in form, is more likely to represent the exhaustion or "final frenzy" of the trend. This is an alert that the trend may be running out of momentum, and you should consider taking profits in batches rather than adding to your position.
Signal Priority: This indicator has been internally optimized: CX/R3 > R2 > C0 > R1. Higher-level signals will override lower-level signals, ensuring you see the most important information at the moment.
Module 5: Chandelier Exit - Dynamic Risk Management
This is a dynamic stop-loss system based on ATR (Average True Range).
- How it works:
- In an uptrend, it subtracts N times the ATR from the recent high, forming a stepped upward stop-loss line.
- In a downtrend, it adds N times the ATR from the recent low, forming a stepped downward stop-loss line.
- Core advantages: It automatically adjusts the stop-loss distance based on market volatility. During periods of high market volatility, the stop-loss widens, giving you more room; during periods of market stability, the stop-loss tightens, locking in profits more quickly.
- Usage:
- As an initial stop-loss: After entering a position, the stop-loss can be set outside the Chandelier line.
- As a trailing stop: The position is held as long as the price does not fall below (uptrend) or rise above (downtrend) the Chandelier line. This is a powerful tool for "letting profits run."
- As an auxiliary trend indicator: The direction of the chandelier line (upward/downward) also provides a concise short-term trend perspective.
Module Six: Candlestick Coloring
This feature is very intuitive; it colors candlesticks based on volume:
- High Volume (Orange): Volume exceeds twice the average volume.
- Huge Volume (Red): Volume exceeds four times the average volume.
- Usage: Helps you identify key candlesticks indicating significant market events at a glance, typically the start, acceleration, reversal, or exhaustion points of a trend.
Module Seven: ICT Market Structure
This is an advanced price behavior analysis tool based on ICT (Inner Circle Trader) theory, helping you understand the market's "skeleton."
- Core Concepts:
- Swing High/Low: Local tops and bottoms in market prices.
- BOS (Break of Structure): In an uptrend, the price creates a higher high than the previous swing high; in a downtrend, it creates a lower low.
- Interpretation: BOS (Bullish Oscillator) is a confirmation signal of trend continuation. Consecutive upward BOS indicate a healthy bullish trend, and vice versa.
- MSS (Market Structure Shift, also often called CHOCH): In an uptrend, the price fails to make a new high and instead falls below the previous valid swing low.
- Interpretation: MSS is the first and most important signal of a potential trend reversal. It indicates that market forces are shifting from bullish to bearish (or vice versa).
- Period Settings (Short/Intermediate/Long Term):
- Short Term: Based on the most minute 3-bar swing points, very sensitive, suitable for short-term traders to observe subtle changes.
- Intermediate Term (Recommended): Based on higher-level swing points formed from short-term swing points, filtering out some noise, suitable for day and swing traders.
- Long Term: Based on swing points formed from intermediate-term swing points, reflecting a longer-term structure, suitable for swing and long-term traders.
- Usage: Combine market structure with your trading signals. For example, in an uptrend (price above the Vegas Channel), each upward BOS confirms the health of the trend. If a C0 pullback signal appears at this point, it would be an excellent entry point. Conversely, if an MSS appears, even with a strong buy signal, caution is advised, as the trend may be reversing.
Module Eight: Information Panel
This is your "cockpit dashboard," consolidating all key information in one place, giving you a clear overview of the current market state:
- Main Trend Direction: The final trend judgment given by multiple indicators.
- Alligator Line Pattern: Shows whether the current trend is trending or consolidating.
- OBV Status: Whether funds are flowing in or out.
- ADX Status: Whether the trend is strong or weak.
- Chandelier Stop-Loss Direction: Short-term trend direction.
Synapse Dynamics - Market Structure📊 SYNAPSE DYNAMICS - MARKET STRUCTURE INDICATOR
An educational tool for learning and practicing Smart Money Concepts (SMC) methodology through visual representation of institutional price action patterns.
═══════════════════════════════════════════════════
🎯 WHAT THIS INDICATOR DISPLAYS
This indicator visualizes Smart Money Concepts patterns on your chart:
- Order Blocks (OB) - Supply and demand zones based on institutional order flow theory. The indicator identifies these areas using price action criteria including the final opposing candle before a strong directional move.
- Breaker Blocks - Failed order blocks that may act as support/resistance. These occur when an order block is invalidated but price returns to the zone, potentially reversing its role.
- Fair Value Gaps (FVG) - Three-candle imbalance patterns where price gaps create inefficiencies. The indicator marks these zones for reference in analysis.
- Market Structure - Break of Structure (BOS) and Change of Character (CHoCH) patterns based on swing high/low breaks. These help identify potential trend continuation or reversal points.
- Reference Entry Signals - The indicator calculates potential entry zones with accompanying stop loss and take profit reference levels based on order block and FVG locations. These are for educational reference only.
- Higher Timeframe Context - Optional filter that displays the higher timeframe trend direction to provide additional market context.
- Information Panel - On-screen dashboard showing active reference signals, their status, and relevant price levels.
- Swing Point Mapping - Labels recent higher highs (HH), higher lows (HL), lower highs (LH), and lower lows (LL) based on configurable swing detection parameters.
═══════════════════════════════════════════════════
⚙️ HOW IT WORKS
The indicator uses the following methodology:
**Order Block Detection:** Identifies the last opposing candle before a strong directional move that breaks structure. Filters blocks by size to reduce noise.
**Market Structure Analysis:** Tracks swing points and identifies when price breaks previous highs/lows to determine BOS or CHoCH patterns.
**Fair Value Gap Identification:** Detects three-candle patterns where candle 1's high/low doesn't overlap with candle 3's low/high, creating an imbalance zone.
**Reference Signal Generation:** Combines order block proximity, FVG presence, and market structure breaks to suggest potential study areas. Optional HTF trend filter can be enabled.
**Timeframe Adaptation:** Automatically adjusts swing detection sensitivity based on the chart timeframe (using multipliers for intraday vs. higher timeframes).
═══════════════════════════════════════════════════
📚 EDUCATIONAL PURPOSE & IMPORTANT LIMITATIONS
**This indicator is designed as an educational tool for:**
- Learning Smart Money Concepts methodology
- Practicing pattern recognition
- Understanding institutional price action theories
- Analyzing market structure visually
**Critical Understanding:**
- All signals and levels are REFERENCE POINTS for study - not trading recommendations
- The indicator displays patterns based on historical price action - it cannot predict future movements
- Smart Money Concepts is a theoretical framework - market behavior varies
- Backtested or historical results shown do not guarantee future performance
- No indicator can account for all market variables, news events, or changing conditions
**Proper Use:**
This tool is meant to assist in learning technical analysis concepts. Users must develop their own analysis skills, risk management strategies, and trading plans. The displayed patterns require interpretation within broader market context.
═══════════════════════════════════════════════════
⚙️ CUSTOMIZATION OPTIONS
**Adjustable Parameters:**
- Order Block: Minimum size threshold, maximum count displayed
- Fair Value Gaps: Toggle visibility, maximum count
- Market Structure: Swing detection length, BOS/CHoCH display
- Signals: Entry/SL/TP calculation method, HTF filter toggle
- Visual Settings: Colors, line styles, label sizes, panel position
**Timeframe Compatibility:**
Works on all timeframes from 1-minute to monthly charts. The swing detection automatically scales based on timeframe.
═══════════════════════════════════════════════════
⚠️ DISCLAIMER
This indicator is for educational and informational purposes only. It does not constitute financial advice or trading recommendations. Trading involves substantial risk of loss. Past patterns and historical analysis do not indicate future results. Users are responsible for their own trading decisions and risk management. The author assumes no liability for trading losses.
═══════════════════════════════════════════════════
🔧 ALERT FUNCTIONALITY
Built-in alert conditions notify you when:
- New order blocks are detected
- Market structure changes occur (BOS/CHoCH)
- Reference entry signals appear
Configure alerts through TradingView's alert system.
F & W SMC Alerthis script is a custom TradingView indicator designed to combine elements of a trend‑following VWAP approach (inspired by the “Fabio” strategy) with a smart‑money‑concepts framework (inspired by Waqar Asim). Here’s what it does:
* **Directional bias:** It calculates a 15‑minute VWAP and compares the current 15‑minute close to it. When price is above the 15‑minute VWAP, the script assumes a long bias; when below, a short bias. This reflects the trend‑following aspect of the Fabio strategy.
* **Liquidity sweeps:** Using recent pivot highs and lows on the current timeframe, it identifies when price takes out a recent high (for potential longs) or low (for potential shorts). This represents a “liquidity sweep” — a fake breakout that collects stops and signals a possible reversal or continuation.
* **Break of structure (BOS):** After a sweep, the script confirms that price is breaking away from the swept level (i.e., higher than recent highs for longs or lower than recent lows for shorts). This BOS confirmation helps avoid false signals.
* **Entry filters:** For a long setup, the bias must be long, there must be a liquidity sweep followed by a BOS, and price must reclaim the current‑timeframe VWAP. For a short setup, the opposite conditions apply (short bias, sweep + BOS to the downside, and price rejecting the VWAP).
* **Alerts and plot:** It provides two alert conditions (“Fabio‑Waqar Long Setup” and “Fabio‑Waqar Short Setup”) that you can attach to notifications. It also plots the intraday VWAP on your chart for visual reference.
In short, this script watches for a confluence of trend direction, liquidity sweeps, structural shifts, and VWAP reclaim/rejection, and then notifies you when those conditions align. You can use it as an alerting tool to identify high‑probability setups based on these combined strategies.
Fabio + Waqar SMC AlertThis script is a custom TradingView indicator designed to combine elements of a trend‑following VWAP approach (inspired by the “Fabio” strategy) with a smart‑money‑concepts framework (inspired by Waqar Asim). Here’s what it does:
* **Directional bias:** It calculates a 15‑minute VWAP and compares the current 15‑minute close to it. When price is above the 15‑minute VWAP, the script assumes a long bias; when below, a short bias. This reflects the trend‑following aspect of the Fabio strategy.
* **Liquidity sweeps:** Using recent pivot highs and lows on the current timeframe, it identifies when price takes out a recent high (for potential longs) or low (for potential shorts). This represents a “liquidity sweep” — a fake breakout that collects stops and signals a possible reversal or continuation.
* **Break of structure (BOS):** After a sweep, the script confirms that price is breaking away from the swept level (i.e., higher than recent highs for longs or lower than recent lows for shorts). This BOS confirmation helps avoid false signals.
* **Entry filters:** For a long setup, the bias must be long, there must be a liquidity sweep followed by a BOS, and price must reclaim the current‑timeframe VWAP. For a short setup, the opposite conditions apply (short bias, sweep + BOS to the downside, and price rejecting the VWAP).
* **Alerts and plot:** It provides two alert conditions (“Fabio‑Waqar Long Setup” and “Fabio‑Waqar Short Setup”) that you can attach to notifications. It also plots the intraday VWAP on your chart for visual reference.
In short, this script watches for a confluence of trend direction, liquidity sweeps, structural shifts, and VWAP reclaim/rejection, and then notifies you when those conditions align. You can use it as an alerting tool to identify high‑probability setups based on these combined strategies.
Session Breakout, Retest, Reversal + Large Move Alert# Script Description for Publication
## Script Name
**Session Breakout, Retest, Reversal + Large Move Alert**
## Short Description
A professional trading indicator that identifies session breakouts, failed retests, and large intraday price movements across any futures contract with real-time alerts and visual markers.
## Long Description
This comprehensive indicator combines session analysis with dynamic move detection, designed for active traders monitoring ES, NQ, GC, CL, and other futures contracts.
**Core Features:**
**Session Tracking:**
Automatically identifies and marks daily session breakouts and failed retests based on user-defined session times and timezones. The indicator draws visual boxes showing session highs (PH) and lows (PL), with labels marking breakout (BO) and retest failure (RF) points.
**Dynamic Large Move Detection:**
Monitors candles on any chart interval for significant price movements. The threshold is fully customizable per futures contract (default 15 points for ES/NQ/GC). When a candle closes with a move exceeding the threshold, the indicator displays a "BO" label with the exact move size and current chart timeframe.
**Real-Time Alerts:**
Triggers active alerts whenever large moves are detected, allowing traders to receive instant notifications via TradingView's alert system for timely entry or exit opportunities.
**Multi-Timeframe Compatible:**
Works seamlessly on any chart interval (1-minute through daily and beyond) without manual adjustments. The detection threshold automatically applies to the current chart's candles, with labels displaying the active timeframe.
**Universal Futures Support:**
Configurable for any futures contract by adjusting the point threshold input parameter based on each contract's typical volatility.
## Key Inputs
| Input | Default | Purpose |
|-------|---------|---------|
| Session Time | 0400-0930 | Defines trading session hours (pre-market session) |
| Session Timezone | America/New_York | Sets timezone for session detection |
| Point Move Threshold | 15.0 | Minimum point move to trigger alert (adjust per futures: ES=15, GC=15, CL=1.5) |
## How to Use
1. **Add to Chart:** Search for this indicator in TradingView and add it to your futures chart (ES, NQ, GC, CL, etc.)
2. **Configure Inputs:**
- Set session start/end times for your preferred trading session
- Adjust point threshold based on your futures contract
- Verify timezone matches your trading location
3. **Create Alerts:**
- Click "Create Alert" on the chart
- Select "Large Move Alert" from the condition dropdown
- Choose notification method (push, email, or SMS)
- Set desired frequency
4. **Monitor Moves:**
- Watch for "BO" labels appearing on confirmed candles
- Each label shows the threshold value and actual move size
- Combine with your existing trading strategy for confirmation
## Visual Elements
- **Session Box:** Blue shaded area showing session high/low range
- **PH Label:** Green label marking session high (pivot high)
- **PL Label:** Red label marking session low (pivot low)
- **BO ↑/↓ Labels:** Lime/red labels marking session breakouts
- **RF Labels:** Yellow/orange labels marking failed retests
- **Large Move Labels:** Green (bullish) or red (bearish) labels showing threshold breaches with move size
## Ideal For
- Scalpers monitoring quick intraday moves
- Day traders tracking pre-market breakouts
- Futures traders on ES, NQ, GC, CL, and other contracts
- Multi-timeframe traders watching various chart intervals simultaneously
- Alert-based automated trading systems
## Technical Details
- **Pine Script Version:** 5
- **Overlay:** Yes (displays on price chart)
- **Historical Buffer:** 5000 bars (supports 1-minute and lower timeframes)
- **Compatibility:** All futures contracts and chart intervals
## Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Users should conduct their own research and consult with financial professionals before making trading decisions. Past performance does not guarantee future results.
---
Chronos Reversal Labs🧬 Chronos Reversal Lab - Machine Learning Market Structure Analysis
OVERVIEW
Chronos Reversal Lab (CRL) is an advanced market structure analyzer that combines computational intelligence kernels with classical technical analysis to identify high-probability reversal opportunities. The system integrates Shannon Entropy analysis, Detrended Fluctuation Analysis (DFA), Kalman adaptive filtering, and harmonic pattern recognition into a unified confluence-based signal engine.
WHAT MAKES IT ORIGINAL
Unlike traditional reversal indicators that rely solely on oscillators or pattern recognition, CRL employs a multi-kernel machine learning approach that analyzes market behavior through information theory, statistical physics, and adaptive state-space estimation. The system combines these computational methods with geometric pattern analysis and market microstructure to create a comprehensive reversal detection framework.
HOW IT WORKS (Technical Methodology)
1. COMPUTATIONAL KERNELS
Shannon Entropy Analysis
Measures market uncertainty using information theory:
• Discretizes price returns into bins (user-configurable 5-20 bins)
• Calculates probability distribution entropy over lookback window
• Normalizes entropy to 0-1 scale (0 = perfectly predictable, 1 = random)
• Low entropy states (< 0.3 default) indicate algorithmic clarity phases
• When entropy drops, directional moves become statistically more probable
Detrended Fluctuation Analysis (DFA)
Statistical technique measuring long-range correlations:
• Analyzes price series across multiple box sizes (4 to user-set maximum)
• Calculates fluctuation scaling exponent (Alpha)
• Alpha > 0.5: Trend persistence (momentum regime)
• Alpha < 0.5: Mean reversion tendency (reversal regime)
• Alpha range 0.3-1.5 mapped to trading strategies
Kalman Adaptive Filter
State-space estimation for lag-free trend tracking:
• Maintains separate fast and slow Kalman filters
• Process noise and measurement noise are user-configurable
• Tracks price state with adaptive gain adjustments
• Calculates acceleration (second derivative) for momentum detection
• Provides cleaner trend signals than traditional moving averages
2. HARMONIC PATTERN DETECTION
Identifies geometric reversal patterns:
• Gartley: 0.618 AB/XA, 0.786 AD/XA retracement
• Bat: 0.382-0.5 AB/XA, 0.886 AD/XA retracement
• Butterfly: 0.786 AB/XA, 1.272-1.618 AD/XA extension
• Cypher: 0.382-0.618 AB/XA, 0.786 AD/XA retracement
Pattern Validation Process:
• Requires alternating swing structure (XABCD points)
• Fibonacci ratio tolerance: 0.02-0.20 (user-adjustable precision)
• Minimum 50% ratio accuracy score required
• PRZ (Potential Reversal Zone) calculated around D point
• Zone size: ATR-based with pattern-specific multipliers
• Active pattern tracking with 100-bar invalidation window
3. MARKET STRUCTURE ANALYSIS
Swing Point Detection:
• Pivot-based swing identification (3-21 bars configurable)
• Minimum swing size: ATR multiples (0.5-5.0x)
• Adaptive filtering: volatility regime adjustment (0.7-1.3x)
• Swing confirmation tracking with RSI and volume context
• Maintains structural history (up to 500 swings)
Break of Structure (BOS):
• Detects price crossing previous swing highs/lows
• Used for trend continuation vs reversal classification
• Optional requirement for signal validation
Support/Resistance Detection:
• Identifies horizontal levels from swing clusters
• Touch counting algorithm (price within ATR×0.3 tolerance)
• Weighted by recency and number of tests
• Dynamic updating as structure evolves
4. CONFLUENCE SCORING SYSTEM
Multi-factor analysis with regime-aware weighting:
Hierarchical Kernel Logic:
• Entropy gates advanced kernel activation
• Only when entropy < threshold do DFA and Kalman accelerate scoring
• Prevents false signals during chaotic (high entropy) conditions
Scoring Components:
ML Kernels (when entropy low):
• Low entropy + trend alignment: +3.0 points × trend weight
• DFA super-trend (α>1.5): +4.0 points × trend weight
• DFA persistence (α>0.65): +2.5 points × trend weight
• DFA mean-reversion (α<0.35): +2.0 points × mean-reversion weight
• Kalman acceleration: up to +3.0 points (scaled by magnitude)
Classical Technical Analysis:
• RSI oversold (<30) / overbought (>70): +1.5 points
• RSI divergence (bullish/bearish): +2.5 points
• High relative volume (>1.5x): +0-2.0 points (scaled)
• Volume impulse (>2.0x): +1.5 points
• VWAP extremes: +1.0 point
• Trend alignment (Kalman fast vs slow): +1.5 points
• MACD crossover/momentum: +1.0 point
Structural Factors:
• Near support (within 0.5 ATR): +0-2.0 points (inverse distance)
• Near resistance (within 0.5 ATR): +0-2.0 points (inverse distance)
• Harmonic PRZ zone: +3.0 to +6.0 points (pattern score dependent)
• Break of structure: +1.5 points
Regime Adjustments:
• Trend weight: 1.5× in trend regime, 0.5× in mean-reversion
• Mean-reversion weight: 1.5× in MR regime, 0.5× in trend
• Volatility multiplier: 0.7-1.3× based on ATR regime
• Theory mode multiplier: 0.8× (Conservative) to 1.2× (APEX)
Final Threshold:
Base threshold (default 3.5) adjusted by:
• Theory mode: -0.3 (APEX) to +0.8 (Conservative)
• Regime: +0.5 (high vol) to -0.3 (low vol or strong trend)
• Filter: +0.2 if regime filter enabled
5. SIGNAL GENERATION ARCHITECTURE
Five-stage validation process:
Stage 1 - ML Kernel Analysis:
• Entropy threshold check
• DFA regime classification
• Kalman acceleration confirmation
Stage 2 - Structural Confirmation:
• Market structure supports directional bias
• BOS alignment (if required)
• Swing point validation
Stage 3 - Trigger Validation:
• Engulfing candle (if required)
• HTF bias confirmation (if strict HTF enabled)
• Harmonic PRZ alignment (if confirmation enabled)
Stage 4 - Consistency Check:
• Anticipation depth: checks N bars back (1-13 configurable)
• Ensures Kalman acceleration direction persists
• Filters whipsaw conditions
Stage 5 - Structural Soundness (Critical Filter):
• Verifies adequate room before next major swing level
• Long signals: must have >0.25 ATR clearance to last swing high
• Short signals: must have >0.25 ATR clearance to last swing low
• Prevents trades directly into obvious structural barriers
Dynamic Risk Management:
• Stop-loss: Placed beyond last structural swing ± 2 ticks
• Take-profit 1: Risk × configurable R1 multiplier (default 1.5R)
• Take-profit 2: Risk × configurable R2 multiplier (default 3.0R)
• Confidence score: Calibrated 0-99% based on confluence + kernel boost
6. ADAPTIVE REGIME SYSTEM
Continuous market state monitoring:
Trend Regime:
• Kalman fast vs slow positioning
• Multi-timeframe alignment (optional HTF)
• Strength: ATR-normalized fast/slow spread
Volatility Regime:
• Current ATR vs 100-bar average
• Regime ratio: 0.7-1.3 typical range
• Affects swing size filtering and cooldown periods
Signal Cooldown:
• Base: User-set bars (1-300)
• High volatility (>1.5): cooldown × 1.5
• Low volatility (<0.5): cooldown × 0.7
• Post-BOS: minimum 20-bar cooldown enforced
FOUR OPERATIONAL MODES
CONSERVATIVE MODE:
• Threshold adjustment: +0.8
• Mode multiplier: 0.8×
• Strictest filtering for highest quality
• Recommended for: Beginners, large accounts, swing trading
• Expected signals: 3-5 per week (typical volatile instrument)
BALANCED MODE:
• Threshold adjustment: +0.3
• Mode multiplier: 1.0×
• Standard operational parameters
• Recommended for: General trading, learning phase
• Expected signals: 5-10 per week
APEX MODE:
• Threshold adjustment: -0.3
• Mode multiplier: 1.2×
• Maximum sensitivity, reduced cooldowns
• Recommended for: Scalping, high volatility, experienced traders
• Expected signals: 10-20 per week
INSTITUTIONAL MODE:
• Threshold adjustment: +0.5
• Mode multiplier: 1.1×
• Enhanced structural weighting, HTF emphasis
• Recommended for: Professional traders, swing positions
• Expected signals: 4-8 per week
VISUAL COMPONENTS
1. Fibonacci Retracement Levels
• Auto-calculated from most recent swing structure
• Standard levels: 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%, 127.2%, 161.8%, 200%, 261.8%
• Key levels emphasized (50%, 61.8%, 100%, 161.8%)
• Color gradient from bullish to bearish based on level
• Automatic cleanup when levels are crossed
• Label intensity control (None/Fib only/All)
2. Support and Resistance Lines
• Dynamic horizontal levels from swing clusters
• Width: 2px solid lines
• Colors: Green (support), Red (resistance)
• Labels show price and level type
• Touch-based validation (minimum 2 touches)
• Real-time updates and invalidation
3. Harmonic PRZ Boxes
• Displayed around pattern completion (D point)
• Pattern-specific colors (Gartley: purple, Bat: orange, etc.)
• Box height: ATR-based zone sizing
• Score-dependent transparency
• 100-bar active window before removal
4. Confluence Boxes
• Appear when confluence ≥ threshold
• Yellow/orange gradient based on score strength
• Height: High to low of bar
• Width: 1 bar on each side
• Real-time score-based transparency
5. Kalman Filter Lines
• Fast filter: Bullish color (green default)
• Slow filter: Bearish color (red default)
• Width: 2px
• Transparency adjustable (0-90%)
• Optional display toggle
6. Signal Markers
• Long: Green triangle below bar (tiny size)
• Short: Red triangle above bar (tiny size)
• Appear only on confirmed signals
• Includes alert generation
7. Premium Dashboard
Features real-time metrics with visual gauges:
Layout Options:
• Position: 4 corners selectable
• Size: Small (9 rows) / Normal (12 rows) / Large (14 rows)
• Themes: Supreme, Cosmic, Vortex, Heritage
Metrics Displayed:
• Gamma (DFA - 0.5): Shows trend persistence vs mean-reversion
• TCI (Trend Strength): ATR-normalized Kalman spread with gauge
• v/c (Relative Volume): Current vs average with color coding
• Entropy: Market predictability state with gauge
• HFL (High-Frequency Line): Kalman fast/slow difference / ATR
• HFL_acc (Acceleration): Second derivative momentum
• Mem Bias: Net bullish-bearish confluence (-1 to +1)
• Assurance: Confidence × (1-entropy) metric
• Squeeze: Bollinger Band / Keltner Channel squeeze detection
• Breakout P: Probability estimate from DFA + trend + acceleration
• Score: Final confluence vs threshold (normalized)
• Neighbors: Active harmonic patterns count
• Signal Strength: Strong/Moderate/Weak classification
• Signal Banner: Current directional bias with emoji indicators
Gauge Visualization:
• 10-bar horizontal gauges (█ filled, ░ empty)
• Color-coded: Green (strong) / Gold (moderate) / Red (weak)
• Real-time updates every bar
HOW TO USE
Step 1: Configure Mode and Resolution
• Select Theory Mode based on trading style (Conservative/Balanced/APEX/Institutional)
• Set Structural Resolution (Standard for fast markets, High for balanced, Ultra/Institutional for swing)
• Enable Adaptive Filtering (recommended for all volatile assets)
Step 2: Enable Desired Kernels
• Shannon Entropy: Essential for predictability detection (recommended ON)
• DFA Analysis: Critical for regime classification (recommended ON)
• Kalman Filter: Provides lag-free trend tracking (recommended ON)
• All three work synergistically; disabling reduces effectiveness
Step 3: Configure Confluence Factors
• Enable desired technical factors (RSI, MACD, Volume, Divergence)
• Enable Liquidity Mapping for support/resistance proximity scoring
• Enable Harmonic Detection if trading pattern-based setups
• Adjust base confluence threshold (3.5 default; higher = fewer, cleaner signals)
Step 4: Set Trigger Requirements
• Require Engulfing: Adds precision, reduces frequency (recommended for Conservative)
• Require BOS: Ensures structural alignment (recommended for trend-following)
• Require Structural Soundness: Critical filter preventing traps (highly recommended)
• Strict HTF Bias: For multi-timeframe traders only
Step 5: Adjust Visual Preferences
• Enable/disable Fibonacci levels, S/R lines, PRZ boxes, confluence boxes
• Set label intensity (None/Fib/All)
• Adjust transparency (0-90%) for overlay clarity
• Configure dashboard position, size, and theme
Step 6: Configure Alerts
• Enable master alerts toggle
• Select alert types: Anticipation, Confirmation, High Confluence, Low Entropy
• Enable JSON details for automated trading integration
Step 7: Interpret Signals
• Wait for triangle markers (green up = long, red down = short)
• Check dashboard for confluence score, entropy, DFA regime
• Verify signal aligns with higher timeframe bias (if using HTF setting)
• Confirm adequate space to take-profit levels (no nearby structural barriers)
Step 8: Execute and Manage
• Enter at close of signal candle (or next bar open)
• Set stop-loss at calculated level (visible in alert if JSON enabled)
• Scale out at TP1 (1.5R default), trail remaining to TP2 (3.0R default)
• Exit early if entropy spikes >0.7 or DFA regime flips against position
CUSTOMIZATION GUIDE
Timeframe Optimization:
Scalping (1-5 minutes):
• Theory Mode: APEX
• Anticipation Depth: 3-5
• Structural Resolution: STANDARD
• Signal Cooldown: 8-12 bars
• Enable fast kernels, disable HTF bias
Day Trading (15m-1H):
• Theory Mode: BALANCED
• Anticipation Depth: 5-8
• Structural Resolution: HIGH
• Signal Cooldown: 12-20 bars
• Standard configuration
Swing Trading (4H-Daily):
• Theory Mode: INSTITUTIONAL
• Anticipation Depth: 8-13
• Structural Resolution: ULTRA or INSTITUTIONAL
• Signal Cooldown: 20-50 bars
• Enable HTF bias, strict confirmations
Market Type Optimization:
Forex Majors:
• All kernels enabled
• Harmonic patterns effective
• Balanced or Institutional mode
• Standard settings work well
Stock Indices:
• Emphasis on volume analysis
• DFA critical for regime detection
• Conservative or Balanced mode
• Enable liquidity mapping
Cryptocurrencies:
• Adaptive filtering essential
• Higher volatility regime expected
• APEX mode for active trading
• Wider ATR multiples for swing sizing
IMPORTANT DISCLAIMERS
• This indicator does not predict future price movements
• Computational kernels calculate probabilities, not certainties
• Past confluence scores do not guarantee future signal performance
• Always backtest on YOUR specific instruments and timeframes before live trading
• Machine learning kernels require calibration period (minimum 100 bars of data)
• Performance varies significantly across market conditions and regimes
• Signals are suggestions for analysis, not automated trading instructions
• Proper risk management (stops, position sizing) is mandatory
• Complex calculations may impact performance on lower-end devices
• Designed for liquid markets; avoid illiquid or gap-prone instruments
PERFORMANCE CONSIDERATIONS
Computational Intensity:
• DFA analysis: Moderate (scales with length and box size parameters)
• Entropy calculation: Moderate (scales with lookback and bins)
• Kalman filtering: Low (efficient state-space updates)
• Harmonic detection: Moderate to High (pattern matching across swing history)
• Overall: Medium computational load
Optimization Tips:
• Reduce Structural Analysis Depth (144 default → 50-100 for faster performance)
• Increase Calc Step (2 default → 3-4 for lighter load)
• Reduce Pattern Analysis Depth (8 default → 3-5 if harmonics not primary focus)
• Limit Draw Window (150 bars default prevents visual clutter on long charts)
• Disable unused confluence factors to reduce calculations
Best Suited For:
• Liquid instruments: Major forex, stock indices, large-cap crypto
• Active timeframes: 5-minute through daily (avoid tick/second charts)
• Trending or ranging markets: Adapts to both via regime detection
• Pattern traders: Harmonic integration adds geometric confluence
• Multi-timeframe analysts: HTF bias and regime detection support this approach
Not Recommended For:
• Illiquid penny stocks or micro-cap altcoins
• Markets with frequent gaps (stocks outside regular hours without gap adjustment)
• Extremely fast timeframes (tick, second charts) due to calculation overhead
• Pure mean-reversion systems (unless using CONSERVATIVE mode with DFA filters)
METHODOLOGY NOTE
The computational kernels (Shannon Entropy, DFA, Kalman Filter) are established statistical and signal processing techniques adapted for financial time series analysis. These are deterministic mathematical algorithms, not predictive AI models. The term "machine learning" refers to the adaptive, data-driven nature of the calculations, not neural networks or training processes.
Confluence scoring is rule-based with regime-dependent weighting. The system does not "learn" from historical trades but adapts its sensitivity to current volatility and trend conditions through mathematical regime classification.
SUPPORT & UPDATES
• Questions about configuration or usage? Send me a message on TradingView
• Feature requests are welcome for consideration in future updates
• Bug reports appreciated and addressed promptly
• I respond to messages within 24 hours
• Regular updates included (improvements, optimizations, new features)
FINAL REMINDERS
• This is an analytical tool for confluence analysis, not a standalone trading system
• Combine with your existing strategy, risk management, and market analysis
• Start with paper trading to learn the system's behavior on your markets
• Allow 50-100 signals minimum for performance evaluation
• Adjust parameters based on YOUR timeframe, instrument, and trading style
• No indicator guarantees profitable trades - proper risk management is essential
— Dskyz, Trade with insight. Trade with anticipation.
MARITradesGold Indicator A - BUY AND SELL ModelThe MARITrades Gold Indicator A – BOS Model is a professional charting tool designed to help traders visually identify structure breaks (BOS) and potential Fibonacci retracement zones during key market sessions on XAU/USD.
It combines session timing filters, Break of Structure logic, and a WMA160 trend bias to help users study clean continuation or reversal setups with precision.
This indicator is intended for traders who are learning or refining their market structure and session-based gold strategy.
KEY FEATURES AND HOW TO USE
Apply the indicator to XAU/USD on a preferred timeframe
Wait for a Break of Structure (BOS) during valid session hours.
Watch for retracement into 0.5–0.618 Fib levels for possible continuation zones which are marked out with coloured lines. you can edit the colours to your preference
Confirm direction with Moving average160 trend bias.
Use Stop loss and take profit levels for educational visualization — not for direct trade execution.
you can keep the indicator free or lines which optional to view the BUY and SELL signals
📊 BOS Detection: Marks bullish or bearish structure breaks after key levels.
📈 Fibonacci Zones: Auto-calculates retracement zones and gives you signal bias
🕒 Session Filters: Includes Sydney, Asian, London, and New York session timing tools.
🧭 Trend Filter: Moving Average (MA160) helps define directional bias.
🧩 Clean Visualization: retracement zones, and structure markers for chart clarity.
🚨 Optional Alerts: Alerts can be added when structure breaks align with session filters.
MariTrades Gold Indicator B-Stop loss and Take profitsThe MariTrades Gold Indicator B is an original Trading View script designed to help traders visualize entry points, stop loss (SL), take profit (TP), and key structure levels on gold charts. This publication fully complies with Trading View’s public script rules, including originality, English description, chart clarity, and Pine Script v5 usage.
Key Features:
Break of Structure (BOS) Detection:
Detects trend reversals by identifying when price closes above/below the previous swing high/low.
BOS signals are marked on the chart for both buy and sell opportunities.
Fibonacci Retracement Levels:
Automatically plots retracements from the last swing high to swing low.
(NOT LABELLED)
Entry signals are confirmed when price retraces to these levels after BOS.
Automatic SL and TP Visualization:
Stop loss and take profit levels are drawn directly on the chart.
Default values: SL = 5 pips, TP = 10 pips (customizable via inputs).
Entry Signals:
Buy: Price breaks structure (BOS) and retraces to Fibonacci level → label and lines drawn.
Sell: Price breaks structure (BOS) and retraces to Fibonacci level → label and lines drawn.
Clean, readable chart overlay:
Previous signals are automatically removed to avoid clutter.
SL lines in red, TP lines in green, entry labels clearly displayed.
Binary Options Fast Scalping [TradingFinder] M1 & M5 Signals🔵 Introduction
In the structure of financial markets, spiky moments and sudden price movements play a key role in Liquidity Grabs and Market Structure Resets. These movements usually occur after the accumulation of orders in Buy Side or Sell Side Liquidity zones and are accompanied by rapid breaks in the form of Break of Structure (BoS) or Change of Character (CHoCH).
At this stage, the market temporarily moves in the direction of liquidity to trigger counter orders and then enters a Retracement or Pullback phase, a point where professional traders using the Smart Money Concept (SMC) look for candle confirmation to enter with precision.
This strategy is built upon the same logic : an initial spiky move as a signal of institutional or liquidity driven algorithms, followed by a controlled pullback toward areas such as the Order Block, Fair Value Gap (FVG), or Imbalance Zone, and finally an entry based on a strong confirmation candle (Engulf, Rejection, Breaker) that defines the true direction of order flow.
This combination of price behavior, especially on lower timeframes such as M1 or M5, provides an ideal setup for fast Scalping, Micro Structure Trading, and even short term directional prediction in Binary Options Trading.
Since the main focus of this method is on identifying liquidity phases, structural confirmations, and momentum confirmation candles, the trader can design entries with high probability and logical stop loss placement using the concepts of Fractal Market Structure and Multi Timeframe Confirmation.
In the scalping version, the main objective is to capture the move toward the next liquidity pool or opposite demand and supply zone, while in the binary version, only the prediction of the next candle’s direction matters. This strategy inherently operates based on Smart Money Behavior, Liquidity Engineering, and Order Flow Dynamics, allowing the extraction of fast and profitable moves from the internal logic of market structure.
🔵 How to Use
The operational logic of this strategy is based on Liquidity Sweep, Pullback, and Confirmation Candle. The trader should first identify the initial Impulse Move, which is often accompanied by liquidity absorption around Buy Side or Sell Side Liquidity areas. After that, the market enters the Retracement phase and returns to structural zones such as the Order Block or the Fair Value Gap (FVG).
At this point, a position is taken only when a confirmation candle (Engulf, Breaker, or Rejection Candle) closes in the direction of continuation and aligns with the new structure (BOS or CHoCH). Applying this model on lower timeframes offers the highest precision for fast Scalping or for predicting the next candle’s direction in Binary Option trading.
🟣 Bullish Setup
In the bullish setup, the market first forms a spiky upward move with a sudden increase in momentum, indicating the activation of liquidity flow in the Buy Side Liquidity zone. This movement is usually accompanied by a Break of Structure (BOS) to the upside and marks the beginning of the Impulse Move phase. After this move, the price enters the Pullback phase and returns to structural areas such as the Bullish Order Block, Fair Value Gap (FVG), or Mitigation zone.
At this stage, the trader waits for a bullish confirmation candle (Bullish Engulf or Breaker Candle) to validate the end of the retracement. Entry is made at the close of the confirmation candle or on a minor pullback, with the stop loss placed below the Swing Low or below the pullback zone. The target is set at the next Buy Side Liquidity or Equal Highs. In the binary version, only the direction of the next candle matters and the entry takes place immediately after the confirmation candle.
🟣 Bearish Setup
In the bearish setup, the market first forms a spiky downward move, signaling increased selling pressure and liquidity absorption at the Sell Side Liquidity zone. This movement is accompanied by a Break of Structure (BOS) to the downside and represents the beginning of a bearish momentum phase. After the spike, the price enters the Retracement phase and returns to the Bearish Order Block or bearish Fair Value Gap zone. Within these areas, the formation of a bearish confirmation candle (Bearish Engulf, Breaker, or Rejection Candle) validates the continuation of the downtrend.
The entry is taken at the close of the confirmation candle, with the stop loss placed above the Swing High or above the pullback zone, and the target set toward the next Sell Side Liquidity or Equal Lows. In binary applications, only the direction of the next candle is considered and the confirmation candle serves as the entry trigger.
🔵 Conclusion
This strategy, by combining the principles of the Smart Money Concept, Liquidity Dynamics, and Candle Confirmation Logic, offers a precise and multi functional approach to market entry. Its core structure, identifying the initial spiky movement, waiting for a structural pullback, and entering based on a confirmation candle allows quick interpretation of institutional liquidity behavior and provides trading opportunities with high accuracy and controlled risk.
On lower timeframes, this logic becomes a powerful tool for Scalping and Micro Structure Trading, while in binary markets it delivers high success rates due to its focus on predicting the next candle’s direction. Built upon the foundations of Order Flow, Market Structure, and Fractal Liquidity Behavior, this strategy demonstrates that even in the fastest and noisiest market conditions, the order of Smart Money remains observable and exploitable.
Whale Breaker — HTF Order Blocks + Market Structure HUDWhale Breaker (Debug Edition) is an advanced Smart Money Concept (SMC) tool designed to project High Timeframe (HTF) order blocks onto your Lower Timeframe (LTF) charts while tracking market structure breaks (BOS / CHoCH).
This debug build adds extra transparency: the mini-HUD not only shows HTF trend, last signal, and active order blocks, but also explains why no new block was created (e.g. no HTF BOS, body not found, ATR filter too strict, max-per-side limit). This makes it easier to fine-tune your settings and understand the logic behind the indicator.
Key features:
- HTF order blocks (e.g. 1h) projected into LTF charts (e.g. 15m)
- Automatic right-extension until mitigation (MB)
- Mitigation detection: blocks shaded once filled
- ATR filter to remove insignificant micro-zones
- Per-side cap: limit the maximum active BU/B blocks
- Lookback-based pruning for clean charts
- BOS/CHoCH arrows on chart (▲ green = bullish, ▼ red = bearish)
- Compact HUD with trend, last signal, active OBs, legend, and debug reasons
Usage:
- Define your HTF (e.g. 1h) and trade entries on the LTF (e.g. 15m).
- Wait for a BOS in HTF direction, then target the projected order block.
- Stop Loss just beyond the OB, Take Profit at next opposite OB or using a fixed RRR.
Note: This is a debugging/educational version to understand order block creation logic.
For live trading, consider using the standard Whale Breaker.
Multi Channel GRID & DCA LTF [trade_lexx]Multi Channel GRID & DCA LTF
Usage Guide
Part 1: The concept and general possibilities of the "Multi Channel GRID & DCA LTF" strategy
Introduction
Welcome to the guide to "Multi Channel GRID & DCA LTF", a powerful and versatile automated trading strategy for the TradingView platform. This tool was developed for traders who are looking for flexibility, control and a high degree of adaptability to various market conditions.
The strategy is based on a hybrid approach that combines two popular and time-tested techniques.:
1. GRID (grid trading): The classic method of averaging a position is by placing a grid of limit orders.
2. DCA (Dollar Cost averaging): Smart position averaging based on signals from external indicators.
However, "Multi Channel GRID & DCA LTF" goes far beyond the simple combination of these two techniques. The strategy includes a number of unique and innovative features, such as cascading MultiGRID grids for dealing with extreme volatility, Channel Mode range trading mode for profiting from sideways movement, and Low Time Frame analysis (LTF) to achieve surgical accuracy in backtesting. Deep customization options for risk management, capital, take profits, and stop losses allow you to configure a strategy for almost any trading style, asset, and timeframe.
The basic idea: How does it work?
Let's take a detailed look at each of the key concepts embedded in the logic of the strategy.
1. GRID — Automatic placement of buy and sell orders at certain price intervals.
This is a fundamental mode of operation. Its main goal is to systematically improve the average entry price for a position if the market is going against you.
* The principle of operation: After opening the base (first) order (`BO`), the strategy automatically places a series of pending limit orders (here they are called "safety orders" or "SO") at certain price intervals. For a long position, orders are placed below the entry price, and for a short position, orders are placed higher.
* Target: When the price moves against an open position, it consistently hits and executes safety orders. Each such execution adds additional volume to the position at a more favorable price, thereby shifting the overall average entry price (`position_avg_price') closer to the current market price. This means that a much smaller corrective movement will be required to gain ground.
* Flexibility: You have full control over the geometry of the grid: the number of safety orders, the percentage distance between them (`SO Step`), and you can even set a coefficient that will increase this step for each subsequent order (`SO Multiplier`), creating an expanding grid.
2. DCA (Signal Averaging) — Smart Averaging
This mode adds an additional layer of analysis to the averaging process. Instead of just buying/selling at the set price levels, the strategy waits for a confirmation signal.
* Working principle: You can connect any external indicator (for example, RSI, CCI, or even your own complex signal system) to the strategy, which outputs numerical values. As standard, 1 is used for a long signal, and -1 is used for a short signal. The strategy will place the next averaging order only at the moment when it receives the appropriate signal.
* Goal: To average a position not just during a fall (or a rise for a short), but at the moments that your main trading system considers the most favorable for this. This allows you to avoid "catching falling knives" and enter only if there are good reasons.
3. Hybrid Mode (GRID+DCA) is the best of the previous two modes
This mode is designed for maximum filtering and control. It requires two conditions to be fulfilled simultaneously.
* Working principle: The safety order will be executed only if the price has reached the calculated grid level and a confirmation signal has been received from your external indicator. If a confirmation signal is received from an external indicator, the next calculated grid level activates the limit order.
* Goal: To create the most reliable averaging system that protects against premature entries and requires double confirmation (both by price and indicator) before increasing the position size.
4. MultiGRID — Adaptation to extreme volatility
This is one of the most powerful and unique features of a strategy designed to survive and make a profit in the face of strong, protracted trends or "black swans".
* The problem it solves: The usual grid of orders has a limited depth. If the price goes beyond the last safety order, the strategy loses the opportunity to average and becomes vulnerable.
* The principle of operation: The MultiGRID function allows you to create "cascades" — several grids following one another. When all the orders of the first grid are executed, the strategy does not stop. Instead, she can activate the second, third (and so on) a grid of orders. The new grid can be activated by one of two triggers:
1. Offset: The new grid is activated when the price passes another set percentage deviation from the last executed order.
2. Signal: The new grid is activated when a signal is received from an external indicator.
* Goal: To significantly expand the working range of the strategy. This allows it to adapt to strong market movements that would "break" the usual grid, and continue to effectively average a position at a much greater depth of decline or growth.
5. Channel Mode — Trading in the range
This feature turns a standard averaging strategy into a machine for "farming" profits within a price channel that is formed during a sideways market movement.
* The problem it solves: In the standard grid strategy, after partially closing a take profit position, the volume of this part "leaves" the trade until the deal is fully closed. You are missing the opportunity to reuse this capital.
* Operating principle: When Channel Mode is enabled, the following happens. Suppose the price went against you, executed several safety orders, and then turned around and reached one of the partial take profits. At this point, the strategy is:
1. Fixes the profit, as it should be.
2. Instantly places a new limit order to buy (or sell for a short) at exactly the same price level where the last triggered safety order was executed. The volume of this order is equal to the volume of the part that was just closed for take profit.
3. If the price goes down again and executes this "repeat" order, the strategy immediately sets a corresponding take profit for it at the level where the previous profit was taken.
* Goal: To create a continuous buy-sell cycle within the local range (channel). The lower limit of the channel is the price of the last averaging, and the upper limit is the price of a partial take profit. This allows you to repeatedly profit from sideways price fluctuations, without waiting for the full closure of the main, large transaction.
6. LTF (Lower Timeframe Analysis) — Surgical precision of backtesting
This feature is critically important for obtaining reliable results during historical testing (backtesting) of grid strategies.
* The problem it solves: The standard testing mechanism in TradingView has a serious limitation. Working, for example, on a 4-hour chart, he sees only 4 candle points: Open, High, Low and Close. He does not know in what order the price moved within these 4 hours. He could have touched High first and then Low, or vice versa. For grid strategies, this is fatal — the engine can show that a take profit has been executed, although in reality the price first went down, collected the entire grid of orders and only then turned around.
* How it works: When you turn on the LTF mode, the strategy for each candle on your main chart (for example, 4H) requests and analyzes all candles from the lower timeframe you specified (for example, 1-minute). Then it virtually trades the entire price path for these minute candles, executing orders, take profits and stop losses in the sequence in which they would occur in reality. It works in the single take profit mode of the Grid strategy.
* Goal: To provide the most realistic and reliable backtest that reflects the real dynamics of the market. This allows you to avoid false expectations and accurately assess the potential performance of the strategy.
// ------------------------
Part 2: Detailed description of the strategy settings
This section is your main guide to all the switches and options available in the strategy. Understanding each setting is the key to unlocking the full potential of this powerful tool.
1. 🛡️ Risk Management 🛡️
This group contains fundamental parameters that determine the basic logic of risk management and the geometry of grid orders.
* Strategy type: Determines the direction of transactions.
* Long: The strategy will only open long positions (buy).
* Short: The strategy will only open short positions (sell).
* Both: The strategy will work both ways, opening long or short depending on the incoming signal.
* SO Count: Sets the maximum number of Safety (averaging) Orders (SO) that the strategy will place within the same grid. If you have MultiGRID enabled, this number applies to each individual grid.
* SO Step (%): This is the base percentage deviation from the entry price at which the first safety order will be placed. For example, at a value of 0.5, the first SO in a long trade will be placed 0.5% lower than the opening price of the base order.
* SO Multiplier: A coefficient that exponentially increases the step for each subsequent safety order. This allows you to create an expanding grid where averaging orders are placed further and further apart, which is effective with strong and accelerating price movements.
* *The step formula for the nth order*: Step(N) = (SO Step) * (SO Multiplier ^(N-1)).
* If the value is 1, all steps will be the same.
* With a value of 1.6, the step of the second SO will be 1.6 times larger than the first, the step of the third will be 1.6 times larger than the second, and so on.
* 1️⃣ TP/SL: These are simplified settings for quick configuration. They allow you to turn on/off the main take profit and stop loss and set basic percentage values for them. More detailed settings for these parameters can be found in the relevant sections below.
// ------------------------
2. 💰 Money Management 💰
Everything related to position size, leverage, and capital is configured here.
* Volume BO (Base Order): Determines the size of the trade's opening order.
* Volume BO: A fixed amount in the quote currency (for example, in USDT).
* USDT (check mark): Manages the information in the comments to the orders. If enabled, the volume of orders in USDT will be displayed in the comments. This is convenient for visual analysis and for sending the amount of USDT by the placeholder {{strategy.order.comment}} via webhooks when connecting the strategy to the exchange or trading terminals.
* or % of deposit: The amount calculated as a percentage of the available capital of the strategy. The check mark to the right of this field enables this mode. Important: using a percentage activates the effect of compounding (compound interest), as the amount of each new transaction will be automatically recalculated based on the current capital (initial capital + profit/loss). If enabled, the percentage of orders will be displayed in the comments. This is convenient for visual analysis and for sending percentages on the placeholder {{strategy.order.comment}} via webhooks when connecting the strategy to the stock exchange, trading terminals, or creating Copy trading.
* Martingale: The coefficient applied to the volume of orders. It increases the size of each subsequent insurance order compared to the base one.
* Volume formula for the nth SO: Volume SO (N) = (Volume BO) * (Martingale^N).
* With a value of 1.2, the volume of the first SO will be 1.2 times greater than the base, the second — 1.44 times (`1.2 * 1.2`) and so on.
* Leverage: Specify the size of your leverage. This parameter is used exclusively for calculating and displaying the approximate liquidation price. It does not affect the size of positions, but it helps to visually assess the risks.
* Liquidation: Enables or disables the calculation and display of the liquidation line on the chart.
* Margin type: Allows you to select a method for calculating the liquidation price, simulating the logic of exchanges:
* Isolated: The liquidation price is calculated based on the size and leverage of the current open position only.
* Cross: The calculation simulates using the entire available balance to maintain a position. In the strategy, the liquidation price is calculated as the level at which the loss on the current transaction is equal to the current capital.
* Commission (%): Specify the percentage of your exchange's commission per transaction. The correct value of this parameter is crucial for obtaining realistic backtest results.
// ------------------------
3. 🕸️ Grid Management 🕸️
This group is responsible for the logic of safety orders and advanced mechanics such as Channel Mode and MultiGRID.
* SO Type: Defines the logic of placing averaging orders.
* GRID: Classic grid. All safety orders are placed in advance as limit orders.
* DCA: Signal averaging. The strategy is waiting for a signal from an external indicator to place a market averaging order.
* GRID+DCA: Hybrid. The strategy waits for a signal, and if it arrives, places a limit order at the appropriate price level of the grid or executes a market order if the signal has arrived below the limit order level.
* Signal for SO: A data source (indicator) that will be used for signals in DCA and GRID+DCA modes.
* ↔️ Channel Mode: When this option is enabled, the strategy tries to trade in a sideways range. After partially closing a take profit position, it immediately places a limit order for re-entry at the price of the last triggered safety order. This creates a buy-sell cycle within the local channel.
* Best Price Only: This filter adds an additional condition for averaging in DCA and MultiGRID modes (when it operates on a signal). The next averaging order or a new grid will be activated only if the current price is more favorable (lower for long, higher for short) than the price of the previous entry.
* 🧩 MultiGRID ⮕ Enables cascading grid mode.
* Grid Count: The total number of grids that can be activated sequentially.
* Offset: Percentage deviation from the price of the last order of the previous grid. When this margin is reached, the following grid of orders is activated (this mode does not require a signal).
* Or signal: Allows you to use the signal from an external indicator as a trigger to activate the next grid. The checkmark on the right turns on this mode.
// ------------------------
4. 🎯 Entry and Stop 🎯
This group of settings allows you to fine-tune the conditions for starting a new trade and all aspects related to protective stop orders, including the complex mechanics of trailing and managing SL after partial take profits.
* 🎯 Signal: A data source (indicator) that will be used to determine when to enter a trade. The strategy expects a value of 1 for the start of a long trade and -1 for a short trade.
* Min Bars: Sets the minimum number of candles that must pass from the moment of opening the previous trade to the moment of opening the next one. A value of 0 disables this filter. This is a useful tool to prevent overly frequent entries in a "noisy" market.
* Non-stop: If this option is enabled, the strategy ignores the Entry Signal and opens a new trade immediately after closing the previous one (taking into account the Min Bars filter, if it is set). This turns the strategy into a constantly working mechanism that is always on the market.
* 🛑 SL Type: Defines the base price from which the stop loss percentage will be calculated. The stop loss in the first section must be enabled for this block of settings to work.
* From the entry point: SL is always calculated from the opening price of the very first base order. It remains static throughout the entire transaction unless it is moved by other functions.
* From breakeven line: SL is dynamically recalculated and shifted each time a safety order is executed. It always follows the average price of the position, being at a given percentage distance from it.
* From last executed SO: SL is recalculated from the price of the last executed order, whether it is a base or a safety order.
* From last SO: SL is calculated from the price of the most recent possible safety order in the grid. This is usually the most remote and conservative type of SL.
* Trailing SL Type: Defines the algorithm by which the stop loss will move after its activation.
* Standard: Classic trailing. After activation, SL will follow the price at a fixed distance.
* ATR: SL will follow the price at a distance equal to the value of the ATR indicator multiplied by the specified multiplier.
* External Source: SL will follow any selected line of the third-party indicator.
* Period and Multiplier: Common parameters for all types of trailing.
* Source: The source of the line for the trailing SL of the third-party indicator.
* Trailing SL after entry: The mode of activation of the trailing SL after entering the transaction
* SL management after TP (sections 1️⃣, 2️⃣, 3️⃣): These three blocks allow you to create a complex stop loss management logic as profits are recorded.
For each take profit level (TP1, TP2, TP3), you can configure:
* SL BE / SL TP1 / SL TP2: When the corresponding TP is reached, the stop loss will be moved to the breakeven point (for TP1), to the TP1 price level (for TP2) or to the TP2 price level (for TP3).
* Trailing SL: When the corresponding TP is reached, the trailing stop loss is activated according to the settings above.
* By ↔️ Signal: A very powerful option. If it is enabled, the above action (SL transfer or trailing activation) will occur when the opposite trading signal is received from an external indicator. This allows you to protect profits or reduce losses if the market turns sharply, even before reaching the target.
* SL Delay ⮕ Allows you to delay the activation of the stop loss.
* Number of Bars: The Stop loss will be physically placed on the market only after the specified number of candles has passed since entering the trade. This can help to avoid "taking out" the stop with a random short movement (squiz) immediately after opening a position.
* SL Block: Unique defensive mechanics for trading both ways (`Strategy Type: Both`).
* Number of SL: If the strategy receives the specified number of stop losses in a row in one direction (for example, 2 stops long), it temporarily blocks the opportunity to open new trades in that direction.
* Lock Reset mode:
* By direction: The lock is lifted if a profitable trade is closed in the allowed direction or if a stop loss is triggered in the opposite direction.
* First profit: The lock is lifted after closing any profitable transaction, regardless of its direction.
// ------------------------
5. ✅ Take Profit ✅
This group of settings provides comprehensive control over profit taking, from a simple take profit to a complex system of partial closures and trailing.
* ✅ TP Type: Defines the base price for calculating the percentage deviation of the take profit.
* From entry point: TP is calculated from the base order price.
* From breakeven line: TP dynamically follows the average position price.
* From last executed SO: TP is calculated from the price of the last executed order.
* Filters for closing on signal
* Only ➕: If TP is triggered by a signal, the deal will be closed only if it is in the black relative to the average price.
* Or >TP: If TP is triggered by a signal, the trade will be closed only if the closing price is better than (or equal to) the estimated price of this TP.
* TP type of trailing: Yes, take profit has a trailing too! It works differently than the SL trailing.
* Standard / ATR: After the price touches the "virtual" TP level, the trailing is activated. He does not place a stop order, but begins to move away from the price, dynamically moving the limit order to close further and further in the profitable direction, allowing him to collect the maximum from the impulse movement.
* External Source: TP will follow any selected line of the third-party indicator.
* Period and Multiplier: Parameters for calculating the trailing margin TP.
* Source: The source of the line for the trailing TP of the third-party indicator.
* TP level settings (sections 1️⃣, 2️⃣, 3️⃣, 4️⃣): The strategy supports up to four independent take profit levels, which allows for a flexible system of partial commits.
For each level, you can set:
* TP: Enable the level and set its percentage deviation from the base price.
* Size: What percentage of the current position will be closed when this level is reached. For the last active TP, this parameter is ignored, and 100% of the remaining position is closed.
* Trailing TP: Enable the above-described trailing mechanism for this particular level.
* Signal: Enable closing based on the signal from the external indicator for this level.
* Or take: If both the closing on the signal and the limit order are enabled, then whatever comes first will work.
* After SO: Activate this TP level only after the specified number of safety orders has been executed. This allows you to set closer targets for riskier (deeply averaged) positions.
// ------------------------
6. 🔬 GRID and MultiGrid Analysis on Lower TFs (LTF) 🔬
This group activates one of the most important functions for accurate testing of grid strategies.
* Enable LTF Calculation ⮕ The main switch of the analysis mode on the lower timeframes.
* Timeframe selection: A drop-down list where you can select a timeframe for detailed analysis. For example, if your main schedule is 1 hour, you can select 1 minute here. The strategy will emulate the trading of minute candles within each hour candle.
❗️Important: As mentioned in the first part, the use of this mode is critically necessary to obtain realistic backtest results, especially for strategies with a dense grid of orders. Without it, the results may be overly optimistic and not reflect the real dynamics of the market. It should be remembered that TradingView imposes a limit on the number of intra-bars (minor TF bars) that can be requested. This is usually about 100,000 bars.
// ------------------------
7. 🕘 Backtest Date Range 🕘
This group allows you to focus testing on a specific historical period.
* Limit Date Range: Enables date filtering.
* Start time: The date and time when the strategy will start analyzing and opening deals.
* End time: The date and time after which the strategy will stop opening new deals and complete testing.
// ------------------------
8. 🎨 Visualization 🎨
All the options responsible for the appearance and information content of the chart are collected here.
* Show PnL labels: Enables/disables the display of text labels with the result (profit/loss) after closing each trade.
* Statistics Table: Enables/disables the main dashboard with detailed statistics on the results of the backtest.
* Strategy Settings Table: Enables/disables an additional panel that summarizes all the key parameters of the current configuration.
* Monthly Profit Table: Enables/disables a table with a breakdown of percentage returns by month and year.
* Table settings: For each of the three tables, you can individually adjust the Text size and Table Position on the screen to position them as conveniently as possible.
* Decimal places: Defines how many decimal places will be displayed in numeric values in tables and on labels.
// ------------------------
9. ✉️ Webhook Settings ✉️
This group is intended for traders who want to automate trading on strategy signals using third-party services and exchanges (for example, 3Commas, WunderTrading, Cryptorobotics, Cryptohopper, Bitsgap, Binance, ByBit, OKX, Pionex, Bitget or proprietary solutions).
For each key event in the strategy, there is a separate switch and a text field:
* Webhook for Open: Enable and set a message for the webhook that will be sent when the base order is opened.
* Webhook for Averaging: A message sent when executing any insurance order.
* Webhook for Take Profit: A message sent when closing on take profit (including partial ones).
* Webhook for Stop-Loss: A message sent when a stop loss is closed.
You can insert a JSON code or any other message format that your service requires for automation into the text fields. The strategy supports special placeholders (for example, `{{strategy.order.alert_message}}`), which allow you to dynamically insert the necessary data into the message, such as the amount of USDT or the percentage of the deposit for entry, averaging and take profit orders.
Order Blocks + Order-Flow ProxiesOrder Blocks + Order-Flow Proxies
This indicator combines structural analysis of order blocks with lightweight order-flow style proxies, providing a tool for chart annotation and contextual study. It is designed to help users visualize where significant structural shifts occur and how simple volume-based signals behave around those areas. The script does not guarantee profitable outcomes, nor does it issue financial advice. It is intended purely for research, learning, and discretionary use.
Conceptual Background
Order Blocks
An “order block” is a term often used to describe a zone on the chart where price left behind a significant reversal or imbalance before continuing strongly in the opposite direction. In practice, this can mean the last bullish or bearish candle before a strong breakout. Traders sometimes study these regions because they believe that unfilled resting orders may exist there, or simply because they mark important pivots in price structure. This indicator detects such moments by scanning for breaks of structure (BOS). When price pushes above or below recent swing levels with sufficient displacement, the script identifies the prior opposite candle as the potential order block.
Break of Structure
A break of structure in this context is defined when the closing price moves beyond the highest high or lowest low of a short lookback window. The script compares the magnitude of this break to an ATR-based displacement filter. This helps ensure that only meaningful moves are marked rather than small, random fluctuations.
Order-Flow Proxies
Traditional order flow analysis may use bid/ask data, footprint charts, or volume profiles. Because TradingView scripts cannot access true order-book data, this indicator instead uses proxy signals derived from standard chart data:
Delta (proxy): Estimated imbalance of buying vs. selling pressure, approximated using bar direction and volume.
Imbalance ratio: Normalizes delta by total volume, ranging between -1 and +1 in theory.
Cumulative Delta (CVD): Running sum of delta over time.
Effort vs. Result (EvR): A comparison between volume and actual bar movement, highlighting cases where large effort produced little result (or vice versa).
These are not real order-flow measurements, but rather simple mathematical constructs that mimic some of its logic.
How the Script Works
Detecting Break of Structure
The user specifies a swing length. When price closes above the recent high (for bullish BOS) or below the recent low (for bearish BOS), a potential shift is recorded.
To qualify, the breakout must exceed a displacement filter proportional to the ATR. This helps filter out weak moves.
Locating the Order Block Candle
Once a BOS is confirmed, the script looks back within a short window to find the last opposite-colored candle.
The high/low or open/close of that candle (depending on user settings) is marked as the potential order block zone.
Drawing and Maintaining Zones
Each order block is represented as a colored rectangle extending forward in time.
Bullish zones are teal by default, bearish zones are red.
Zones extend until invalidated (price closing or wicking beyond them, depending on user preference) or until a user-defined lifespan expires.
A pruning mechanism ensures that only the most recent set number of zones remain, preventing chart overload.
Monitoring Touches
The script checks whether the current bar’s range overlaps any existing order block.
If so, the “closest” zone is considered touched, and a label may appear on the chart.
Confirmation Filters
Touches can optionally be confirmed by order-flow proxies.
For a bullish confirmation, the following must align:
Imbalance ratio above threshold,
Delta EMA positive,
Effort vs. Result positive.
For a bearish confirmation, the opposite holds true.
Optionally, a higher-timeframe EMA slope filter can gate these confirmations. For example, a bullish confirmation may only be accepted if the higher-timeframe EMA is sloping upward.
Alerts
Users may create alerts based on conditions such as “bullish touch confirmed” or “bearish touch confirmed.”
Alerts can be gated to only fire after bar close, reducing intrabar noise.
Standard alertcondition calls are provided, and optional inline alert() calls can be enabled.
Inputs and Customization
Structure & OB
Swing length: Defines how many bars back to check for BOS.
ATR length & displacement factor: Adjust sensitivity for structural breaks.
Body vs. wick reference: Choose whether zones are based on candle bodies or full ranges.
Invalidation rule: Pick between wick breach or close beyond the level.
Lifespan (bars): Limit how long a zone remains active.
Max keep: Cap the number of zones stored to reduce clutter.
Order-Flow Proxies
Delta mode: Choose between “Close vs Previous Close” or “Body” for delta calculation.
EMA length: Smooths the delta/imbalance series.
Z-score lookback: Defines the averaging window for EvR.
Confirmation thresholds: Adjust the imbalance levels required for long/short confirmation.
Higher Timeframe Filter
Enable HTF gate: Optional filter requiring higher-timeframe EMA slope alignment.
HTF timeframe & EMA length: Configurable for context alignment.
Style
Colors and transparency for bullish and bearish zones.
Border color customization.
Alerts
Enable inline alerts: Optional direct calls to alert().
Alerts on bar close only: Helps avoid multiple firings during bar formation.
Practical Use
This tool is best seen as a way to annotate charts and to study how simple volume-derived signals behave near important structural levels. Some users may:
Observe whether order blocks line up with later price reactions.
Study how imbalance or cumulative delta conditions align with these zones.
Use it in a discretionary workflow to highlight areas of interest for deeper analysis.
Because the proxies are based only on candle OHLCV data, they are approximations. They cannot replace true depth-of-market analysis. Similarly, order block detection here is one specific algorithmic interpretation; other traders may define order blocks differently.
Limitations and Disclaimers
This indicator does not predict future price movement.
It does not access real order book or tick-by-tick data. All signals are derived from bar OHLCV.
Past performance of signals or zones does not guarantee future results.
The script is for educational and informational purposes only. It is not financial advice.
Users should test thoroughly, adjust parameters to their own instruments and timeframes, and use it in combination with broader analysis.
Summary
The Order Blocks + Order-Flow Proxies script is an experimental study tool that:
Detects potential order blocks using a displacement-filtered break of structure.
Marks these zones as boxes that persist until invalidation or expiry.
Provides lightweight order-flow-style proxies such as delta, imbalance, CVD, and effort vs. result.
Allows confirmation of zone touches through these proxies and optional higher-timeframe context.
Offers flexible customization, alerting, and chart-style options.
It is not a trading system by itself but rather a framework for studying price/volume behavior around structurally significant areas. With careful exploration, it can give users new ways to visualize market structure and to understand how simple flow-like measures behave in those contexts.
Reversal Radars — Berk v2.0 (Bottom & Top)1) Combined script (Dip+Tepe)
Title:
Reversal Radars — Berk v2.0 (Bottom & Top)
Description (EN):
What it does
Two high-probability reversal detectors in one indicator: a Bottom Reversal Radar (long bias) and a Top Reversal Radar (short/hedge bias). Each radar aggregates multiple conditions into a single score and triggers when Score ≥ Threshold.
How it works
RSI regime shift: Bottom = recovery after oversold (touched 30, crosses up 35). Top = roll-over from overbought (touched 70, crosses down 65).
MACD cross: Bull (up) for bottoms, Bear (down) for tops.
EMA8 filter: Close above (bottom) / below (top) EMA(8).
Structure break (BOS): Close above recent swing high / below recent swing low (lookbackBars, using precomputed highest/lowest to avoid inconsistencies).
EMA200 proximity: Price within a configurable band (default −5% … +2%).
Volume expansion: Volume ≥ SMA(20) × multiplier (default 1.5×).
Divergence: Pivot-confirmed (3/3) bullish (bottom) or bearish (top) RSI divergence.
Scoring: RSI shift +2, divergence +2, MACD +1, EMA8 +1, BOS +1, Volume +1, EMA200 band +1.
Signals & Alerts
Bottom: label “DÖNÜŞ↑” and alert “Dipten Dönüş — Ana Sinyal” when scoreLong ≥ thrLong.
Top: label “DÖNÜŞ↓” and alert “Tepeden Dönüş — Ana Sinyal” when scoreShort ≥ thrShort.
Use Once per bar close for stable alerts.
Inputs
lenRSI, rsiOS=30, rsiRecover=35, rsiOB=70, rsiFall=65, volLen=20, volMult=1.5, lookbackBars=5, ema200 band (−5…+2%), thrLong/thrShort, toggles for Bottom/Top.
Timeframes & tips
Best on Daily/4H. Tighten thresholds (e.g., 4) and raise volume multiplier (1.8–2.0×) on lower TFs or thin liquidity.
No-repaint note
Evaluated on bar close; pivot divergences confirm with a natural ~3-bar delay.
Disclaimer
Educational use only. Not financial advice.
Tags: reversal, divergence, rsi, macd, ema, volume, trend, screener, stocks, crypto, bist
2) Bottom-only (Dip)
Title:
Bottom Reversal Radar — Berk v1.4
Description (EN):
Purpose
Scores bottoming conditions and triggers when Score ≥ Threshold (default 3).
Components
RSI recovery after oversold (30→35), MACD bull cross, close above EMA8, BOS above recent swing high, near-EMA200 band (−5…+2%), volume ≥ SMA(20)×1.5, and pivot-confirmed (3/3) bullish RSI divergence. Weights: RSI +2, Divergence +2, others +1.
Usage
Add to chart, set alert “Dipten Dönüş — Ana Sinyal”, Once per bar close. Works on any timeframe (need ≥200 bars for EMA200). Daily/4H recommended.
No-repaint
Bar-close evaluation; divergence confirms with ~3 bars.
Tags: bottom, reversal, rsi, macd, ema, volume, divergence
3) Top-only (Tepe)
Title:
Top Reversal Radar — Berk v1.0
Description (EN):
Purpose
Detects topping risk and triggers when Score ≥ Threshold (default 3) for exits/hedges.
Components
RSI roll-over from overbought (70→65), MACD bear cross, close below EMA8, BOS below recent swing low, near-EMA200 band, volume ≥ SMA(20)×1.5, and pivot-confirmed (3/3) bearish RSI divergence. Weights: RSI +2, Divergence +2, others +1.
Usage
Add to chart, set alert “Tepeden Dönüş — Ana Sinyal”, Once per bar close. Daily/4H preferred; tighten thresholds on lower TFs.
No-repaint
Bar-close evaluation; divergence confirms with ~3 bars.
Tags: top, reversal, rsi, macd, ema, volume, divergence
Ayman – Full Smart Suite Auto/Manual Presets + PanelIndicator Name
Ayman – Full Smart Suite (OB/BoS/Liq/FVG/Pin/ADX/HTF) + Auto/Manual Presets + Panel
This is a multi-condition trading tool for TradingView that combines advanced Smart Money Concepts (SMC) with classic technical filters.
It generates BUY/SELL signals, draws Stop Loss (SL) and Take Profit (TP1, TP2) levels, and displays a control panel with all active settings and conditions.
1. Main Features
Smart Money Concepts Filters:
Order Block (OB) Zones
Break of Structure (BoS)
Liquidity Sweeps
Fair Value Gaps (FVG)
Pin Bar patterns
ADX filter
Higher Timeframe EMA filter (HTF EMA)
Two Operating Modes:
Auto Presets: Automatically adjusts all settings (buffers, ATR multipliers, RR, etc.) based on your chart timeframe (M1/M5/M15).
Manual Mode: Fully customize all parameters yourself.
Trade Management Levels:
Stop Loss (SL)
TP1 – partial profit
TP2 – full profit
Visual Panel showing:
Current settings
Filter status
Trend direction
Last swing levels
SL/TP status
Alerts for BUY/SELL conditions
2. Entry Conditions
A BUY signal is generated when all these are true:
Trend: Price above EMA (bullish)
HTF EMA: Higher timeframe trend also bullish
ADX: Trend strength above threshold
OB: Price in a valid bullish Order Block zone
BoS: Structure break to the upside
Liquidity Sweep: Sweep of recent lows in bullish context
FVG: A bullish Fair Value Gap is present
Pin Bar: Bullish Pin Bar pattern detected (if enabled)
A SELL signal is generated when the opposite conditions are met.
3. Stop Loss & Take Profits
SL: Placed just beyond the last swing low (BUY) or swing high (SELL), with a small ATR buffer.
TP1: Partial profit target, defined as a ratio of the SL distance.
TP2: Full profit target, based on Reward:Risk ratio.
4. How to Use
Step 1 – Apply Indicator
Open TradingView
Go to your chart (recommended: XAUUSD, M1/M5 for scalping)
Add the indicator script
Step 2 – Choose Mode
AUTO Mode: Leave “Use Auto Presets” ON – parameters adapt to your timeframe.
MANUAL Mode: Turn Auto OFF and adjust all lengths, buffers, RR, and filters.
Step 3 – Filters
In the Filters On/Off section, enable/disable specific conditions (OB, BoS, Liq, FVG, Pin Bar, ADX, HTF EMA).
Step 4 – Trading the Signals
Wait for a BUY or SELL arrow to appear.
SL and TP levels will be plotted automatically.
TP1 can be used for partial close and TP2 for full exit.
Step 5 – Alerts
Set alerts via BUY Signal or SELL Signal to receive notifications.
5. Best Practices
Scalping: Use M1 or M5 with AUTO mode for gold or forex pairs.
Swing Trading: Use M15+ and adjust buffers/ATR manually.
Combine with price action confirmation before entering trades.
For higher accuracy, wait for multiple filter confirmations rather than acting on the first arrow.
6. Summary Table
Feature Purpose Can Disable?
Order Block Finds key supply/demand zones ✅
Break of Structure Detects trend continuation ✅
Liquidity Sweep Finds stop-hunt moves ✅
Fair Value Gap Confirms imbalance entries ✅
Pin Bar Price action reversal filter ✅
ADX Trend strength filter ✅
HTF EMA Higher timeframe confirmation ✅
Range Breakout [sgbpulse]Range Breakout
1. Overview
The "Range Breakout " indicator is a powerful tool designed to identify and visually display price ranges on your chart using pivot points. It dynamically draws two distinct boxes – an External Range and an Internal Range – helping traders pinpoint potential support and resistance zones. Beyond its visual representation, the indicator offers a comprehensive set of 12 unique breakout alerts, providing real-time notifications for significant price movements outside these defined ranges. Additionally, it integrates RSI and MFI metrics for momentum confirmation.
2. How It Works
The indicator operates by identifying pivot points based on user-defined "left" and "right" bar lengths. A high pivot is a bar with a specified number of lower highs both to its left and right, and similarly for a low pivot.
External Range: Calculated using longer pivot lengths (default: 15 bars left, 6 bars right). This range represents broader, more significant price consolidation areas.
Internal Range: Calculated using shorter pivot lengths (default: 4 bars left, 3 bars right). This range captures tighter, more immediate price consolidations within the broader trend.
The External Range will always be greater than or equal to the Internal Range, as it's based on a wider historical context. Both ranges are displayed as transparent boxes on your chart, dynamically adjusting as new pivots are formed.
3. Key Features and Settings
Customizable Pivot Lengths:
External Range (Left/Right Bars): Adjust sensitivity for identifying the broader price range. Longer lengths lead to more stable, but less frequent, range updates.
Internal Range (Left/Right Bars): Adjust sensitivity for the tighter, more immediate price range.
Tool Tips: Minimum 6 bars for the External Range, and minimum 2 bars for the Internal Range.
Customizable Range Colors: Easily change the background colors of the External and Internal Range boxes to match your chart's aesthetic.
Dynamic Range Display: The indicator automatically updates the range boxes as new pivot highs and lows are formed, always presenting the most current valid ranges.
RSI / MFI Settings:
Timeframe Source: Select the timeframe for RSI and MFI calculation.
- Chart: Calculation based on the current chart timeframe.
- Daily: Always calculated based on the daily ("D") timeframe, even if the chart is on a lower timeframe.
RSI Length: Period length for RSI calculation (default: 14).
RSI Overbought Level: Overbought level for RSI (default: 70.0).
RSI Oversold Level: Oversold level for RSI (default: 30.0).
MFI Length: Period length for MFI calculation (default: 14).
MFI Overbought Level: Overbought level for MFI (default: 80.0).
MFI Oversold Level: Oversold level for MFI (default: 20.0).
4. Synergy of Ranges & Breakout Strength
The interaction between the External and Internal Ranges provides deep insights into price movement and breakout strength:
Immediate Direction: The movement of the Internal Range (up or down) indicates the short-term directional bias within the broader framework of the External Range.
Strength Confirmation: A breakout of the External Range, followed by a breakout of the Internal Range, confirms the strength of the move and increases confidence in the breakout.
Strong Momentum ("Leaving" Ranges Behind): When price breaks out with exceptionally strong momentum, it continues to move aggressively and does not immediately form new pivots. In such situations, the existing ranges (External and Internal) remain in place while the candles "leave them behind." A "Full Candle" breakout, where the entire candle moves past both ranges, indicates a particularly powerful and decisive move.
Momentum (RSI / MFI) as Confirmation:
- RSI (Relative Strength Index): Measures the speed and change of price movements. Extreme values (above 70 or below 30) indicate overbought/oversold conditions respectively, confirming strong momentum in a breakout.
- MFI (Money Flow Index): Similar to RSI but incorporates volume. Extreme values (above 80 or below 20) indicate strong money flow in/out, reinforcing breakout confirmation.
- Importance of Confirmation: If a breakout occurs but momentum indicators do not confirm it (for example, an upside breakout while RSI is declining), this could signal weakness in the move and the risk of a false breakout (Fakeout).
5. Visuals
The indicator provides clear visual representations on the chart:
Range Boxes:
Two dynamic boxes are drawn on the chart: one for the External Range and one for the Internal Range.
These boxes update continuously, displaying the current range boundaries based on the latest pivots. They provide an immediate visual indication of support and resistance levels.
RSI/MFI Status Labels:
Small text labels appear to the right of the current bar, vertically centered.
They display the status of RSI and MFI: RSI OB (Overbought), RSI OS (Oversold), MFI OB, MFI OS, along with the exact value.
Important: The labels remain on the chart as long as the condition holds (indicator is above/below the level), unlike alerts which mark a singular crossover event.
Plotting of Key Values:
The indicator plots six invisible series on the chart, primarily to allow the user to view the exact numerical values of:
- The upper and lower bounds of the External Range (External High, External Low).
- The upper and lower bounds of the Internal Range (Internal High, Internal Low).
- The calculated RSI and MFI values (RSI, MFI).
These values are accessible for viewing through TradingView's Data Window and also via the Status Line when hovering over the relevant candle. This enables more precise quantitative analysis of range levels and momentum.
6. Comprehensive Breakout Alerts
The "Range Breakout " indicator provides 12 distinct alert conditions for breakouts, allowing you to select the required level of confirmation for each alert. All alerts are triggered only upon a fully confirmed bar close (barstate.isconfirmed) to minimize false signals and ensure reliability.
All breakout alerts are configured to detect a Crossover/Crossunder of the levels, meaning a specific event where the price moves from one side of the range to the other.
External Range Breakout UP
- Close: Price closes above the External Range.
- Real Body: The entire "real body" of the candle (min of open/close prices) closes above the External Range.
- Full Candle: The entire candle (the lowest point of the candle) closes above the External Range.
External Range Breakout DOWN
- Close: Price closes below the External Range.
- Real Body: The entire "real body" of the candle (max of open/close prices) closes below the External Range.
- Full Candle: The entire candle (the highest point of the candle) closes below the External Range.
Internal Range Breakout UP
- Close: Price closes above the Internal Range.
- Real Body: The "real body" of the candle closes above the Internal Range.
- Full Candle: The entire candle closes above the Internal Range.
Internal Range Breakout DOWN
- Close: Price closes below the Internal Range.
- Real Body: The "real body" of the candle closes below the Internal Range.
- Full Candle: The entire candle closes below the Internal Range.
7. Ideal Use Cases
This indicator is ideal for traders who:
Want to clearly identify and monitor price consolidation zones.
Seek confirmation for breakout strategies across various timeframes.
Require reliable and automated alerts for potential entry or exit points based on range expansion.
8. Complementary Indicator
For even more comprehensive market analysis, we highly recommend using this indicator in conjunction with Market Structure Support & Resistance External/Internal & BoS .
This powerful complementary indicator automatically and accurately identifies significant support and resistance levels by locating high and low pivot points, as well as key Pre-Market High/Low levels. Its strength lies in its dynamic adaptability to any timeframe and asset, providing precise and relevant real-time levels while maintaining a clean chart. It also identifies Break of Structure (BoS) to signal potential trend changes or continuations.
Using both indicators together provides a robust framework for identifying defined ranges and potential trend shifts, enabling more informed trading decisions.
View Market Structure Support & Resistance External/Internal & BoS Indicator
9. Important Note: Trading Risk
This indicator is intended for educational and informational purposes only and does not constitute investment advice or a recommendation for trading in any form whatsoever.
Trading in financial markets involves significant risk of capital loss. It is important to remember that past performance is not indicative of future results. All trading decisions are your sole responsibility. Never trade with money you cannot afford to lose.
NF Liquidity Sweep TrackerNF Liquidity Sweep Tracker
A tool for detecting stop hunts, reversals, and liquidity grabs
Built for Smart Money Concepts (SMC) and ICT-style trading
🔧 Full Features Usage -
🔹 1. Lookback Period
How it works: Automatically finds recent swing highs and lows using a configurable Swing High/Low Detection.
Forms the foundation for detecting liquidity levels. These are potential areas where price may reverse or sweep.
🔹 2. Liquidity Sweep Detection
Detects price movements that break through swing points, often used by institutions to trigger stops.
Modes Available:
Wick-Based Sweeps: Price wicks above/below a swing but closes back inside.
Indicates a possible stop hunt or false breakout. Shown as Label: LS
Break- Retest Based Sweeps: Price breaks the swing level and continues or retests the zone.
Helps confirm continuation or retest setups. Shown as Labels: BO (Breakout), R (Retest)
All Types of Sweeps:
Enables both wick-based and breakout/retest sweeps.
🔹 3. Liquidity Zones (Boxes)
Draws boxes around swept areas to highlight liquidity zones.
Color-coded:
🟩 Green for bullish sweeps (below swing lows)
🟥 Red for bearish sweeps (above swing highs)
Usage: These zones act as temporary support/resistance and help traders spot: Reversals, Breakout continuations, Entries after retests.
🔹 5. Visual Labels
Helps quickly identify the type of liquidity event.
LS – Liquidity Sweep
Triggered when price wicks above/below a level and closes back inside.
BO – Breakout
Triggered when price cleanly breaks above/below a zone.
R – Retest
Triggered when price revisits a broken level.
Note: In a strong trending market, using a wick-based liquidity sweep (LS) strategy is often ineffective because the liquidity sweeps triggered by breakouts (BO) and breakdowns tend to dominate price action, making wick-based setups less reliable. However, liquidity sweeps ( LS ) tend to work very well when they occur near strong liquidity zones—areas where a significant concentration of buy or sell orders exist—because these zones act as natural support or resistance levels, increasing the likelihood of price reacting strongly and providing better trading opportunities.
📌 Usage Tip: These labels help with entry zone, trend confirmation, and trap detection.
🔹 6. Liquidity Lines
What it does: Draws horizontal lines from each swing high/low.
Usage: Acts as a visual reference for where liquidity lies. Great for planning take-profits, stop placements, or sniper entries.
🔹 8. Customization Options
Turn on/off:
Labels (LS, BO, R)
Liquidity lines
Breakout/retest zones
Set your own:
Line and box colors
Detection mode (Wick/Breakout/All)
Lookback period for swing points
🧠 Many Trader's use this concept to -
Identify high-probability reversal points (after sweeps)
Trade stop hunts and traps like institutions
Use zones for breakout and retest entries
Avoid false signals by waiting for sweeps and mitigations.
ACE FVG & IFVG Trading System1. What the Script Does
The "ACE FVG & IFVG Trading System " is a TradingView Pine Script (version 5) that identifies and trades Fair Value Gaps (FVGs) and Inverse Fair Value Gaps (IFVGs). It offers:
Detection of bullish/bearish FVGs and IFVGs with customizable parameters.
Multiple entry types: regular FVG retracement, Break of Structure (BOS), breakaway gaps, and Immediate/Retrace IFVG entries.
A pending setup system showing potential trades before they trigger.
Risk management with configurable stop loss (SL) and take profit (TP) based on FVG levels, swing points, or risk-reward ratios.
Market structure analysis using swing highs/lows, BOS, and Market Structure Shifts (MSS).
Time filters to restrict trading to specific sessions.
Visualizations including FVG boxes, trade boxes, pivot lines, and labels.
Entry and performance tables displaying trade details and metrics like win rates and P&L by entry type.
2. How It Works
The script is organized into modular sections for efficient execution:
Inputs: Extensive customization options (e.g., FVG size, entry types, SL/TP modes, time filters) grouped for clarity.
Data Structures: Custom types (FVGData, SwingPoint, EntryData) store FVG, pivot, and trade data in arrays.
Utility Functions: Handle calculations like risk-reward ratios, time validation, and trade size filtering.
Swing Point Detection: Uses ta.pivothigh/ta.pivotlow to identify pivots, supporting BOS/MSS and SL/TP calculations.
FVG Detection: Identifies regular FVGs (low > high or high < low ) and IFVGs (mitigated FVGs with immediate or retrace signals).
Entry Logic: Triggers trades based on user-enabled conditions (e.g., retracement, BOS, breakaway gaps) with dynamic SL/TP.
Trade Management: Tracks active/pending trades, updates visualizations (boxes, lines, labels), and handles cancellations/invalidations.
Main Logic: Executes on each bar to detect FVGs, process entries, update trades, and manage visualizations.
Tables: Displays recent trades and performance stats (e.g., win rates by entry type) on the last bar.
Pivot Visualization: Plots swing points with dynamic extensions and mitigation status (solid/dotted lines).
3. How to Use It
Add to TradingView:
Open Pine Editor, paste the script, save it, and add to chart.
Configure Inputs:
Access settings via chart (right-click indicator > Settings).
Adjust:
fvgMinSize for market volatility (e.g., 5 for forex).
Entry types (e.g., enable IFVG, disable breakaway gaps).
SL/TP modes and minimum R:R (e.g., 2.0 for 1:2).
Time filters for active sessions (e.g., 09:30-16:00).
Visual settings (box transparency, table positions).
Interpret Output:
FVG Boxes: Green (bullish), red (bearish), purple (IFVG/mitigated).
Trade Boxes: Gray-green/red-gray (pending), green/red (active), updated for win/loss.
Pivot Lines: Solid (unmitigated), dotted (mitigated).
Tables: Entry table shows trade details; performance table shows win rates/P&L.
Trading:
Monitor pending setups for entry signals.
Enter manually at active trade levels, following SL/TP.
Use performance stats to refine settings.
Test on demo charts and adjust for market/timeframe.
Best Practices:
Use higher timeframes (e.g., 1H, 4H) for less noise.
Combine with other analysis (e.g., support/resistance).
Backtest using TradingView’s replay feature.
Originality
The script is original due to its unique combination of features:
Enhanced IFVG Strategy: Dual Immediate/Retrace IFVG modes with a novel “Immediate Then Retrace” preference.
Pending Setup System: Proactive visualization of potential trades with auto-cancellation.
Granular Performance Tracking: Detailed breakdown of win rates/P&L by entry type (regular FVG, IFVG, breakaway).
Dynamic Pivot Visualization: Real-time mitigation updates (solid to dotted lines).
Modular Design: Custom types and organized logic for extensibility. It builds on general FVG concepts (e.g., from ICT) but implements unique logic and features not found in standard
TradingView FVG scripts, distinguishing it from both open-source and premium indicators.
Credit of Concepts to ICT
Collaborations with JMAC and Timeless






















