PulseHub
OPEN-SOURCE SCRIPT

ATK/DEF HTF Analysis Combo

98
# ATK/DEF HTF Analysis Combo

ATK/DEF HTF Analysis Combo is a Higher Timeframe market environment analysis framework designed to observe the broader market structure from a use-selected timeframe.

Instead of focusing only on the active chart, this indicator uses a selected Higher Timeframe as the primary reference environment and organizes several independent market measurements into one structured dashboard.

The objective is to provide a clearer view of the **broader market direction, trend condition, momentum condition, and volatility environment** through a Higher Timeframe perspective.

The indicator is designed as an analytical observation framework rather than a conventional single-condition indicator.

## 📊 Higher Timeframe Market Environment

The core of this indicator is the use of a use-selected Higher Timeframe.

The selected timeframe becomes the reference environment for the dashboard.

For example, the user may select:

* 4 Hour
* Daily
* Weekly
* Other supported timeframes

The indicator retrieves market data from the selected timeframe and evaluates the corresponding market conditions.

This allows the active chart to be viewed in the contet of a broader market environment.

A smaller chart can contain many local price movements while the selected Higher Timeframe may still maintin a different overall structure.

The purpose of this framework is to make that broader structure visible in a compact analytical format.

# 🧭 Four-Dimensional HTF Observation

ATK/DEF HTF Analysis Combo separates the Higher Timeframe environment into four primary dimensions:

**Direction**

**Trend**

**Momentum**

**Volatility**

These dimensions are intentionally treated as independent analytical modules.

They do not represent the same characteristic of the market.

A market can have a clear directional position while momentum is neutral.

A market can have strong trend strength while volatility is relatively low.

A market can experience elevated volatility while directional structure remains mixed.

By keeping these measurements separated, the dashboard preserves more information about the current Higher Timeframe environment.

# 🎯 1. HTF Direction

The HTF Direction module evaluates the directional position of the selected Higher Timeframe.

The calculation examines the relationship between:

* HTF closing price
* EMA 8
* EMA 21
* EMA 50
* +DI
* -DI

The relationship between price and multiple EMA levels provides the primary structural classification.

The +DI and -DI relationship is then used as an additional directional component.

The module classifies the environment into several states:

* 📈 Strong Bull
* 📈 Bullish
* ↗️ Mixed Bull
* ➡️ Neutral
* ↘️ Mixed Bear
* 📉 Bearish
* 📉 Strong Bear

A Direction Score ranging from **-100 to +100** is also displayed.

The score provides a normalized representation of the directional classification used by the module.

The Direction module is not intended to represent the entire market by itself.

It describes the directional position of the selected Higher Timeframe environment.

# 📈 2. HTF Trend

The HTF Trend module examines the strength and orientation of the broader trend structure.

It uses:

* ADX
* +DI
* -DI

ADX is used to describe the strength of the prevailing directional structure, while +DI and -DI provide the directional component.

The module produces several classifications:

* 🔥 Strong Bull
* 🔥 Strong Bear
* ⚡ Bull Trend
* ⚡ Bear Trend
* 🌊 Weak Trend
* 🌀 Range

This creates a distinction between **directional position** and **trend strength**.

The Direction module asks where the market is positioned.

The Trend module asks how strongly the directional structure is expressed.

These two measurements can therefore display different conditions at the same time.

# ⚡ 3. HTF Momentum

The HTF Momentum module uses RSI to describe the current momentum condition of the selected Higher Timeframe.

The RSI range is divided into multiple states:

* 🚀 Strong Up
* ⬆️ Accelerating
* ↗️ Bullish
* ➡️ Neutral
* ↘️ Bearish
* ⬇️ Declining
* 💀 Strong Down

The purpose of this classification is to provide a more detailed view of momentum rather than reducing the entire momentum condition to a simple positive or negative value.

The module also generates a normalized Momentum Score between **-100 and +100**.

Momentum is kept independent from Direction and Trend because these characteristics can behave differently within the same market environment.

# 📊 4. HTF Volatility

The HTF Volatility module measures the relative movement environment of the selected Higher Timeframe using ATR.

The current ATR is compared with its 50-period average:

**ATR Ratio = Current ATR / Average ATR**

The result is classified into:

* 🔥 Extreme
* ⚠️ High
* 📊 Elevated
* 📊 Normal
* 😴 Low

Volatility is treated as a **non-directional measurement**.

A high volatility condition does not represent an upward or downward direction.

It describes the relative magnitude of market movement compared with its reference volatility.

This distinction allows the dashboard to separate market activity from market direction.

# 🏆 5. HTF Composite Environment

The final HTF score combines the independent Direction, Trend and Momentum scores.

The three directional components are averaged into a normalized composite value.

The Volatility condition can then modify the composite value when volatility reaches elevated levels.

The resulting score is constrained to a range between:

**-100 and +100**

The composite value is intended to provide a compact representation of the broader Higher Timeframe environment.

It does not replace the individual modules.

Instead, it provides another layer of information that can be compared with the separate Direction, Trend, Momentum and Volatility readings.

