OPEN-SOURCE SCRIPT

ATK/DEF The Session Volume For Fair Value Gap

221
ATK/DEF — The Session Volume For Fair Value Gap is a quantitative market observation framework combining **Fair Value Gap (FVG), formation volume, and session volume**.

The framework organizes FVG formation and session activity into a unified view, allowing the displayed data to represent how price gaps and volume conditions are distributed across different sessions.

## Core Framework

**FVG + Formation Volume + Session Volume**

The system combines three primary components:

* Fair Value Gap structure
* Volume associated with FVG formation
* Session-based volume measurement

FVGs are detected using a three-bar price structure:

* Bullish FVG: `Low > High[2]`
* Bearish FVG: `High < Low[2]`

The minimum gap size can be adjusted through the FVG gap filter.

## FVG Formation Volume

Each detected FVG is associated with the combined volume of the three bars used to define the gap:

**FVG Formation Volume = Volume + Volume[1] + Volume[2]**

This value is displayed together with the corresponding FVG, providing a quantitative volume reference for the formation of the price gap.

The FVG itself represents a defined price gap structure. The associated formation volume provides an additional quantitative dimension for observing the conditions surrounding that gap.

Therefore, an FVG alone represents the existence of a price gap; the accompanying volume measurement adds another observable factor to the same formation.

## Session Volume

The framework separates volume into three session environments:

* Asia
* Europe
* US

For each session, the system records:

* Session volume
* Session open
* Session close
* Session volume magnitude
* Session-based price direction

Session volume is accumulated independently and represented after each session completes.

The session volume display provides a direct comparison of volume magnitude across the defined sessions within the current daily cycle.

## Session-Based FVG

Each FVG is assigned to the session of the middle bar used in its three-bar formation structure.

This allows every displayed FVG to retain its corresponding session context:

**Asia → Europe → US**

The FVG visualization therefore combines:

**Price Gap + Formation Volume + Session Context**

rather than treating every FVG as an isolated price structure.

## FVG Lifecycle

Detected FVGs remain visible according to the configured extension settings.

The framework can remove an FVG when price reaches the defined fill condition:

* Bullish FVG: price reaches the lower boundary
* Bearish FVG: price reaches the upper boundary

This provides a defined structural lifecycle for the displayed FVG regions.

## Quantitative Observation

The dashboard-free visual framework focuses on the relationship between:

**Session → Volume → FVG → Price Gap**

Session volume represents the measured volume accumulated during each defined session, while FVG formation volume represents the volume associated with the three-bar structure that creates the gap.

These measurements are displayed as quantitative observations rather than predefined market conclusions.

All classifications and visual elements are generated from the calculations and conditions defined within the script.

## Scope

This indicator is designed for **market observation and user-defined analysis only**.

The displayed FVG, formation volume, and session volume values are quantitative observations derived from price and volume data available to the script.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.