OPEN-SOURCE SCRIPT
AMD1

TradingView Pine Script v6 Indicator Request
Project Name
AMD Liquidity Sweep Pro (Accumulation → Manipulation → Distribution)
Objective
Create a non-repainting TradingView Pine Script v6 indicator that identifies high-probability ICT/Smart Money Concepts AMD setups by detecting:
Accumulation
Manipulation
Distribution
The indicator should only generate trade signals after all AMD conditions are met and multiple confirmation filters align.
Core AMD Logic
Accumulation Detection
Identify consolidation/ranging markets before manipulation occurs.
Requirements:
Detect low-volatility accumulation ranges.
Detect equal highs (EQH).
Detect equal lows (EQL).
Detect internal liquidity resting inside the range.
Draw a yellow box around accumulation zones.
Allow user adjustment of:
Minimum accumulation duration.
Maximum range size.
Sensitivity settings.
Visual:
Accumulation box color = Yellow.
2. Manipulation Detection
Identify liquidity grabs occurring after accumulation.
Requirements:
Detect sweeps above accumulation highs.
Detect sweeps below accumulation lows.
Detect internal liquidity sweeps.
Detect external liquidity sweeps.
Label sweep direction.
Mark liquidity taken.
Visual:
Manipulation candles boxed in Purple.
3. Distribution Detection
After manipulation occurs, detect distribution and directional expansion.
Requirements:
Require displacement candles.
Require Market Structure Shift (MSS).
Require Break of Structure (BOS).
Require directional expansion away from manipulation.
Visuals:
Bullish Distribution:
Green box.
Bearish Distribution:
Red box.
Market Structure Requirements
Require all of the following:
MSS confirmation.
BOS confirmation.
Displacement confirmation.
Strong candle body percentage filter.
Optional volume expansion confirmation.
No signal should occur without structure confirmation.
Liquidity Detection
Indicator must automatically identify:
Internal liquidity.
External liquidity.
Equal highs.
Equal lows.
Swing highs.
Swing lows.
Buy-side liquidity.
Sell-side liquidity.
Trade setups should prioritize:
Internal liquidity sweep.
External liquidity sweep.
MSS/BOS.
Displacement.
Premium & Discount Filter
Automatically identify current dealing range using:
Most recent valid swing high.
Most recent valid swing low.
Plot:
Premium Zone (upper 50%).
Equilibrium (50%).
Discount Zone (lower 50%).
Visuals:
Premium shaded light red.
Discount shaded light green.
Equilibrium line.
Rules:
Bullish trades:
Only allowed in Discount.
Bearish trades:
Only allowed in Premium.
Block all:
Bullish trades in Premium.
Bearish trades in Discount.
Higher Timeframe Trend Filter
Determine trend using:
15 Minute Market Structure.
1 Hour Market Structure.
Bullish Bias:
Higher highs.
Higher lows.
Bullish BOS.
Bullish MSS.
Bearish Bias:
Lower highs.
Lower lows.
Bearish BOS.
Bearish MSS.
Rules:
Bullish signals:
Must align with 15m or 1H bullish structure.
Bearish signals:
Must align with 15m or 1H bearish structure.
Optional setting:
Require both HTFs to agree.
Display:
Bullish
Bearish
Neutral
HTF bias dashboard.
1-Minute PD Array Confirmation
No trade signal may appear without 1-minute PD Array confirmation.
Recognize:
Fair Value Gaps (FVG).
Order Blocks (OB).
Breaker Blocks.
Mitigation Blocks.
Inversion Fair Value Gaps (IFVG).
Allow user to enable/disable each PD Array type.
Bullish Entry:
Require:
AMD complete.
Liquidity swept.
MSS/BOS confirmed.
Discount confirmed.
HTF bullish.
Price retraces into bullish 1-minute PD Array.
Bullish reaction candle closes.
Bearish Entry:
Require:
AMD complete.
Liquidity swept.
MSS/BOS confirmed.
Premium confirmed.
HTF bearish.
Price retraces into bearish 1-minute PD Array.
Bearish reaction candle closes.
Visuals:
Bullish PD Arrays = Light Green.
Bearish PD Arrays = Light Red.
Label PD Array type.
Turtle Soup Mode
Add optional toggle.
Requirements:
External liquidity sweep.
Immediate reclaim.
MSS confirmation.
FVG confirmation.
PD Array confirmation.
Generate higher-quality reversal entries.
Enable/Disable setting.
Trade Signal Generation
Only generate signals after ALL conditions are satisfied.
Bullish Signal:
HTF Trend
→ Discount
→ Accumulation
→ Manipulation
→ External Liquidity Sweep
→ MSS
→ BOS
→ Displacement
→ Bullish 1m PD Array Retest
→ Entry
Bearish Signal:
HTF Trend
→ Premium
→ Accumulation
→ Manipulation
→ External Liquidity Sweep
→ MSS
→ BOS
→ Displacement
→ Bearish 1m PD Array Retest
→ Entry
Visuals:
Bullish Entry:
Green Up Arrow.
Bearish Entry:
Red Down Arrow.
Entry, Stop Loss & Take Profit System
Automatically calculate:
Entry:
Optimal trade entry.
Stop Loss:
Beyond manipulation sweep.
Take Profit Levels:
TP1:
1R
TP2:
2R
TP3:
External Liquidity Target
TP4:
Opposing Liquidity Target
Draw:
Green entry box.
Red stop loss box.
TP lines.
Risk/reward labels.
Display:
Entry price.
Stop price.
TP levels.
Current R multiple.
Setup Quality Score
Create setup scoring engine.
Maximum Score:
100
Example:
External Liquidity Sweep = 25
Internal Liquidity Sweep = 15
MSS = 15
BOS = 15
Displacement = 10
FVG = 5
Premium/Discount Alignment = 5
HTF Alignment = 5
1m PD Array Confirmation = 5
Only display signals with:
Minimum Score = 80
User adjustable.
Display score next to entry.
Example:
AMD Score: 92/100
Dashboard
Create on-chart dashboard displaying:
✓ Accumulation Found
✓ Manipulation Found
✓ Distribution Confirmed
✓ Internal Liquidity Taken
✓ External Liquidity Taken
✓ MSS Confirmed
✓ BOS Confirmed
✓ Displacement Confirmed
✓ FVG Present
✓ Premium/Discount Confirmed
✓ HTF Trend Confirmed
✓ 1m PD Array Confirmed
✓ Setup Score Passed
Only show signal when every required condition is confirmed.
Alerts
Create alerts for:
Bullish AMD Setup
Bearish AMD Setup
Liquidity Sweep Detected
MSS Confirmed
BOS Confirmed
PD Array Confirmed
Entry Triggered
TP1 Hit
TP2 Hit
TP3 Hit
Stop Loss Hit
Alert messages should include:
Symbol
Timeframe
Direction
Entry
Stop
Target
Technical Requirements
Pine Script Version 6.
Non-repainting.
Candle-close confirmation only.
Optimized for:
NQ
MNQ
ES
MES
Gold
Forex
Crypto
Stocks
Minimize chart clutter.
Include user customization settings.
Efficient code with minimal performance impact.
The indicator should focus on producing fewer but higher-quality signals rather than frequent signals.
Project Name
AMD Liquidity Sweep Pro (Accumulation → Manipulation → Distribution)
Objective
Create a non-repainting TradingView Pine Script v6 indicator that identifies high-probability ICT/Smart Money Concepts AMD setups by detecting:
Accumulation
Manipulation
Distribution
The indicator should only generate trade signals after all AMD conditions are met and multiple confirmation filters align.
Core AMD Logic
Accumulation Detection
Identify consolidation/ranging markets before manipulation occurs.
Requirements:
Detect low-volatility accumulation ranges.
Detect equal highs (EQH).
Detect equal lows (EQL).
Detect internal liquidity resting inside the range.
Draw a yellow box around accumulation zones.
Allow user adjustment of:
Minimum accumulation duration.
Maximum range size.
Sensitivity settings.
Visual:
Accumulation box color = Yellow.
2. Manipulation Detection
Identify liquidity grabs occurring after accumulation.
Requirements:
Detect sweeps above accumulation highs.
Detect sweeps below accumulation lows.
Detect internal liquidity sweeps.
Detect external liquidity sweeps.
Label sweep direction.
Mark liquidity taken.
Visual:
Manipulation candles boxed in Purple.
3. Distribution Detection
After manipulation occurs, detect distribution and directional expansion.
Requirements:
Require displacement candles.
Require Market Structure Shift (MSS).
Require Break of Structure (BOS).
Require directional expansion away from manipulation.
Visuals:
Bullish Distribution:
Green box.
Bearish Distribution:
Red box.
Market Structure Requirements
Require all of the following:
MSS confirmation.
BOS confirmation.
Displacement confirmation.
Strong candle body percentage filter.
Optional volume expansion confirmation.
No signal should occur without structure confirmation.
Liquidity Detection
Indicator must automatically identify:
Internal liquidity.
External liquidity.
Equal highs.
Equal lows.
Swing highs.
Swing lows.
Buy-side liquidity.
Sell-side liquidity.
Trade setups should prioritize:
Internal liquidity sweep.
External liquidity sweep.
MSS/BOS.
Displacement.
Premium & Discount Filter
Automatically identify current dealing range using:
Most recent valid swing high.
Most recent valid swing low.
Plot:
Premium Zone (upper 50%).
Equilibrium (50%).
Discount Zone (lower 50%).
Visuals:
Premium shaded light red.
Discount shaded light green.
Equilibrium line.
Rules:
Bullish trades:
Only allowed in Discount.
Bearish trades:
Only allowed in Premium.
Block all:
Bullish trades in Premium.
Bearish trades in Discount.
Higher Timeframe Trend Filter
Determine trend using:
15 Minute Market Structure.
1 Hour Market Structure.
Bullish Bias:
Higher highs.
Higher lows.
Bullish BOS.
Bullish MSS.
Bearish Bias:
Lower highs.
Lower lows.
Bearish BOS.
Bearish MSS.
Rules:
Bullish signals:
Must align with 15m or 1H bullish structure.
Bearish signals:
Must align with 15m or 1H bearish structure.
Optional setting:
Require both HTFs to agree.
Display:
Bullish
Bearish
Neutral
HTF bias dashboard.
1-Minute PD Array Confirmation
No trade signal may appear without 1-minute PD Array confirmation.
Recognize:
Fair Value Gaps (FVG).
Order Blocks (OB).
Breaker Blocks.
Mitigation Blocks.
Inversion Fair Value Gaps (IFVG).
Allow user to enable/disable each PD Array type.
Bullish Entry:
Require:
AMD complete.
Liquidity swept.
MSS/BOS confirmed.
Discount confirmed.
HTF bullish.
Price retraces into bullish 1-minute PD Array.
Bullish reaction candle closes.
Bearish Entry:
Require:
AMD complete.
Liquidity swept.
MSS/BOS confirmed.
Premium confirmed.
HTF bearish.
Price retraces into bearish 1-minute PD Array.
Bearish reaction candle closes.
Visuals:
Bullish PD Arrays = Light Green.
Bearish PD Arrays = Light Red.
Label PD Array type.
Turtle Soup Mode
Add optional toggle.
Requirements:
External liquidity sweep.
Immediate reclaim.
MSS confirmation.
FVG confirmation.
PD Array confirmation.
Generate higher-quality reversal entries.
Enable/Disable setting.
Trade Signal Generation
Only generate signals after ALL conditions are satisfied.
Bullish Signal:
HTF Trend
→ Discount
→ Accumulation
→ Manipulation
→ External Liquidity Sweep
→ MSS
→ BOS
→ Displacement
→ Bullish 1m PD Array Retest
→ Entry
Bearish Signal:
HTF Trend
→ Premium
→ Accumulation
→ Manipulation
→ External Liquidity Sweep
→ MSS
→ BOS
→ Displacement
→ Bearish 1m PD Array Retest
→ Entry
Visuals:
Bullish Entry:
Green Up Arrow.
Bearish Entry:
Red Down Arrow.
Entry, Stop Loss & Take Profit System
Automatically calculate:
Entry:
Optimal trade entry.
Stop Loss:
Beyond manipulation sweep.
Take Profit Levels:
TP1:
1R
TP2:
2R
TP3:
External Liquidity Target
TP4:
Opposing Liquidity Target
Draw:
Green entry box.
Red stop loss box.
TP lines.
Risk/reward labels.
Display:
Entry price.
Stop price.
TP levels.
Current R multiple.
Setup Quality Score
Create setup scoring engine.
Maximum Score:
100
Example:
External Liquidity Sweep = 25
Internal Liquidity Sweep = 15
MSS = 15
BOS = 15
Displacement = 10
FVG = 5
Premium/Discount Alignment = 5
HTF Alignment = 5
1m PD Array Confirmation = 5
Only display signals with:
Minimum Score = 80
User adjustable.
Display score next to entry.
Example:
AMD Score: 92/100
Dashboard
Create on-chart dashboard displaying:
✓ Accumulation Found
✓ Manipulation Found
✓ Distribution Confirmed
✓ Internal Liquidity Taken
✓ External Liquidity Taken
✓ MSS Confirmed
✓ BOS Confirmed
✓ Displacement Confirmed
✓ FVG Present
✓ Premium/Discount Confirmed
✓ HTF Trend Confirmed
✓ 1m PD Array Confirmed
✓ Setup Score Passed
Only show signal when every required condition is confirmed.
Alerts
Create alerts for:
Bullish AMD Setup
Bearish AMD Setup
Liquidity Sweep Detected
MSS Confirmed
BOS Confirmed
PD Array Confirmed
Entry Triggered
TP1 Hit
TP2 Hit
TP3 Hit
Stop Loss Hit
Alert messages should include:
Symbol
Timeframe
Direction
Entry
Stop
Target
Technical Requirements
Pine Script Version 6.
Non-repainting.
Candle-close confirmation only.
Optimized for:
NQ
MNQ
ES
MES
Gold
Forex
Crypto
Stocks
Minimize chart clutter.
Include user customization settings.
Efficient code with minimal performance impact.
The indicator should focus on producing fewer but higher-quality signals rather than frequent signals.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.