# 🔬 Independent Module Architecture

One of the main characteristics of ATK/DEF HTF Analysis Combo is its independent-module architecture.

Rather than forcing all market conditions into one calculation from the beginning, each component is evaluated separately.

### Direction

Describes the broader directional position.

### Trend

Describes the strength and orientation of the trend structure.

### Momentum

Describes the current momentum condition.

### Volatility

Describes the relative magnitude of market movement.

### Composite Environment

Provides a consolidated numerical representation of the directional modules.

This architecture allows different market characteristics to remain visible instead of hing them inside one simplified reading.

# 🌐 Broader Market Observation

The indicator is designed specifically around the idea of observing the market from a broader timeframe perspective.

The active chart represents the immediate chart environment.

The selected Higher Timeframe represents the broader reference environment.

The dashboard connects these two perspectives by displaying the selected HTF conditions directly on the active chart.

This makes it possible to examine how the current chart exists within a larger market structure.

The indicator therefore focuses on **environmental context rather than individual candle interpretation**.

# 📐 Why Higher Timeframe Data Is Used

Higher Timeframe data can provide a different structural perspective from the active chart.

For example, price movement that appears highly directional on a smaller chart may exist inside a much broader range when viewed from a larger timeframe.

Likewise, a period of relatively quiet movement on the ative chart may occur while the broader timeframe maintns a clearly defined directional structure.

The purpose of the HTF framework is to expose this broader context through a consistent set of measurements.

# 🧩 Multiple Conditions Can Coexist

The dashboard does not require every module to produce the same classification.

Different combinations are possible.

For example:

**Bullish Direction + Weak Trend + Neutral Momentum + Low Volatility**

or:

**Mixed Direction + Strong Trend + Strong Momentum + High Volatility**

or:

**Neutral Direction + Range + Neutral Momentum + Normal Volatility**

These combinations represent different market environments.

The dashboard preserves these differences instead of reducing every situation to one basic directional label.

# 📊 Scoring System

Direction, Trend and Momentum use normalized scores to represent their respective classifications.

Directional scores use a range from **-100 to +100**.

The Volatility module uses a separate non-directional scale because volatility does not inherently describe upward or downward movement.

The Composite HTF Score is normalized to remain within **-100 to +100**.

The scores are mathematical representations of the conditions defined in the script.

They should be interpreted as descriptive measurements of the selected Higher Timeframe environment.

# ⚙️ User-Defined Timeframe Configuration

The Higher Timeframe reference is **user-configurable**.

Users are expected to select and configure the timeframe that they want the dashboard to analyze.

The indicator does not assume that one particular timeframe is appropriate for every chart or every market.

Changing the HTF Resolution changes the reference environment used by the dashboard.

This is an important part of the design because the indicator is intended to allow the user to determine which broader market context should be observed.

The selected timeframe should therefore be considered part of the user's analytical configuration.

# 🖥️ Dashboard

The dashboard provides a compact display of the five main analytical sections:

### 🎯 HTF Direction

Directional classification and normalized Direction Score.

### 📈 HTF Trend

Trend classification and ADX measurement.

### ⚡ HTF Momentum

Momentum classification and RSI measurement.

### 📊 HTF Volatility

Volatility classification and ATR Ratio.

### 🏆 HTF Final Environment

Composite Higher Timeframe score and overall environmental classification.

The selected HTF resolution is also displayed in the dashboard header.

The table can be positioned on either side of the chart according to the user's preference.

# 📏 Technical Components

The indicator uses established market-data calculations including:

* EMA 8
* EMA 21
* EMA 50
* RSI 14
* ADX 14
* +DI
* -DI
* ATR 14
* 50-period average ATR

These components are processed independently before being combined into the Higher Timeframe dashboard.

The purpose of the framework is not to introduce a single new mathematical measurement, but to organize several market characteristics into a unified Higher Timeframe observation structure.

# 🧠 Analytical Concept

ATK/DEF HTF Analysis Combo approaches market observation from a broader environmental perspective.

Instead of asking only whether price is moving upward or downward, the framework separates the market into several observable characteristics:

**Where is the market positioned?**

**How strong is the directional structure?**

**What is the current momentum condition?**

**How active is the market environment?**

**How do these independent conditions relate to one another?**

This creates a multi-dimensional representation of the selected Higher Timeframe environment.

---

# ⚠️ Important Information

ATK/DEF HTF Analysis Combo is an analytical and visualization tool based on market data and mattical calculations.

The classifications and scores are generated from the relationships defined in the scrt between price, EMA, DMI, ADX, RSI and ATR.

The displayed values represent the calculated state of the selected Higher Timeframe environment at the time of observation.

They are not intended to represent certainty, probability, guarantees, or future market outcomes.

The indicator does not provide finl advice, tre instructions, or recommendations, or capital-management guidance.

The purpose of this script is to provide a structured framework for observing the broader market environment through use-selected Higher Timeframe data.

User are responsible for selecting and configuring the timeframe parameters appropriate to their own analytical requirements.

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 PulseWire. Read more in the Terms of Use.