OPEN-SOURCE SCRIPT
ATK/DEF CANDLE ACTION + LIQUIDITY ACTION

Overview
ATK/DEF Candle Action + Liquidity Action is a price action analysis framework designed to study market behavior through a combination of candlestick analysis, momentum measurement, liquidity interaction, and market structure observation.
The framework is based on the ATK/DEF concept, which represents the changing balance between directional price pressure and defensive market reactions.
* **ATK (Attack)** represents periods where directional momentum expands and price pressure becomes more dominant.
* **DEF (Defense)** represents periods where price pressure weakens, liquidity is tested, or market balance develops.
This indicator does not attempt to predict future price movement. Instead, it provides a structured visualization of current market conditions and historical price behavior.
---
# Core Components
## 1. Momentum Strength Framework
The indicator combines two momentum-based measurements into a normalized 0–100 strength score.
### CHO Momentum Component
The CHO component evaluates the relationship between short-term and longer-term price momentum.
The calculation compares:
* Fast momentum change
* Slow momentum change
This helps visualize whether recent price movement is accelerating or losing strength.
### Momentum Component
The Momentum component measures the rate of price change over a selected period.
The raw momentum value is normalized using historical values to create a consistent interpretation range.
### Composite Score
The final score combines:
* CHO Component: 60%
* Momentum Component: 40%
The score provides a visual representation of relative market pressure.
Higher values indicate stronger upward price pressure.
Lower values indicate stronger downward price pressure.
Middle values indicate a more balanced market condition.
---
# 2. Market State Classification
The State system converts the composite score into different market conditions:
### Strong
Higher momentum expansion and stronger directional pressure.
### Up
Positive momentum conditions with upward pressure.
### Range
Balanced conditions where neither side shows clear dominance.
### Down
Negative momentum conditions with downward pressure.
### Crash
Strong downside pressure and aggressive selling conditions.
The State classification is designed to help users quickly understand the current price environment.
---
# 3. Trend Context Framework
The Trend system evaluates the relationship between momentum conditions and market structure.
It identifies whether the market environment is:
* Bullish
* Bearish
* Neutral
* Range-bound
Range detection considers factors such as:
* Price channel width
* Volatility conditions
* Momentum balance
This allows users to distinguish directional movement from consolidation phases.
---
# 4. Liquidity Action System
The Liquidity Action module focuses on how price interacts with important high and low reference areas.
Liquidity levels are calculated using recent price extremes and displayed as visual reference zones.
The system identifies:
### Liquidity Sweep Up
Price moves above a previous high area but closes back below the level.
This represents a failed upward expansion and highlights a potential liquidity reaction area.
### Liquidity Sweep Down
Price moves below a previous low area but closes back above the level.
This represents a failed downward expansion and highlights a potential liquidity reaction area.
### High Activity Candles
The system also identifies candles with:
* Above-average volume
* Larger-than-normal price range
These candles highlight periods of increased market participation.
---
# 5. Candlestick Action Framework
The indicator analyzes multiple candlestick structures, including:
* Bullish Engulfing
* Bearish Engulfing
* Hammer
* Shooting Star
* Inside Bar
* Pin Bar
* Morning Star
* Evening Star
* Large Body Candles
* Doji
Each pattern is assigned a predefined classification level for visual interpretation.
The classification is designed to help users compare different candle behaviors and their relationship with current market conditions.
---
# Visual Elements
The indicator displays:
* Market strength score
* State classification
* Trend context
* Liquidity levels
* Liquidity interaction labels
* Candlestick pattern markers
* Market condition information panel
All visual elements are designed for analytical observation.
---
# Analytical Workflow
A suggested analysis process:
### 1. Observe Market State
Identify whether current price pressure is expanding, weakening, or balanced.
### 2. Evaluate Trend Context
Compare momentum conditions with broader market structure.
### 3. Observe Liquidity Interaction
Study how price reacts around important high and low areas.
### 4. Analyze Candlestick Behavior
Use candle patterns as additional information about price reactions.
### 5. Compare Multiple Timeframes
Higher timeframes provide broader context, while lower timeframes show shorter-term price behavior.
---
# Technical Concept
ATK/DEF is a visual framework created to describe the interaction between:
* Price momentum
* Candlestick behavior
* Liquidity reactions
* Market structure
The purpose is to transform complex price movement into a structured analytical view.
---
# Limitations
* The indicator is based on historical price data.
* Market conditions can change rapidly.
* No indicator can guarantee future market behavior.
* Users should evaluate information independently and combine it with their own analysis methods.
---
# Disclaimer
This indicator is provided for technical analysis and educational purposes only.
It does not constitute financial advice, investment advice, or trading recommendations.
The author does not guarantee the accuracy or completeness of calculations or interpretations.
All decisions made using this tool remain the responsibility of the user.
ATK/DEF Candle Action + Liquidity Action is a price action analysis framework designed to study market behavior through a combination of candlestick analysis, momentum measurement, liquidity interaction, and market structure observation.
The framework is based on the ATK/DEF concept, which represents the changing balance between directional price pressure and defensive market reactions.
* **ATK (Attack)** represents periods where directional momentum expands and price pressure becomes more dominant.
* **DEF (Defense)** represents periods where price pressure weakens, liquidity is tested, or market balance develops.
This indicator does not attempt to predict future price movement. Instead, it provides a structured visualization of current market conditions and historical price behavior.
---
# Core Components
## 1. Momentum Strength Framework
The indicator combines two momentum-based measurements into a normalized 0–100 strength score.
### CHO Momentum Component
The CHO component evaluates the relationship between short-term and longer-term price momentum.
The calculation compares:
* Fast momentum change
* Slow momentum change
This helps visualize whether recent price movement is accelerating or losing strength.
### Momentum Component
The Momentum component measures the rate of price change over a selected period.
The raw momentum value is normalized using historical values to create a consistent interpretation range.
### Composite Score
The final score combines:
* CHO Component: 60%
* Momentum Component: 40%
The score provides a visual representation of relative market pressure.
Higher values indicate stronger upward price pressure.
Lower values indicate stronger downward price pressure.
Middle values indicate a more balanced market condition.
---
# 2. Market State Classification
The State system converts the composite score into different market conditions:
### Strong
Higher momentum expansion and stronger directional pressure.
### Up
Positive momentum conditions with upward pressure.
### Range
Balanced conditions where neither side shows clear dominance.
### Down
Negative momentum conditions with downward pressure.
### Crash
Strong downside pressure and aggressive selling conditions.
The State classification is designed to help users quickly understand the current price environment.
---
# 3. Trend Context Framework
The Trend system evaluates the relationship between momentum conditions and market structure.
It identifies whether the market environment is:
* Bullish
* Bearish
* Neutral
* Range-bound
Range detection considers factors such as:
* Price channel width
* Volatility conditions
* Momentum balance
This allows users to distinguish directional movement from consolidation phases.
---
# 4. Liquidity Action System
The Liquidity Action module focuses on how price interacts with important high and low reference areas.
Liquidity levels are calculated using recent price extremes and displayed as visual reference zones.
The system identifies:
### Liquidity Sweep Up
Price moves above a previous high area but closes back below the level.
This represents a failed upward expansion and highlights a potential liquidity reaction area.
### Liquidity Sweep Down
Price moves below a previous low area but closes back above the level.
This represents a failed downward expansion and highlights a potential liquidity reaction area.
### High Activity Candles
The system also identifies candles with:
* Above-average volume
* Larger-than-normal price range
These candles highlight periods of increased market participation.
---
# 5. Candlestick Action Framework
The indicator analyzes multiple candlestick structures, including:
* Bullish Engulfing
* Bearish Engulfing
* Hammer
* Shooting Star
* Inside Bar
* Pin Bar
* Morning Star
* Evening Star
* Large Body Candles
* Doji
Each pattern is assigned a predefined classification level for visual interpretation.
The classification is designed to help users compare different candle behaviors and their relationship with current market conditions.
---
# Visual Elements
The indicator displays:
* Market strength score
* State classification
* Trend context
* Liquidity levels
* Liquidity interaction labels
* Candlestick pattern markers
* Market condition information panel
All visual elements are designed for analytical observation.
---
# Analytical Workflow
A suggested analysis process:
### 1. Observe Market State
Identify whether current price pressure is expanding, weakening, or balanced.
### 2. Evaluate Trend Context
Compare momentum conditions with broader market structure.
### 3. Observe Liquidity Interaction
Study how price reacts around important high and low areas.
### 4. Analyze Candlestick Behavior
Use candle patterns as additional information about price reactions.
### 5. Compare Multiple Timeframes
Higher timeframes provide broader context, while lower timeframes show shorter-term price behavior.
---
# Technical Concept
ATK/DEF is a visual framework created to describe the interaction between:
* Price momentum
* Candlestick behavior
* Liquidity reactions
* Market structure
The purpose is to transform complex price movement into a structured analytical view.
---
# Limitations
* The indicator is based on historical price data.
* Market conditions can change rapidly.
* No indicator can guarantee future market behavior.
* Users should evaluate information independently and combine it with their own analysis methods.
---
# Disclaimer
This indicator is provided for technical analysis and educational purposes only.
It does not constitute financial advice, investment advice, or trading recommendations.
The author does not guarantee the accuracy or completeness of calculations or interpretations.
All decisions made using this tool remain the responsibility of the user.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。