Split ATRSplit ATR cuts every bar at two ATR envelopes — one around the open, one around the close — and draws the result as stacked candles. Hue is the bar’s volume change; lightness is whether each slice closed up or down; chroma is how surprising that slice is relative to those envelopes.
A sibling of Split VWAP. Same overdraw, same volume-hue coloring. The cut is different. Chroma is the new channel.
The cut
ATR is read from a lower timeframe so one chart bar contains several sub-bars. Auto is one-fifth of the chart: 1 minute on a 5-minute chart, 3 minutes on a 15-minute chart. The ATR length is a chart-bar window, scaled onto that subseries, so 14 on a 5-minute chart is 70 one-minute bars — the same span of time as ATR(14) on the chart.
Two values come off that series:
Open ATR — ATR on the first sub-bar of this chart bar
Close ATR — ATR on the last sub-bar of this chart bar
Those make two intervals, then the four endpoints are sorted in price order:
Open ± Open ATR
Close ± Close ATR
The four prices make five bands. A cut past the bar clamps onto the near extreme and collapses the empty band. A bar with no ATR yet is drawn whole and colored as the unsurprising core.
On the bar still forming, the first and last sub-bar start as the same bar, so open ATR equals close ATR until a second sub-bar appears. Open ATR then freezes; close ATR keeps updating.
What the slices mean
Each band is a slice of the bar. Membership of the slice midpoint decides how surprising it is:
In both envelopes — consensus core. Within typical reach of where the bar began and where it ended. Surprise 0.
Open only — departed. The bar left this zone behind. Surprise 0.5.
Close only — arrived. The bar moved into this zone. Surprise 0.5.
In neither, between them — the gap. Only exists when the two intervals are disjoint. Surprise 1.
In neither, outside both — excursion. Wick territory neither envelope accounts for. Surprise 1.
Color
Hue is the whole bar’s volume change. Red when volume fell, green when it held, blue when it rose. Every slice of the bar shares that hue. A symbol with no volume (an index) still splits; hue sits on the unchanged-volume green, and surprise and price lightness still color the slices.
Chroma is ATR surprise. The core is washed toward gray (Unsurprising chroma, default 0.25). Gap and excursion keep the full chroma. Departed and arrived sit halfway.
Lightness is closed-up / closed-down: each slice against the previous bar’s same-index close. An up close is the anchor color; a down (or unchanged) close is the same hue a step darker.
Up bodies are hollow. Wick and border stay opaque so the overdraw still hides the dash under a hollow middle.
The script draws in front of the chart’s own bars and covers them, so you do not need to hide the symbol by hand. Open ATR and Close ATR are what the status line and Data Window report.
Settings
Lower timeframe — Auto (1/5 of chart), or Custom. Must be shorter than the chart.
ATR length — chart-bar window (default 14). Scaled onto the lower timeframe.
ATR multiplier — scales both ATR values before the cuts are placed.
Unsurprising chroma — how much color the consensus core keeps.
Price down darkening — how much darker a down slice is than an up slice.
Volume-hue anchors — falling / unchanged / rising volume.
Built around a 5-minute chart with Auto (or Custom 1). Color conversions use the OKLCh library. Indicateur

NDOG - ICTNDOG Override Companion
The **NDOG Override Companion** is a session-based New Day Opening Gap indicator designed to identify, track, and manage the directional implications of the most recent New York evening opening gap.
The indicator calculates the New Day Opening Gap using a fixed New York session definition:
* **Prior-session reference:** Close of the 16:30 New York 30-minute candle
* **New-session reference:** Open of the 18:00 New York 30-minute candle
The price difference between these two reference points forms the NDOG.
Directional Logic
The indicator classifies each qualifying NDOG as either a gap up or gap down and can use that structure as a temporary directional override.
**Gap Up**
When the 18:00 open is above the prior 16:30 close, the indicator classifies the NDOG as a gap up.
While this gap remains unfilled, the directional state is:
**Bearish Override — Short Only**
The bearish override remains active until price reaches the lower boundary of the NDOG and completely fills the gap.
**Gap Down**
When the 18:00 open is below the prior 16:30 close, the indicator classifies the NDOG as a gap down.
While this gap remains unfilled, the directional state is:
**Bullish Override — Long Only**
The bullish override remains active until price reaches the upper boundary of the NDOG and completely fills the gap.
A partial retracement into the NDOG does not remove the override. The directional state remains locked until the opposite boundary is reached and the gap is fully filled.
Once the NDOG is completely filled, the override terminates and the indicator returns to its normal HTF Bias state.
### NDOG Structure
For every qualifying New Day Opening Gap, the indicator calculates and tracks:
* Top boundary
* Midpoint
* Bottom boundary
* Gap direction
* Formation time
* Fill status
* Fill time
A configurable minimum gap size can also be applied to prevent insignificant price differences from being classified as valid NDOGs.
### Current NDOG Visualization
The active session NDOG can be displayed directly on the chart using:
* Shaded NDOG range
* Top boundary
* Bottom boundary
* Dashed midpoint
* Dynamic price labels
Visual elements can be individually enabled, disabled, and customized through the indicator settings.
The current NDOG extends forward while it remains active, allowing the trader to continuously monitor the relationship between price and the opening gap.
### Historical NDOGs
An optional historical mode allows previous New Day Opening Gaps to remain visible for contextual analysis.
Available historical lookback periods include:
* 30 days
* 60 days
* 90 days
* 180 days
* 240 days
Historical NDOGs maintain their original boundaries and midpoint.
When a historical gap becomes fully filled, its visual structure terminates at the bar where the fill occurred. Unfilled historical gaps continue extending forward.
This allows traders to distinguish unresolved opening gaps from structures that have already completed their lifecycle.
### NDOG Status Table
The indicator includes an optional real-time status table displaying the current NDOG state.
The table reports:
* Session Open
* Gap Direction
* Bias Override
* Directional Permission
* Top / Mid / Bottom prices
* Fill Status
* Normal HTF Bias status
Depending on the current gap condition, the directional permission can display:
**SHORT ONLY**
**LONG ONLY**
or
**DEFER TO HTF BIAS**
The table position, text size, colors, and visibility can be configured from the settings menu.
### Alerts
The indicator provides alert functionality for important NDOG events, including:
* New NDOG formation
* Top boundary reached
* Midpoint reached
* Bottom boundary reached
* Full gap fill
* Directional override change
Detailed dynamic alert messages can also report information such as the gap direction, reference prices, NDOG boundaries, session time, and current override state.
Individual alert categories can be enabled or disabled independently.
### Timeframe Handling
The NDOG reference prices are calculated internally from 30-minute data regardless of the chart timeframe.
This allows the indicator to maintain the same New York session reference structure while being viewed across different chart timeframes.
### Bias Override Output
For compatibility with additional analytical systems, the indicator internally represents its directional override as:
* **-1 = Bearish Override**
* **+1 = Bullish Override**
* **0 = Normal HTF Bias**
This output is hidden from the chart and is intended to support integration with broader analytical frameworks.
### Intended Use
The NDOG Override Companion is designed as a contextual and directional framework rather than a standalone entry system.
Its primary purpose is to determine whether an active New Day Opening Gap should temporarily supersede the normal higher-timeframe directional framework until that opening imbalance has been completely filled.
The indicator can therefore be used alongside higher-timeframe structure, price-delivery models, execution models, and other forms of discretionary or systematic market analysis.
### Important
This indicator is an analytical tool. It does not guarantee future market direction or profitability. Users should independently evaluate the methodology and incorporate appropriate execution and risk-management rules before using the information for trading decisions.
Indicateur

CVD Footprint ExporterProposed public title: Footprint CSV Exporter for CVD Research
Saved Pine script: CVD Footprint Exporter
Suggested publication settings: Public, Open-source
Status: Draft only. Not published.
DESCRIPTION
This utility exposes TradingView footprint data as Data Window plots that can be included in the native Download chart data CSV export. It is intended for people building candle-by-candle datasets for volume delta and cumulative volume delta research.
The script follows the current chart symbol and timeframe. It exports candle buy volume, sell volume, delta, total footprint volume, Point of Control price bounds and buy/sell volume, value-area boundaries, footprint row count, row size, trading-day timestamp, and chart volume. It also exports detailed price rows in batches of 12.
HOW TO EXPORT
1. Add the indicator to your chart and choose the symbol and timeframe you want to study.
2. Set Ticks per row. Price-row size equals this setting multiplied by the symbol's minimum tick. The default is 30 ticks; on GC with a 0.1 tick, that is 3.0 price points. This is a fixed setting, not automatic ATR sizing.
3. Load the historical candles you need by navigating backward on the chart.
4. Leave First row index at 0 and use the chart layout menu's Download chart data option. UNIX timestamps make it straightforward to join multiple exports.
5. Check FP_row_count. If any candle has more than 12 rows, set First row index to 12 and export again, then 24, 36, and so on until all rows are covered. Keep the symbol, timeframe, history, and row-size settings unchanged between batches.
6. Join batches by candle timestamp. A batch's FP_r0 fields refer to the row at FP_row_offset, and FP_r11 refers to offset plus 11. Rows run from lowest to highest price. Each row's upper boundary is its exported lower boundary plus FP_row_size.
READING THE FIELDS
FP_available is 1 when TradingView returns a footprint, otherwise 0. Unavailable volumes are blank, not zero.
FP_delta is buy volume minus sell volume.
FP_POC_low and FP_POC_high describe a price range rather than a single exact price.
FP_VAH and FP_VAL describe the value-area boundaries. The script uses 70% value area and a 300% imbalance threshold.
The row imbalance code is 0 for neither, 1 for buy imbalance, 2 for sell imbalance, and 3 for both.
FP_chart_volume is included separately so source differences can be detected rather than concealed.
CUMULATIVE DELTA AND RESEARCH EXAMPLES
This version exports raw per-candle delta. It does not plot CVD or calculate a cumulative series inside Pine. To calculate CVD after export, sort by timestamp and take a running sum of FP_delta. Record the starting timestamp and reset rule, such as the first available footprint or each trading day. Missing footprint history must not be treated as zero delta.
Other calculations include red candles with positive delta, green candles with negative delta, imbalance counts, and the POC's position relative to the candle body.
LIMITATIONS
The script prepares exportable fields; it does not automatically download files or load unlimited history. TradingView account features and data availability determine access to footprint requests and CSV export. Footprint data may cover less history than ordinary OHLCV.
The price footprints visible on the chart are TradingView's native chart type, not graphics drawn by this indicator. The indicator's outputs appear in the Data Window and CSV.
Buy/sell values use TradingView's footprint classifications and are not an independent verification of exchange bid/ask trades. Live candles can change before closing.
A price row may overlap a candle's body and wick. The script does not split that row's volume into exact wick-only quantities.
This is a data collection utility with no entries, exits, alerts, or backtest results.
AUTHOR PREPARATION NOTE (not part of the public description)
Use a clean publication chart containing the exporter and only the visuals needed to demonstrate it. Exclude unrelated strategies, private indicators, trading/account information, and drawings. Explain that the native footprint chart provides the displayed footprint graphics. Verify the final screenshot and available public/open-source settings before submission.
Indicateur

Gamma PressureGamma Pressure is a composite oscillator that estimates directional buying/selling
pressure in equity-index instruments (ES/MES, NQ/MNQ, SPX, NDX, SPY, QQQ, RUT,
IWM) by blending six independent, purely price/volume/volatility-derived
signals into a single -100 to +100 reading.
**⚠️ Important — read this first:** Gamma Pressure does **not** use options
chain data, open interest, strike-level exposure, or any real dealer
positioning feed. It has no access to that data and makes no claim to. Every
input is ordinary OHLCV price/volume plus one standard, publicly-quoted
volatility index (VIX, VXN, or RVX depending on the chart's symbol) and the
US Dollar Index (DXY) — all pulled the same way any other indicator reads a
second symbol. "Pressure" here means *inferred* pressure from how price,
volume, and implied volatility are behaving, not a measurement of actual
options-dealer hedging flow. Treat it as a momentum/positioning-flavored
composite, not literal gamma exposure.
**How it's derived (in general terms)**
Six signals, each normalized to a -1..+1 range:
1. **Price momentum** — recent directional thrust, scaled by ATR so it reads
consistently across calm and volatile stretches.
2. **Volatility-index slope** — the rate of change in the symbol-appropriate
VIX-family index. Falling implied volatility is treated as a bullish
contribution (consistent with the common pattern of vol compressing as
markets grind higher), rising vol as bearish. This is the closest this
script gets to "options-flavored" input, and it's still just an index
level, not chain data.
3. **Volume flow** — session-cumulative volume, signed by whether each bar
closed above or below its open, with decay so recent bars dominate over
stale ones.
4. **Trend agreement** — two EMA lengths' slopes; when both agree in
direction and magnitude the reading strengthens, when they disagree it
pulls back toward neutral.
5. **Dollar Index pressure** — DXY's slope, sign-flipped, as a cross-asset
risk-on/risk-off cross-check.
6. **Candle conviction** — body-to-range ratio adjusted by relative volume,
i.e. how decisively the current bar closed, weighted by how much volume
backed it.
The six normalized signals are combined as a user-weighted average (every
weight is adjustable — nothing is hard-coded as "the right" calibration),
smoothed, and scaled to the final -100..+100 line. The main plot is a
histogram of the Pressure value; a second line plots its own slope (rate of
change), so you can see both the level and how fast it's building or fading
at a glance.
**Reading it**
- **Zero line** — the basic bias flip point. Above zero = net bullish
pressure by this composite's reckoning, below = net bearish.
- **±50** — a stronger, more sustained reading — most of the six components
are likely agreeing.
- **±80** — an extreme reading. Not an entry trigger by itself — treat it as
"pay attention," often either a continuation or an exhaustion point, and
confirm with your own structure/levels.
**Alerts included:** bullish/bearish zero-cross, strong bull/bear (±50
cross), and extreme bull/bear (beyond ±80).
**Symbol handling:** the script auto-detects which volatility index to
reference based on the chart's symbol (Nasdaq-family → VXN, S&P-family →
VIX, Russell-family → RVX), so it can be dropped on any of the supported
symbols without manual setup. It's built for liquid US equity-index
instruments specifically — the underlying logic (vol-index slope, DXY
cross-check) doesn't carry the same meaning on commodities, forex, or
single-name equities outside that set.
**Bottom line:** this is a transparent, fully-adjustable composite built from
public price, volume, and index data — not a real-time options-flow feed.
Use it as one more lens on directional pressure, not a substitute for actual
market structure or your own risk management.
Indicateur

1M IFVG Execution - V4.1 First Active# 1M IFVG Execution – V4.1 First Active
The **1M IFVG Execution – V4.1 First Active** indicator is a specialized one-minute execution framework designed to identify and maintain only the first valid active Inverse Fair Value Gap (IFVG) structure in each direction.
Rather than displaying every historical IFVG detected on the chart, the indicator operates as a directional state machine. It continuously monitors native one-minute Fair Value Gaps, detects their conversion into IFVGs, filters consecutive source-gap structures, and maintains only the currently actionable bullish and bearish first-active zones.
A bullish and bearish IFVG may exist simultaneously because both directional states are processed independently.
## Core IFVG Logic
The indicator begins with conventional three-candle Fair Value Gap structures.
A bullish source FVG is detected when:
`low > high `
If price subsequently produces a confirmed candle close below the lower boundary of that bullish FVG, the structure converts into a **bearish IFVG**.
A bearish source FVG is detected when:
`high < low `
If price subsequently produces a confirmed candle close above the upper boundary of that bearish FVG, the structure converts into a **bullish IFVG**.
The default minimum source-gap size is **0.75 points**, although this value can be configured in the indicator settings.
## First-Active State Machine
The primary purpose of V4.1 is not simply to identify IFVGs, but to determine which IFVG is currently structurally relevant.
Only the first qualifying active bullish IFVG and first qualifying active bearish IFVG are maintained.
Once an IFVG becomes active, additional conversions originating from older source FVGs in the same directional sequence are ignored. A replacement must originate from a genuinely new source-FVG sequence created after the currently active structure was established or reset.
This prevents second, third, or stale historical conversions from continuously replacing the primary execution structure.
## Consecutive FVG Structure Rules
Source FVGs are classified into runs according to whether they form on consecutive one-minute candles.
A single qualifying source FVG may become an IFVG immediately once its conversion condition is confirmed.
Exactly two consecutive same-direction FVGs are treated as one structural sequence. The indicator waits until both FVGs have converted before activating the IFVG.
When two members belong to the sequence, the FVG that converts last becomes the selected active structure. If both convert on the same candle, the first-created member is selected.
Sequences containing three or more consecutive same-direction source FVGs are rejected by the model.
This filtering mechanism is specifically intended to suppress congested multi-gap sequences and retain cleaner first-active structures.
## Active-Zone Invalidation
The active zone remains valid until price invalidates it by confirmed candle close.
A bullish IFVG is invalidated when a confirmed one-minute candle closes below its lower boundary.
A bearish IFVG is invalidated when a confirmed one-minute candle closes above its upper boundary.
Invalidating an active structure does not automatically erase newer source-FVG information that may already be developing. Those newer structures remain eligible to produce the next first-active IFVG.
## Boundary and Consequent Encroachment
Each active IFVG provides two principal execution references:
**Boundary**
For a bullish IFVG, the execution boundary is the upper edge of the zone.
For a bearish IFVG, the execution boundary is the lower edge of the zone.
**CE – Consequent Encroachment**
CE represents the midpoint of the active IFVG:
`CE = (Upper Boundary + Lower Boundary) / 2`
The indicator can display both Boundary and CE price labels directly on the active structure.
The CE level may additionally be displayed as a solid, dashed, or dotted horizontal line.
## First-Touch Monitoring
The indicator independently tracks the first subsequent interaction with both the Boundary and CE of the active IFVG.
Touch detection only begins after the IFVG has formed, preventing the conversion candle itself from being incorrectly registered as a retracement into the newly activated structure.
After the first qualifying touch occurs, the respective state is recorded so repeated interactions do not generate duplicate first-touch events.
## Session Architecture
The indicator uses New York time and separates internal structural tracking from visible execution hours.
Default internal state-tracking session:
**07:00–16:00 ET**
Default display and alert session:
**09:30–16:00 ET**
The earlier internal tracking window allows an IFVG created before the visible session—for example, shortly before 09:30—to remain active and carry into the display window if it has not been invalidated.
At the beginning of a new state-tracking session, the previous session's source structures and active states are reset.
## Chart Presentation
The indicator deliberately avoids maintaining a historical inventory of IFVG boxes.
At any moment, the model itself determines whether the chart should contain:
* no active IFVG,
* one active directional IFVG, or
* one bullish and one bearish IFVG simultaneously.
Active zones dynamically project forward while remaining valid.
Users can configure:
* Bullish and bearish IFVG colors
* Zone transparency
* Border transparency and width
* Forward projection distance
* Box anchoring
* CE visibility
* CE line color
* CE line width
* CE line style
* Boundary and CE price labels
* Price-label position
* Label size
* CE spacing around labels
* Zone text visibility
## Alert System
The indicator provides dedicated TradingView alert conditions for:
* New bullish first-active IFVG
* New bearish first-active IFVG
* New IFVG in either direction
* Bullish IFVG invalidation
* Bearish IFVG invalidation
* First bullish Boundary touch
* First bearish Boundary touch
* Boundary touch in either direction
* First bullish CE touch
* First bearish CE touch
* CE touch in either direction
Dynamic `alert()` messages can additionally report the instrument, active Boundary price, CE price, and invalidation level.
## Intended Use
This indicator is designed as an execution-structure tool rather than a conventional historical FVG plotting utility.
Its objective is to reduce chart congestion and isolate the first structurally relevant IFVG produced by a valid source-FVG sequence.
It is particularly suited to traders who want a deterministic framework for monitoring:
* first-active one-minute IFVG structures,
* directional retracement zones,
* Boundary interaction,
* Consequent Encroachment interaction,
* structural invalidation, and
* transition into genuinely new IFVG sequences.
## Important
The indicator is designed specifically for the **1-minute timeframe**. Its internal execution logic requires native one-minute candles and will not operate as intended when applied to another chart timeframe.
The indicator does not predict future price movement and does not independently constitute a trading system. It identifies and manages specific market structures according to the programmed IFVG rules. Risk management, directional context, execution methodology, and trade selection remain the responsibility of the user.
Indicateur

FVG / IFVG - ICT - 1H + 4H + DailyDaily + 4H + 1H FVG / IFVG — Merged
This indicator provides a unified multi-timeframe inventory of Fair Value Gaps (FVGs) and Inverse Fair Value Gaps (IFVGs) from the Daily, 4-Hour, and 1-Hour source timeframes.
The purpose of the script is to make higher-timeframe imbalance structure directly visible on supported lower-timeframe charts while preserving the calculation and lifecycle logic of each source timeframe independently.
WHAT THE INDICATOR IDENTIFIES
The indicator uses strict three-candle FVG geometry.
Bullish FVG:
The low of the third source-timeframe candle must be above the high of the first source-timeframe candle.
The resulting zone extends from the first candle's high to the third candle's low.
Bearish FVG:
The high of the third source-timeframe candle must be below the low of the first source-timeframe candle.
The resulting zone extends from the third candle's high to the first candle's low.
Adjacent candle close/open gaps are not used in the calculation. The script evaluates the first-versus-third-candle price geometry directly.
SUPPORTED SOURCE TIMEFRAMES
The merged indicator contains three independent engines:
• Daily FVG / IFVG inventory
• 4H FVG / IFVG inventory
• 1H FVG / IFVG inventory
The Daily engine can be displayed on intraday and Daily charts.
The 4H engine operates on 4H and lower intraday charts.
The 1H engine operates on 1H and lower intraday charts.
Higher-timeframe calculations are based on confirmed source-timeframe information. On lower chart timeframes, previously completed higher-timeframe candles are used so that an unfinished higher-timeframe candle is not treated as a confirmed close.
CONFIRMED FVG → IFVG LIFECYCLE
The default lifecycle system does not convert an FVG immediately after a single opposing close.
For the Daily, 4H, and 1H engines, an original FVG becomes an opposite-direction IFVG only after two consecutive confirmed source-timeframe closes beyond the relevant FVG boundary.
Example:
A bullish FVG becomes a bearish IFVG after two consecutive confirmed source-timeframe closes below its lower boundary.
A bearish FVG becomes a bullish IFVG after two consecutive confirmed source-timeframe closes above its upper boundary.
This confirmation mechanism is intended to distinguish a temporary boundary violation from a confirmed structural inversion.
IFVG INVALIDATION
The indicator also manages the lifecycle of an IFVG after conversion.
For 4H zones, the number of consecutive reverse closes required for IFVG invalidation can be selected from 1 through 5.
For 1H zones, bullish and bearish IFVG invalidation thresholds can be configured independently, and confirmed IFVG invalidation can also be disabled.
The Daily confirmed-lifecycle model removes an IFVG after a confirmed Daily close through its opposite invalidation boundary.
PERSISTENT CURRENT-PRICE MODE
Each timeframe also provides an alternative persistent classification model.
When confirmed lifecycle mode is disabled, the original FVG remains in the inventory for the selected lookback period and is classified according to the current market-price relationship to the original zone.
In this mode:
• Price on the original/native side of the zone = original FVG classification
• Price beyond the opposite side = opposite-direction IFVG classification
• Price inside the zone = the most recently resolved classification remains active
This allows users to study the same original imbalance as its relationship with price evolves.
4H CONSECUTIVE-ZONE FILTERING
The 4H engine includes additional filtering for consecutive FVG and IFVG sequences.
When two or more same-direction FVGs occur on consecutive 4H source candles, the user can select which ordinal zone in the sequence is displayed:
1st, 2nd, 3rd, 4th, or 5th.
The same concept is available for consecutive 4H IFVG conversions.
Single isolated zones remain eligible for display.
This feature is designed for users who want to isolate a specific position within a sequence of higher-timeframe imbalances instead of displaying every zone in a cluster.
LOOKBACK AND INVENTORY CONTROL
Each timeframe has an independent calendar-day formation lookback.
Available selections are:
5, 10, 15, 30, 90, 180, or 365 calendar days.
Zones whose original formation falls outside the selected lookback are removed from that timeframe's active inventory.
MINIMUM FVG SIZE
Each source timeframe has an independent minimum FVG-size filter.
This allows the user to exclude gaps below a specified point size while retaining the same underlying three-candle detection logic.
MASTER VISIBILITY CONTROLS
The indicator includes a quick-control section for managing the entire chart without changing the underlying detection logic.
Users can globally enable or disable:
• All bullish zones
• All bearish zones
Each source timeframe also has independent controls for:
• Daily
• 4H
• 1H
• Bullish structures
• Bearish structures
Additional individual controls are available for bullish FVGs, bearish FVGs, bullish IFVGs, and bearish IFVGs.
These master switches control plotting and alert routing only. They do not modify the underlying source-timeframe calculations or zone lifecycle.
DYNAMIC ZONE PROJECTION
Visible zones extend dynamically to the opening timestamp of the current chart candle.
Users can also choose where the historical left edge of a zone begins:
• First FVG candle
• FVG end candle
The price boundaries themselves remain derived from the original FVG geometry.
ALERTS
The indicator includes alert conditions for both structure creation/classification and first interaction with visible zones.
Alerts are available for:
• Bullish FVG formation
• Bearish FVG formation
• Bullish IFVG classification
• Bearish IFVG classification
• Bullish FVG first retest
• Bearish FVG first retest
• Bullish IFVG first retest
• Bearish IFVG first retest
These alerts are implemented independently for the Daily, 4H, and 1H engines and respect the corresponding visibility and directional controls.
VISUAL CUSTOMIZATION
Each timeframe includes configurable visual parameters, including:
• Bullish zone color
• Bearish zone color
• FVG transparency
• IFVG transparency
• Border transparency
• Border width
• Zone text visibility
• Zone text color
FVG and IFVG states use distinct border styling to make their current classification easier to distinguish visually.
INTENDED USE
This indicator is intended as a market-structure and imbalance-mapping tool.
It can be used to:
• Monitor higher-timeframe FVGs while executing on lower timeframes
• Distinguish original FVGs from structurally inverted IFVGs
• Track confirmed higher-timeframe state changes
• Identify the first return of price to an active higher-timeframe zone
• Reduce chart clutter through directional, timeframe, size, lifecycle, and consecutive-zone filtering
The indicator does not generate an autonomous trading strategy, position sizing, entries, stop losses, profit targets, or performance projections.
FVG and IFVG zones should therefore be treated as structural market information rather than standalone trade recommendations.
IMPORTANT
Users should understand the distinction between Confirmed Lifecycle mode and Persistent Current-Price mode before using the indicator.
Confirmed Lifecycle mode requires completed source-timeframe closes to change structural state.
Persistent Current-Price mode intentionally allows classification to follow the current market-price relationship to the original gap and therefore represents a different analytical methodology.
The two modes should not be interpreted as producing identical historical or real-time behavior.
This script is intended for technical analysis and research purposes only and does not constitute financial advice.
Indicateur

Advanced Physics Trading System + Analytics Suite Advanced Physics Trading System + Analytics Suite
A Multi-Dimensional Market State Analyzer
Overview
The Advanced Physics Trading System (APTS) is a comprehensive market-state analyzer that applies classical physics principles to price action — velocity, acceleration, force, kinetic and potential energy, mass, temperature, and Shannon entropy. Combined with a full analytics suite (geometry, time symmetry, regime persistence, and situational awareness), it delivers a multi-dimensional view of what the market is actually doing — not just where price is.
Unlike single-indicator tools that fire signals from one rule set, APTS treats the market as a physical system with measurable properties. It reads momentum, exhaustion, coil formation, and regime shifts across five independent dimensions, then ranks the current setup with a single composite score.
Core Concept
The market is a system in motion. Price moves because of force — mass (volume) applied to acceleration (change in velocity). When force fades, energy dissipates and the market coils. When force surges, energy releases and trends accelerate.
APTS formalizes this intuition with eight physics dimensions:
Dimension Physical Meaning Market Interpretation
Velocity Rate of price change (ATR-normalized) Direction and speed of the move
Acceleration Change in velocity Momentum building or fading
Force Mass × Acceleration Real directional pressure
Mass Volume vs. average Conviction behind the move
Kinetic Energy ½ × mass × velocity² Magnitude of motion
Potential Energy Spring-tension from mean Distance from equilibrium
Temperature Smoothed absolute velocity Volatility regime
Entropy Shannon entropy of volume-work Order vs. chaos regime
These feed a five-dimension agreement matrix: velocity, acceleration, force, entropy (order), and volume-work each classify as bullish, bearish, or neutral. The result — netAgreement from −5 to +5 — is the single most diagnostic output of the system.
Timeframe Presets
The system ships with six presets covering every trading style:
Preset Best For Lookback Threshold Behavior
Scalp (5m) 1m–5m scalping 20 Tight filters, high energy threshold
Intraday (15m) 15m intraday 18 Balanced
Swing (1H) 30m–1H swing 14 Default
Swing (4H) 2H–4H swing 14 Wider, cleaner signals
Position (D) Daily position 12 Slowest, highest conviction
Manual Custom tuning user Full override
Auto mode reads the chart timeframe and picks the matching preset automatically — no re-tuning when you switch timeframes.
What the System Produces
1. The Physics Dashboard
A live 13-row panel showing every physics dimension in real time:
Velocity, Acceleration, Force, Volume Work
Entropy, Impulse, Kinetic Energy, Potential Energy
Total Energy, Temperature
Current signal (BUY / SELL / NEUTRAL)
Active preset
Each value is color-coded by direction and magnitude — green for bullish, red for bearish, with intensity reflecting strength.
2. Dimension Agreement Matrix
A 5×2 grid showing each dimension's state:
Bull Agreement — how many of 5 dimensions are bullish (0–5)
Bear Agreement — how many are bearish (0–5)
Net Agreement — bull minus bear, from −5 to +5
When all 5 agree, you have a Full Agreement — the highest-conviction setup the system produces.
3. Physics Geometry
Tracks the size and duration of physics regime flips:
Average height % per flip
Average bars per flip
Efficiency (% move per bar)
Distance to rolling high/low
4. Time Symmetry
Measures whether up-phases last longer than down-phases:
Symmetry ratio > 1.2 — bullish time bias (up moves take longer)
Symmetry ratio < 0.8 — bearish time bias
Between — balanced
5. Regime Persistence
Tracks how stable the current regime is:
Entropy slope — is chaos rising (regime breaking) or falling (stabilizing)?
Compression streak — consecutive quiet flips (coil loading)
Expansion streak — consecutive big flips (breakout action)
Coil status — active or idle
Phase state — velocity and acceleration in agreement or diverging?
6. Situation Table
A single-glance summary with:
Current situation — one of 14 states (Full Agreement, Spring Release, Confirmed Breakout, Exhaustion Top, Coil Formation, Chaotic Regime, etc.)
Plain-English suggestion — actionable context for the setup
Composite score, rank score, agreement count, time symmetry
Physics-Specific Signals
APTS produces signals that don't exist in price-action or momentum-only systems:
Signal Meaning
Coil Formation Kinetic low, potential high — spring loading for a move
Spring Release Coil broke with a force impulse — momentum entry
Exhaustion Top Velocity positive, acceleration negative — momentum fading
Exhaustion Bottom Velocity negative, acceleration positive — reversal forming
Full Agreement All 5 dimensions align — highest conviction
Physics Disagreement Dimensions conflict — reduce size, wait
Phase Transition Velocity and acceleration diverge in sign
Entropy Shift Regime crossed orderly/chaotic boundary
Plus breakout and continuation flags:
Ready Breakout Up / Down
Confirmed Breakout / Breakdown
Continuation Up / Down
Trending Bull / Bear
Scanner Integration
APTS is scanner-ready for TradingView's Pine Screener. It exposes:
10 numeric metrics:
Physics Entropy, Agreement, Geometry %, Time Symmetry
Composite, Rank Score, Compression Streak, Expansion Streak
% To High, % To Low
4 grouped flag outputs (bit-packed for efficiency):
Group 1: Bullish Setups
Group 2: Bearish Setups
Group 3: Warnings / Exhaustion
Group 4: Coil / Regime
Filter on any combination to build custom scans across your watchlist.
Example Scan Recipes
Highest-Conviction Long
text
Flag: Full Agreement = 1
Physics Agreement >= 3
Physics Rank Score > 2.0
Coil Watchlist
text
Flag: Coil Formation = 1
Physics Entropy < 0.7
Immediate Action — Spring Release
text
Flag: Spring Release = 1
Bull Trend with Clean Physics
text
Flag: Trending Bull = 1
Physics Agreement >= 2
Physics Time Symmetry > 1.2
Exhaustion Warnings (Fade)
text
Flag: Exhaustion Top = 1
Physics Agreement >= 2
Chaotic — Avoid
text
Flag: Physics Disagree = 1
Alerts
The system includes 19 alert conditions:
Original signals (3):
Physics Buy / Sell
High Market Entropy
Physics-specific (7):
Coil Formation, Spring Release
Exhaustion Top / Bottom
Full Agreement, Physics Disagreement
Phase Transition
Breakout & continuation (6):
Ready Breakout Up / Down
Confirmed Breakout / Breakdown
Continuation Up / Down
Regime (2):
Trending Bull / Bear
Rank score (2):
Top Bull / Top Bear
All alerts fire on bar close by default for clean signals.
Why This System Is Different
Most indicators answer one question. RSI asks "is it overbought?" MACD asks "is momentum accelerating?" ATR asks "how volatile is it?" Each works within a narrow slice of market reality.
APTS asks eight questions simultaneously — velocity, acceleration, force, kinetic energy, potential energy, entropy, volume-work, and temperature — and then asks "how many of them agree?"
That multi-dimensional agreement is the core value. When five independent physics readings all point the same way, the signal isn't a guess — it's a confirmed state.
Additionally:
The entropy filter separates orderly markets (tradeable) from chaotic ones (avoid)
The coil/release detector finds setups before price breaks out
The exhaustion signals flag momentum fading before reversal
The rank score gives you a single sortable number for scanning
The timeframe presets remove the tuning burden
Who This Is For
Trader Type Fit
Intraday (15m–1H) ✅ Primary user — best signal-to-noise balance
Swing (4H–D) ✅ High-quality, lower-frequency signals
Position (D–W) ✅ Best with a watchlist + scanner
Scalper (1m–5m) ⚠️ Works with Scalp preset but noisy
Price-action purist ❌ Too many metrics — prefers simple charts
Beginner ⚠️ Requires understanding of velocity/energy concepts
Recommended Workflow
Load APTS on your primary trading timeframe (1H or 4H recommended)
Check the Dimension Agreement table — is netAgreement clearly positive or negative?
Look at the Situation table — what state is the market in?
Wait for a specific signal:
Coil Formation → prepare
Spring Release → enter
Full Agreement → highest conviction
Exhaustion → exit
Confirm with physics dashboard — is the reading consistent?
Manage with alerts — set alerts on the 19 conditions and let the system notify you
For multi-symbol scanning:
Run APTS as a weekly or daily scanner across your watchlist
Filter for Group 1: Bullish Setups > 0 or specific bit combinations
Build a shortlist
Drop to a lower timeframe for entry timing
Confirm with the physics dashboard on the entry chart
Limitations & Honest Notes
Best on 1H–Daily. Lower timeframes (1m–5m) become noisy even with the Scalp preset. Weekly is too slow for reliable statistics.
Not a standalone trading system. APTS reads the market — it doesn't manage positions, size trades, or place orders. It's a decision-support tool.
Requires context. The signals are meaningful only when read alongside price action and your own risk framework.
Learning curve. Understanding velocity, acceleration, and entropy takes time. The system is not "one glance and go."
Not a crystal ball. Physics describes what is happening — it doesn't predict the future. It shifts probabilities, not certainties.
Summary
The Advanced Physics Trading System treats the market as a physical system and measures it accordingly. It produces:
5-dimension agreement — the core diagnostic
6 analytics tables — geometry, time, regime, situation
8 physics-specific signals — coil, release, exhaustion, agreement
19 alerts — covering every setup type
10 scanner metrics + 4 grouped flags — filterable in TV Screener
For traders who want to see why the market is moving — not just that it is — APTS delivers a level of market introspection that traditional indicators cannot.
Works on all timeframes. Presets auto-tune for your chart. Scanner-ready for multi-symbol hunting.
Trade with physics. Trade with clarity.
FOR EDUCATIONAL PURPOSES ONLY
NOT A FINANCIAL ADVICE Indicateur

Economic News Release - USD Forex Factory Weekly 2026Economic News Release – USD Forex Factory Weekly
A compact, chart-integrated economic calendar designed for traders who need immediate visibility of scheduled U.S. economic events without leaving TradingView.
The indicator displays a weekly USD news table based on Forex Factory calendar classifications and is specifically engineered to remain functional during TradingView Bar Replay. Unlike calendar tools that reference the current real-world date, the displayed week is derived from the chart’s active/replay timestamp, allowing historical sessions to be reviewed with the corresponding embedded economic-event schedule.
Key functionality includes:
This Week / Next Week selector for quickly switching between the active calendar week and the following week.
Bar Replay compatibility — the calendar follows the historical replay cursor rather than the current date.
USD events classified by Forex Factory impact:
Red — High Impact
Orange — Medium Impact
Gray — Lower Impact
Silver — U.S. market/bank holidays
Independent filters for each impact category.
One row per economic event, preserving the individual time, event name, and impact classification.
Dynamic table sizing — only the rows required for the selected week are displayed, eliminating unnecessary empty space.
Adjustable table text size from Tiny through Huge.
Customizable table position and background transparency.
Event timestamps standardized to America/New_York / Eastern Time, appropriate for U.S. index and futures-market analysis.
Includes major macroeconomic releases, central-bank events, employment data, inflation data, sentiment releases, scheduled speeches, holidays, and other relevant USD calendar events contained in the embedded database.
The indicator is intended primarily as a contextual risk-management and historical-review tool. It can be used to identify when price action occurred around scheduled economic catalysts, distinguish ordinary trading periods from event-driven conditions, and perform more accurate historical session analysis in Bar Replay.
Important: Pine Script cannot directly retrieve live Forex Factory calendar data through arbitrary HTTP requests. Consequently, the calendar is embedded within the script and represents a maintained calendar snapshot. Future event dates, times, or classifications may be revised by the original calendar source and therefore require periodic script updates.
This indicator does not generate trade signals or predict market direction. It provides structured economic-calendar context directly on the chart. Indicateur

ICT Combined Venom Silver Bullet Displacement LiquidityICT Combined — Venom / Silver Bullet / Displacement / Liquidity
WHAT THIS IS
Fourteen independent ICT modules in one overlay, each with its own on/off switch. It exists to replace four or five separate scripts on a single chart, which is why the modules are switchable rather than fused together.
Nothing here predicts price. Every module is a mechanical description of something that has already happened on the chart, drawn so it can be seen at a glance.
MODULES 1, 2 AND 3 — THE SESSION MODEL
Three independent instances of the same engine: a Venom NY instance with its own sessions, and two Silver Bullet windows defaulting to 10:00-11:00 and 14:00-15:00 New York. The sequence each one runs is:
1. Build an opening range. During the opening-range session the highest high and lowest low are tracked. The range seals the instant that session ends — the first bar of the trading window does not extend it.
2. Wait for a directional raid. During the trading window, the first side of the range taken out arms the model in the opposite direction: a high taken arms the bearish case, a low taken arms the bullish case. If both sides get taken the model stands down for that session, because the range was not respected and there is no clean directional read.
3. Locate the CISD level. On the raid bar the script scans back up to "Bar Back Check" bars for the most recent candle whose body opposed the raid — a down-body candle for a high raid. That candle's open becomes the change-in-state-of-delivery level. Where two consecutive opposing candles exist the more conservative of the two opens is used. A dotted line runs from that candle forward, extending while price stays on the raid side.
4. Confirm. When a candle CLOSES BACK THROUGH the level, the model confirms and a triangle marks the bar. Body close, not wick — a wick through the level is not a change in state of delivery. A level left untouched longer than the staleness setting is abandoned.
5. Mark the zone. On confirmation the order block anchored at the session extreme is drawn and refined. In parallel the script tracks fair value gaps formed while the model was armed, discards any price has already mitigated, and draws the most recent survivor. Mitigation level is selectable for both zone types — proximal edge, 50%, or distal edge.
Why three instances: the engine holds per-session state, so one copy cannot track two overlapping windows. Three independent instances let a broad session model and two narrow windows coexist without interfering. All sessions are editable and a London Silver Bullet preset is included. Times are America/New_York and follow daylight saving automatically.
MODULE 4 — DISPLACEMENT
Flags candles whose range is unusually large relative to recent behaviour and that leave an unfilled gap behind them.
The measure is either the absolute open-to-close distance or the high-to-low range, compared against a rolling standard deviation of that same measure multiplied by a strength factor. A candle qualifying on size AND producing a three-bar fair value gap is coloured, and a short marker box is drawn over the gap.
Everything here evaluates on confirmed bars only. The gap test reads the third bar of the pattern, which is still forming in real time, so an unconfirmed signal could otherwise appear and then vanish. By default the module only marks candles inside an active trading window rather than painting all session.
MODULE 5 — LIQUIDITY LEVELS AND SWEEPS
Draws prior-day, prior-week, prior-month, Asia-session and London-session highs and lows, and marks when one is swept.
Higher-timeframe levels use the previously closed period, requested in a way that reveals nothing early. Asia and London use the most recently completed session range, so both are sealed before the New York open.
A sweep here means RAID AND REJECTION, not a break. Price must trade through the level and close back on the original side within the same candle. A candle closing beyond the level is treated as acceptance, not a sweep, and is not marked. Each level fires once and re-arms only when the level itself updates.
Marks name every level taken on that bar, so a candle raiding several pools at once is visible as exactly that.
MODULE 6 — FIRST PRESENTED FVG
The first fair value gap to form in the morning and afternoon windows, with Consequent Encroachment (the 50% midpoint) drawn as a dashed line and the gap labelled with its formation time.
Two details matter here.
First, the gap is always sourced from the ONE-MINUTE chart regardless of the timeframe being viewed. The first presented gap is a one-minute event; detecting it on a 15-minute chart would find a different gap at a different price. Zones are anchored by timestamp, so they land correctly even when the gap forms mid-bar on a higher timeframe.
Second, the session window is tested against the MIDDLE candle of the three — the candle that creates the gap. A 09:31 start therefore means the 09:30 opening candle is never the gap-forming candle. Testing the confirming candle instead would let the pattern reach back to 09:29, before the open.
Gaps are retained across days rather than cleared nightly, because they stay relevant long after the session that made them. Up to thirty days can be kept, ten by default, and there are two carry rules: carry every retained gap to the current bar, and always carry Monday's gap through its own week. With both off, a gap simply stops at the end of its own day. A Friday chart with carry-all enabled therefore still shows the whole week plus the tail of the week before.
Retest and CE alerts fire only for the current day's gap. Ten retained gaps each re-arming would produce a stream of alerts from stale levels.
MODULE 7 — OPENING RANGE GAP
The gap between the prior day's regular-session close and today's regular-session open, with the 50% midpoint marked as Consequent Encroachment and optional quadrant lines at 25% and 75%.
The default session ends at 16:15 to match CME index-futures settlement; use 09:30-16:00 for cash equities and indices. Gaps narrower than a configurable minimum are ignored. The gap is reported as filled when price trades back across it to the prior close — the direction of the fill test follows whether the day gapped up or down.
MODULE 8 — PREMARKET DEALING RANGE
The high and low of the 07:00-09:00 New York window, graded into eighths and carried forward across the session.
The range locks when the window closes and is then projected right. The 50% line is equilibrium: above it the market is in premium, below it in discount. The 25% and 75% lines are the quadrants, and the remaining 12.5% steps are the octants. Each line is drawn separately so the grid can be thinned to taste — extremes only, extremes plus equilibrium, or the full eight.
The point of the module is that premium and discount are measured against THIS range specifically, not against the regular-session range and not against the daily range. A rally that looks like strength on the day can be a rally into premium of the premarket range, which is a different reading.
The grid is fractal and the same treatment already appears elsewhere in the script: module 7 draws quadrants on the opening range gap by the same logic, and the same eighths can be applied to any range worth grading.
Window and colours are configurable, the window itself can be shaded, and a chosen number of prior days can be retained. Intraday timeframes only — on daily and above the window cannot resolve.
MODULE 9 — BODY / WICK LAW
A test of whether candle BODIES respect the 50% of a level or zone, ignoring what the wicks do.
The rule is directional. A demand zone holds while bodies stay in its upper half; a supply zone holds while bodies stay in its lower half. Wicks are free to trade through the midpoint — only a closed body crossing it counts as a violation. The module evaluates on confirmed bars only, because an intrabar body is not a body.
Three things are tested, each switchable:
- The module 8 grid. A wick that pierces a level while the body fails to reach it is a rejection at that level. Sustained across a configurable number of interactions it is marked, and a body closing through the level resets the count — as does price clearing the level outright. Which levels may signal is set separately from which levels are drawn, and by default each one signals once per session: nine levels all free to re-fire produces more markers on a rangebound day than a chart can carry, which is a lesson learned rather than a guess.
- The first presented FVG from module 6. Polarity comes from the direction of the gap itself.
- The opening range gap from module 7. Polarity is decided at first touch from the direction price approached from, since a gap can act as either side depending on where price is when it gets there.
A zone that has been violated is recoloured and stops being tested; a zone that has survived the configured number of interactions is recoloured and marked confirmed. Both states fire alerts.
This is a filter, not a signal. It says whether a zone already on the chart is still behaving, not whether to take a trade at it.
MODULE 10 — AM REGIME CLASSIFIER
Grades the premarket window and scores how likely the morning session is to consolidate rather than expand.
READ THIS PART BEFORE ENABLING IT. The module encodes a claim — that a trending premarket implies a consolidating morning — which is not established fact. It is shipped as a measurement instrument, not as a rule, and the defaults are starting guesses rather than findings. The gate that would let the score suppress other modules' alerts is off by default and should stay off until the score has been checked against real sessions.
"Trending" is judged by eye in the material this comes from, so it is scored here from three independent measures rather than asserted:
- Directional efficiency: net displacement divided by distance actually travelled, multiplied by the square root of the bar count. That normalisation matters — a random walk sits near 1.0 on any timeframe, so one threshold works whether the window is graded on one-minute or five-minute bars.
- Close location: where the 09:00 close sits inside the window range. This is the measure closest to what the eye calls a trend.
- Range against its own 20-day median, which stops a quiet directional drift being read as expansion.
A configurable number of those three must agree. Two further tests add to the score: whether the window traded to a level from module 5, and whether it only just got there — a shallow penetration implying unfinished business and a likely revisit.
A level merely lying inside the window range does not count. It has to be in the outer portion of the range, measured from whichever extreme is relevant, on the reasoning that a level price blew through on its way elsewhere was not the destination. The nearest level is reported either way so the distinction is visible. Weights and thresholds are all exposed.
The module then records what the morning session ACTUALLY did, graded with the same efficiency measure. That makes the comparison direct rather than impressionistic: does a high premarket reading predict a low morning one? Until enough sessions have accumulated to answer that, the score is a hypothesis with a number attached.
DASHBOARD
Three levels of detail, because a readout you consult mid-session and a record you study afterwards are different jobs.
COMPACT, the default, is two lines: the call and which side of premarket equilibrium price is on. STANDARD adds what drove the call — trending or not, the key level, the realised figure once the morning closes. FULL shows every factor with its pass or fail, which is more than anyone can read on the fly and is meant for review.
Underneath sits the calibration summary: every logged session split by its premarket classification, reporting the MEDIAN realised morning efficiency of each group with sample sizes, and flagged as a thin sample below twenty per group. Median rather than mean, so one violent morning cannot carry the verdict. If the underlying claim holds, the trending group sits well below the other and below 1.0. If it does not, that shows up here too — which is the point of building it this way.
An optional session log lists the individual rows behind that summary.
History accumulates only over bars the chart has actually loaded, so sample size is set by the timeframe: a one-minute chart loads days, a five-minute chart loads months. The efficiency measure is normalised to be timeframe-independent specifically so those samples stay comparable.
MODULE 12 — SUSPENSION BLOCKS
A fair value gap carrying a volume imbalance at BOTH ends: the middle candle's body is gapped away from its neighbour's body above and below.
An ordinary gap leaves one span of price with no body trade across it. A suspension block leaves three stacked spans. The test is the two body-gap conditions the geometry rules below already compute, required simultaneously rather than individually.
Detected on the chart timeframe rather than sourced from one minute. Module 6 goes to one minute regardless of what is being viewed because a "first presented" gap has one true formation time; a suspension block makes no such claim and is a property of the candles in front of you.
The classification is independent of the geometry switch below. Whether a gap carries an imbalance is a fact about the candles, so it does not change when the extension stops being drawn.
Scope, minimum size, retention and colours are configurable. Blocks are wider than ordinary gaps by construction, since they include both imbalances — the 50% is the more useful reference than the far edge. A first presented gap or displacement marker that also qualifies is drawn with a heavier border rather than duplicated as a separate zone.
MODULE 13 — NEW DAY AND NEW WEEK OPENING GAPS
The span from a session's settlement print to the next session's open, drawn as a solid block. NWOG is the weekend gap, Friday settlement to Sunday open; NDOG covers the other nights.
Monday's new-day gap IS the new-week gap — the same span — so by default the NWOG owns Monday and the NDOG skips it rather than drawing the identical block twice in two colours.
The close side is the final print of the settlement window, not the session close. That window ARMS a value which is CONSUMED when the gap is drawn, so a window that never prints — holiday, half day, a hole in the data — produces no gap for that day rather than one measured against a stale close carried over from some earlier session.
These are deliberately NOT retired when filled, and there is no mitigation state or fade. Price returns to them repeatedly, long after the first pass, which is the reason to carry them at all. A block stays as drawn until retention pushes it off the back. Separate retention counts for each type, five by default.
On daily and higher timeframes there is no settlement window to resolve, so the gap is taken from the previous bar's close to the current bar's open. That is close to the settlement definition but not identical, and the intraday reading is the one to trust.
MODULE 14 — SILVER BULLET ENTRIES
The one module that marks entries. Everything above it describes what the chart has done. This module takes those same pieces and puts a marker where they line up inside a Silver Bullet window, with a grade.
Three setups arm it:
- RAID, THEN FVG. Price trades beyond the extreme of a recent range, or sweeps a module 5 level, and an FVG then forms the other way. If the candle that made the gap is a module 4 displacement candle the setup is graded A+. A plain gap is graded A.
- RAID, THEN INVERSION. After the raid a candle body closes through an opposing FVG, inverting it. That inverted gap is the zone. A+.
- FIRST PRESENTED FVG FLIP. A body closes cleanly through today's module 6 gap, from one side to the other. That covers a straight inversion and a reclaim after an inversion. No raid is needed. A+.
The entry is the retest of the zone, at its near edge or its 50%. By default the retest candle must also close back out on the trade side of that level, and the entry is taken at its close. That is the body/wick reading applied to the entry itself, and it stops thin zones whipsawing a position in and out during chop. A plain resting limit on first touch is available instead. The retest must happen inside the window. By default the raid and the zone must also form inside the window. They can be allowed to form a few minutes earlier, to catch the raids and displacements that print at 09:57–10:00. In testing on NQ, though, setups formed entirely inside the window did better, so that allowance is off unless you turn it on. A zone expires if a body closes through its far edge, if it goes unretested for too long, or when the window ends.
Two filters grade what survives.
The opening range gap gate. While today's module 7 gap has not had its 50% tagged, and price is still within a set distance of it (150 points by default), a setup that fades the draw to that level is blocked. A gap up draws price down, so longs are blocked. A gap down draws price up, so shorts are blocked. Once the 50% trades, the objective is complete and the gate lifts. Blocked setups are still drawn, as a grey X, and still scored, so the gate can be judged rather than trusted.
An opposing first presented gap in the path. A short with a bullish first presented gap between entry and target, or a long with a bearish one, is downgraded to B. The gap ahead is resistance.
Every signal is followed to target, stop, break-even or a time exit and tallied by grade in a scorecard. The scoring is conservative: a bar that touches both stop and target counts as a loss, fills assume a resting limit at the entry level, and only loaded bars are covered. The stop sits beyond the raid wick by default, or beyond the zone's far edge. First presented flips have no raid, and their gaps are often narrow, so they have their own stop setting: beyond the swing extreme of the last few bars (the default), the gap's far edge, or a fixed distance from the entry. For accounts with tight risk limits, both setups can instead place the stop just beyond the wick of the retest candle itself, and the stop can be moved to break-even as soon as the candle after entry closes in profit. The scorecard also reports maximum drawdown, the worst single trade and the longest run of consecutive losses.
A Prop profile locks one configuration aimed at funded-account rules: the morning window only, limit entries at the near edge of the zone, a 35-point target, no setup whose stop would be wider than 40 points, the opening range gap gate on, and no new trades after two losses in a day. It switches on in one step instead of being rebuilt setting by setting, and the default Custom profile leaves every setting under your control. The target is a fixed number of points or a multiple of risk, with optional break-even.
This module is a test bed for a discretionary playbook, not a trading system. The scorecard exists so the grading rules can be checked against the chart before anyone relies on them.
FVG GEOMETRY — VOLUME IMBALANCE
An FVG boundary is a wick. Where the neighbouring candle's BODY does not reach that wick, the space left between them is a volume imbalance and belongs to the same inefficiency.
With this enabled, each edge moves from the wick to the neighbouring candle's body extreme whenever a body gap exists between the two candles. Body extreme means the greater or lesser of open and close, whichever way the candle closed — comparing against close alone silently assumes candle direction and produces the wrong edge on an opposite-coloured candle. Boundaries only ever widen, never narrow.
This governs the first presented FVG, the displacement marker and the suspension block test always. Whether it also reaches the zones inside modules 1, 2 and 3 is a separate switch, off by default.
Those zones come from an external library which draws them wick to wick. The consequence is that the same three-candle gap gets different boundaries depending on which module happens to draw it. The switch corrects that, and how it does so is worth stating: the library is left to perform its own detection and filtering, and only the coordinates are adjusted. Each edge is verified against the raw wick it ought to be before being widened, and an edge that does not verify is passed through exactly as the library drew it. A mismatch therefore degrades to the previous behaviour rather than to a wrong zone.
It is off by default because it changes zones users have already been reading. A diagnostic counter reports how many library gaps were offered to the widening logic, how many had an edge moved, and how many were declined — so the switch can be verified rather than assumed.
HOW TO USE IT
Start by switching modules OFF. Thirteen modules, three CISD engines, ten liquidity levels and twenty retained gaps is a great deal of chart furniture, and all of it on at once is unreadable. Most users want one or two windows and a subset of the levels.
It helps to know that the modules answer four different questions, and that only two of the four groups produce anything to act on directly. Modules 5, 7, 8 and 13 say where price is. Modules 4, 6 and 12 say what formed. Modules 1, 2, 3 and 9 say whether it is confirmed or has died. Module 10 says whether to trust the session at all.
A reasonable order to switch things on:
1. Module 5 for context — which pools are still resting, which have just been taken.
2. Module 8 for the premarket range. It is useful on its own: it tells you whether the morning is trading in premium or discount of the range that set up the day, which is a different reading from premium or discount of the session or the day.
3. Module 6 for the first presented gap. Modules 5, 6 and 8 together are a complete framework and a reasonable place to stop.
4. One session engine — Venom, or a single Silver Bullet window — for the mechanical trigger, with module 4 as a strength filter.
5. Module 9 once zones are on the chart, to see whether they are still behaving.
6. Modules 12 and 13 when the above is comfortable. Module 13 in particular adds long-lived blocks that persist for weeks.
7. Module 10 last, and read its note below before trusting it.
The modules are deliberately independent, so any subset works.
Zones are drawn where the model says a reaction is plausible. They are not entries. Nothing here manages risk, sizes a position, or knows anything about your account.
On module 10 specifically: leave it in measurement mode. Its gate is off by default. Run it for a couple of months, watch the calibration summary, and only then decide whether the score deserves to influence anything. If the two medians never separate on your instrument, that is a useful result and the honest response is to leave the module switched off.
Alerts are provided per window for CISD and for CISD with an unmitigated FVG present, per displacement direction, per liquidity level plus aggregate buy-side and sell-side sweep conditions, for the first presented FVG and opening range gap on formation, retest, CE tap and fill, for the premarket range locking and for price crossing into premium or discount, for every body/wick outcome — grid rejection either way, and each tested zone holding or being violated — for a suspension block forming in either direction or either, for a first presented gap that is itself a suspension block, for the new day and new week opening gaps being set, and for Silver Bullet entries — long or short at any grade, or A+ only, plus a dynamic alert carrying the entry, stop and target prices.
There is deliberately no alert for price tapping a new day or new week gap. Those levels are revisited repeatedly, so a one-shot flag would be wrong and a fire-every-touch alert would be noise.
CREDITS AND WHAT IS ORIGINAL HERE
This script reuses open-source work and it is worth being precise about which parts.
From TFlab, taken from "ICT Venom Trading Model" and "Silver Bullet ICT Strategy" under the Mozilla Public License 2.0: the CISD level-detection routine, the opening-range break state machine, and the order block and FVG zone handling. This script also calls TFlab's public libraries OrderBlockRefiner_TradingFinder, OrderBlockDrawing_TradingFinder and FVGDetectorLibrary, which perform the zone refinement, drawing and FVG detection. The engine behind modules 1, 2 and 3 is substantially TFlab's work.
From tradeforopp (TFO): the displacement measure in module 4 — comparing candle range against a rolling standard deviation of range — is TFO's approach.
From fadizeidan, taken from "ICT Open Range Gap & 1st FVG": the volume-imbalance-aware FVG geometry using body extremes, the practice of always sourcing the first presented FVG from the one-minute chart, the middle-candle session test that excludes the opening candle, and the Opening Range Gap definition together with its quadrant lines and minimum-size filter.
What this version adds:
- TFlab's two scripts are the same engine with different session wiring. That engine is parameterised once here and instantiated three times, so multiple overlapping windows run independently — something neither original could do.
- The entire liquidity module is new: the higher-timeframe and session levels, and the raid-and-rejection sweep test.
- The first presented FVG is extended with an afternoon session, and with multi-day retention and carry rules that keep prior days' gaps live on the chart.
- Session handling is preset-driven and preset-agnostic rather than hardcoded, and session framing is drawn from actual session boundaries instead of assumed one-hour offsets.
- Several defects in the source scripts are corrected. The opening range absorbed the first bar of the trading window, which made a break on that bar undetectable. A "Bar Back Check" input existed but was overridden by a hardcoded value. Four colour inputs were declared and never referenced. A dead conditional invoked a series function from inside a local scope. Box count was left at the default while a library drew boxes. An uninitialised level compared against zero could fire a spurious signal at the start of a chart.
- The displacement module's bar colouring and alert now evaluate on confirmed bars, removing an intrabar repaint present in the original.
- The premarket dealing range and its quadrant/octant grid are new, as is the body/wick test that runs against it and against the two gap modules.
- The suspension block module is new. The two body-gap conditions were already being computed to widen FVG edges; requiring both at once, exposing the result, and marking gaps that qualify is this script's addition.
- The new day and new week opening gap module is new, including the arm-and-consume handling of the settlement print that produces no gap rather than a wrong one when the settlement window fails to print.
- The unified FVG geometry is new, and so is the way it is applied: the external library keeps its own detection and filtering, each coordinate is verified against the wick it should be before being widened, and an edge that does not verify is left untouched. A diagnostic counter makes the switch checkable rather than a matter of trust.
- The regime classifier and its calibration record are new. So is the decision to ship a claim with the means of checking it attached, rather than as a setting that is simply on.
- All colour and size inputs are wired through and actually take effect.
The concepts themselves — fair value gaps, consequent encroachment, inversion, displacement, liquidity raids, the first presented gap, the opening range gap, premium and discount, the premarket dealing range and the body/wick reading of a PD array — are ICT's (Michael J. Huddleston) and are not claimed as original here. What is original is the mechanical definition of each one: the specific thresholds, the tie-breaks, and the choices about what counts and what does not. Those decisions are documented above and exposed as inputs precisely because reasonable people would make some of them differently.
Published under the Mozilla Public License 2.0, consistent with the sources.
LIMITATIONS
- Session logic is intraday. On daily and higher timeframes the session windows cannot resolve and the model produces no signals.
- Charts set to regular trading hours are supported. The opening range gap still finds the prior close, and the liquidity levels — prior day, week and month, Asia and London — are read from the extended session, so they match an extended-hours chart exactly. The premarket range and the regime classifier are the exception: they grade the 07:00-09:00 window, and an RTH chart has no bars there, so both stay empty. The new day and new week opening gaps measure to the 09:30 open on such a chart rather than the 18:00 open.
- The first presented FVG module requires a minute-based chart, because it requests one-minute data. On lower-tier TradingView plans the amount of lower-timeframe history available is limited, so the gap history will not extend as far back.
- Displacement uses a standard-deviation threshold, which adapts to recent volatility. After a quiet stretch it will flag smaller candles than it would after an active one.
- Zones, levels and retained gaps are all drawn subject to TradingView's 500-drawing limits. With every module enabled and a long retention window, older drawings will be purged from the chart.
- Signals confirm on bar close. This is deliberate, and it means confirmation arrives one bar after the move that caused it.
- The new day and new week opening gaps resolve their settlement print only on intraday timeframes. On daily and above the gap is approximated from the previous bar's close, which is close to the settlement definition but not the same number.
- The first presented FVG stops populating beyond the limit of available one-minute history, and does so silently. An older day showing no gap may mean the data was unavailable rather than that no gap formed.
- The regime classifier's thresholds and weights are untested defaults. It is a way to measure a claim, not evidence for one, and its dashboard log is there so the claim can be checked rather than believed. Its history accumulates only over loaded bars, so it starts empty on a fresh chart.
Indicateur

Buy Point % LevelsBuy Point % Levels
Overview
Buy Point % Levels is a visual planning tool for position management. Once you've bought (or plan to buy) a stock at a given price, it draws a horizontal "Buy" line at that price plus a set of dashed stop-loss and take-profit lines, each expressed as a percentage above or below your buy point. Every line is labeled on the right with its percentage and the exact price it corresponds to, so you can see your risk/reward levels laid out on the chart at a glance.
It does not generate buy/sell signals, plot historical markers, or fire alerts — it's a reference overlay for a position you already have in mind, redrawn fresh on the most recent bar each time the chart updates.
How the buy price is determined
The script figures out your buy price in this order of priority:
1. Positions list match — if the current chart's ticker appears in the "Positions" input (see below), that price is used automatically, regardless of any other setting.
2. Manual override — if the ticker isn't in the Positions list and "Manual Override" is checked, the script uses the Buy Price input/line. The first time you use it, that line starts at the last close — drag it on the chart or type an exact value to set your real entry.
3. Default (tracking mode) — if neither of the above applies, the buy point defaults to the current/last close and moves with the price on every bar. This is the out-of-the-box behavior for any ticker you haven't entered a fixed price for — ideal for watchlist tickers you're just observing, so you can see what your levels would look like if you bought at today's price.
How to use it
Add the indicator to a chart. With no other settings changed, the buy point simply tracks the current/last close — this default behavior is what you want for a ticker you're just watching, not yet holding: as the price moves, the buy line and every level move with it, so you can see at a glance what the stop-loss and target prices would be if you bought right now.
Once you actually own a position (or have a specific entry price in mind), lock the buy point in place with either:
- Positions list — type "SYMBOL:PRICE" into the Positions field for every ticker you hold (e.g. "FLNC:19.86, TSLA:245, AAPL:227.5"), so the right fixed buy price loads automatically no matter which of those charts you open, or
- Manual Override — check Manual Override and drag the buy-price line to your entry price on a single chart.
In the Levels section, turn on the stop-loss and target percentages you want to see, and adjust each percentage to match your own risk/reward plan.
The buy line (blue) and your selected levels (red for stop, green for targets) will appear at the right edge of the chart, each labeled with its percentage and price.
Inputs
Buy Point
Positions (SYMBOL:PRICE, comma separated) — optional — A running list of ticker/price pairs, e.g. "FLNC:19.86, TSLA:245". When the chart's symbol matches one in this list (case-insensitive), that price is used as the buy point automatically — useful for keeping one master list that works across all your charts.
Manual Override (use Buy Price field / dragged line below) — When checked, and the current symbol isn't in the Positions list, the buy point comes from the Buy Price field instead of defaulting to the last close.
Buy Price (drag the line on the chart, or type here) — The manual entry price. This appears as a draggable line on the chart when the indicator is added; you can drag it into place or type a value directly in Settings. Only used when Manual Override is on and the symbol isn't matched in Positions.
Extend Lines Right (bars) — How many bars past the current price the lines and labels extend to the right. Default 10.
Levels — eight independent percentage levels, each with its own on/off checkbox and editable percentage, applied relative to the buy price: Each level draws a dashed horizontal line (red for the stop, green for targets) and a label showing its percentage and the resulting price. Any level can be renamed in effect by simply changing its percentage — the label always reflects the live value.
Notes
Lines and labels are only drawn on the most recent bar, so they always reflect your current settings rather than showing historical levels.
This is a manual planning aid, not a signal generator — it does not predict price movement, issue alerts, or represent a recommendation to buy or sell any security. Always do your own research and manage risk according to your own plan.
Indicateur

Sattam | Harmonic LabSattam | Harmonic Lab
Sattam | Harmonic Lab is an all-in-one overlay for pattern trading: 30 harmonic and classical pattern families, ready-made entry / targets / stop for every pattern, a live panel that tracks each pattern's progress, a "possible patterns" projection for the developing leg, and higher-timeframe Supply & Demand zones. Every setting is bilingual (English | Arabic).
WHAT IT DETECTS
• Harmonic: Gartley, Butterfly, Bat, Crab, Alternate Bat, Deep Crab, Cypher, Shark, Nen Star, AB=CD, 3-Drive, 5-0, White Swan, Black Swan, Leonardo, Partizan.
• Anti patterns: Anti-Gartley, Anti-Butterfly, Anti-Bat, Anti-Crab, Anti-Shark, Anti-Cypher, Anti-Nen Star.
• Classical: Head & Shoulders, Inverse Head & Shoulders, Double Top, Double Bottom, Ascending / Descending / Symmetrical Triangle.
Patterns are built on confirmed zigzag pivots with a developing D evaluated at bar close. Drawings anchor to past pivots and a detected pattern is never redrawn. Each pattern shows its legs, shaded triangles, measurement guides with ratios, X/A/B/C/D letters, the name at D and a dotted validation zone under D. 3-Drive uses 1/2/3 boxes with extension diagonals; 5-0 uses X–B, A–C and X–D chords.
TRADE LEVELS AND LIFECYCLE
Entry, Target 1, Target 2 and Stop are computed for every pattern (defaults 10% / 40% / 94% of the pattern leg, stop at the validation edge) and drawn to the right of price until Target 1 is reached. Each pattern moves through Pending → Entered → Target 1 → Target 2, or Stopped / Invalidated / Expired. Stopped and invalidated patterns are removed at once; patterns that reached their target stay drawn for the expiry age.
ACTIVE PATTERNS PANEL
One row per active pattern: name, direction, entry, both targets, stop and age in bars, with ✓ marks as levels are reached. Optional lifecycle counters (Found / Entry / T1 / T2 / Stops / Invalid / Expired).
POSSIBLE PATTERNS
When the current leg can still complete a pattern, the projected D line, its zone and a label listing the candidate families with their D ranges (nearest first). Visual only — never part of signals or counters.
SUPPLY & DEMAND ZONES
Built on a timeframe you choose (default 4H) from a confirmed pivot followed by a displacement close beyond ATR; extended to the right and removed once a close invalidates them. Never drawn from the forming higher-timeframe bar.
ALERTS
New pattern, BUY entry, SELL entry, Target 1, Target 2, Stop, Invalidation, Expiry, New Supply Zone, New Demand Zone — plus a dynamic alert template ({ticker} {tf} {pattern} {side} {event} {entry} {t1} {t2} {sl}) for "Any alert() function call". Use "Once per bar close": all signals are computed on closed bars.
SETTINGS (groups)
01 Detection — zigzag period (8), pivot confirmation bars, nested XABCD search, candidate cap, error rate % (8), min/max pattern bars, minimum height, direction, session, max new patterns per bar, max active patterns, same-pattern blocking, expiry age, two-sided extreme bar handling.
02 Pattern families — a switch per family, Cypher minimum XC/XA, classical symmetry tolerance, H&S rules (skipped waves, pivots after the right shoulder, shoulder difference), triangle options, AB=CD time filter and tolerances.
03 Entry and targets — level basis, entry / T1 / T2 percentages, finish at T1 or T2, reward/risk targets, entry trigger (close confirmation or high/low touch).
04 Stop and validation — stop mode (zone / manual % / break-even / trailing), band padding, invalidation source, entry-side filter, validation style.
05 Appearance — draw patterns, letters, ratios, levels, validation zones, shading and transparency, palette (classic or by direction), text size, guides, line widths and styles, projection length, only active patterns, keep last pattern, maximum patterns drawn (6), completed patterns retained.
06 Projection — show nearest possible D zone, display mode, families listed, direction, colors, line width and style, prediction PRZ, Cypher forecast preference.
07 Panels — active patterns panel, lifecycle counters, size, position, alignment, colors, detection start date.
08 Alerts — event switches and the dynamic template.
09 Supply & Demand — enable, zone timeframe, pivot length, sensitivity, displacement window, width, offset, max zones per side, hide invalidated zones, colors, midline style, timeframe label.
NOTES
• Pivots need bars after them to confirm, so a pattern appears one or more bars after D completes.
• The panel and counters are not a backtest and do not represent trading performance.
• Not financial advice.
EXAMPLES
Several families on one chart:
Leonardo with a possible-patterns label:
Alternate Bat with En / T1 / T2 / SL and the panel:
Double Bottom and Symmetrical Triangle:
3-Drive and 5-0:
AB=CD completing inside a 4H demand zone:
Double Top with four possible patterns:
------------------------------------------------------------
Harmonic Lab
مؤشر متكامل لتداول الأنماط: 30 عائلة هارمونيك وكلاسيكية، مستويات دخول وأهداف ووقف جاهزة لكل نمط، لوحة حيّة تتابع تقدّم كل نمط، توقّع «الأنماط المحتملة» للموجة الجارية، ومناطق عرض وطلب من فاصل أعلى. كل الإعدادات ثنائية اللغة (English | عربي).
ما يكتشفه
• الهارمونيك: Gartley، Butterfly، Bat، Crab، Alternate Bat، Deep Crab، Cypher، Shark، Nen Star، AB=CD، 3-Drive، 5-0، White Swan، Black Swan، Leonardo، Partizan.
• الأنماط المعاكسة: Anti-Gartley، Anti-Butterfly، Anti-Bat، Anti-Crab، Anti-Shark، Anti-Cypher، Anti-Nen Star.
• الكلاسيكية: الرأس والكتفين ومعكوسه، القمة المزدوجة، القاع المزدوج، المثلث الصاعد والهابط والمتماثل.
تُبنى الأنماط على محاور زجزاج مؤكدة مع نقطة D نامية تُختبر عند إغلاق الشمعة. الرسم يُثبَّت على المحاور السابقة ولا يُعاد رسم النمط بعد اكتشافه. لكل نمط أضلاعه ومثلثاته المظلّلة وأدلة القياس بالنِّسَب وحروف X/A/B/C/D والاسم عند D ومنطقة تحقق منقّطة تحت D. 3-Drive بأرقام 1/2/3 وقطري امتداد؛ 5-0 بأوتار X–B وA–C وX–D.
المستويات ودورة الحياة
دخول وهدف أول وهدف ثانٍ ووقف تُحسب لكل نمط (افتراضيًا 10% / 40% / 94% من ضلع النمط، والوقف عند حافة منطقة التحقق) وتُرسم يمين السعر حتى بلوغ الهدف الأول. ينتقل النمط بين: قيد الانتظار ← دخل ← الهدف 1 ← الهدف 2، أو وقف / إبطال / انتهاء. الموقوف والمُبطل يُزال فورًا، والذي حقق هدفه يبقى مرسومًا حتى عمر الانتهاء.
لوحة الأنماط النشطة
صف لكل نمط نشط: الاسم، الاتجاه، الدخول، الهدفان، الوقف، وعمره بالشموع، مع ✓ عند تحقق كل مستوى. اختياريًا عدّادات دورة الحياة (Found / Entry / T1 / T2 / Stops / Invalid / Expired).
الأنماط المحتملة
حين تكون الموجة الجارية مرشحة لإكمال نمط، يُعرض خط D المتوقع ومنطقته وملصق يسرد العائلات المحتملة ونطاق D لكل منها بالأقرب أولًا. توقع بصري فقط — لا يدخل في الإشارات أو العدّادات.
مناطق العرض والطلب
تُبنى على الفاصل الذي تختاره (افتراضي 4 ساعات) من محور مؤكد يليه إغلاق بإزاحة تتجاوز ATR؛ تمتد يمينًا وتُحذف عند إبطالها بإغلاق. لا تُرسم من شمعة الفاصل الأعلى الجارية.
التنبيهات
نمط جديد، دخول شراء، دخول بيع، الهدف الأول، الهدف الثاني، الوقف، الإبطال، الانتهاء، منطقة عرض جديدة، منطقة طلب جديدة — إضافة إلى قالب تنبيه ديناميكي ({ticker} {tf} {pattern} {side} {event} {entry} {t1} {t2} {sl}) مع "Any alert() function call". اختر «Once per bar close» لأن كل الإشارات تُحتسب عند الإغلاق.
الإعدادات (المجموعات)
01 الاكتشاف — فترة الزجزاج (8)، شموع تأكيد المحور، البحث المتداخل، سقف المرشحين، نسبة الخطأ % (8)، أقل/أقصى شموع للنمط، أقل ارتفاع، الاتجاه، الجلسة، أقصى أنماط جديدة لكل شمعة، أقصى أنماط نشطة، منع تكرار النمط، عمر الانتهاء، معالجة الشمعة ثنائية الطرف.
02 عائلات الأنماط — مفتاح لكل عائلة، أدنى XC/XA لسايفر، سماحية تماثل الكلاسيكية، قواعد الرأس والكتفين (الموجات المتخطاة، المحاور بعد الكتف الأيمن، فرق الكتفين)، خيارات المثلث، فلتر زمن AB=CD وسماحياته.
03 الدخول والأهداف — أساس المستويات، نِسَب الدخول / الهدف 1 / الهدف 2، الإنهاء عند الهدف 1 أو 2، الأهداف بالعائد/المخاطرة، مُحفّز الدخول (تأكيد الإغلاق أو لمس القمة/القاع).
04 الوقف والتحقق — وضع الوقف (منطقة / يدوي % / تعادل / متحرك)، حشو النطاق، مصدر الإبطال، فلتر جهة الدخول، نمط خط التحقق.
05 المظهر — رسم الأنماط، الحروف، النِّسَب، المستويات، مناطق التحقق، التظليل وشفافيته، الألوان (كلاسيكية أو بالاتجاه)، حجم النص، الأدلة، سُمك الخطوط وأنماطها، امتداد المستويات، الأنماط النشطة فقط، إبقاء آخر نمط، أقصى أنماط مرسومة (6)، الأنماط المنتهية المُبقاة.
06 التوقع — إظهار أقرب منطقة D محتملة، وضع العرض، عدد العائلات في الملصق، الاتجاه، الألوان، عرض الخط ونمطه، منطقة PRZ، تفضيل توقع سايفر.
07 اللوحات — لوحة الأنماط النشطة، عدّادات دورة الحياة، الحجم، الموضع، المحاذاة، الألوان، تاريخ بدء الاكتشاف.
08 التنبيهات — مفاتيح الأحداث والقالب الديناميكي.
09 العرض والطلب — التفعيل، فاصل المناطق، طول المحور، الحساسية، نافذة الإزاحة، العرض، الامتداد، أقصى مناطق لكل جهة، إخفاء المُبطل، الألوان، نمط خط المنتصف، ملصق الفاصل.
ملاحظات
• المحاور تحتاج شموعًا بعدها لتتأكد، فيظهر النمط بعد اكتمال D بشمعة أو أكثر.
• اللوحة والعدّادات ليسا اختبارًا رجعيًا ولا يمثّلان أداءً تجاريًا.
• ليس توصية مالية.
Indicateur

CryptonianEWFibLibrary "CryptonianEWFib"
Cryptonian Elliott Wave Fib /1. Stage-aware Fibonacci model, corrective projection geometry and Fresh-FVG lifecycle/confluence. Extracted from the proven 11.8c/11.8d host without methodology changes.
evaluate(goldProfile, ticker, chartTimeframeSeconds, fvgMinAtr, fvgMaxAgeBars, fibEngineOn, fvgEngineOn, fvgRequireSourceLeg, maxStoredFvgs, fvgMinRemainingPct, atrValue, mintick, currentBar, currentHigh, currentLow, currentClose, p0, p1, p2, p3, p4, pb0, pb1, pb2, pb3, primaryKey, primaryLockedCount, primaryDirection, primaryW2Depth, primaryW3Extension, primaryW4Depth, primaryW5Ratio, primaryQuality, correctionSourceKey, correctionCommittedCount, correctionOriginPrice, correctionSourceDirection, c1, cp1, c2, cp2, cb2, correctionConfirmed, correctionHasProvisional, fvgOriginalTops, fvgOriginalBottoms, fvgLiveTops, fvgLiveBottoms, fvgDirections, fvgBirthBars)
Parameters:
goldProfile (bool)
ticker (string)
chartTimeframeSeconds (int)
fvgMinAtr (float)
fvgMaxAgeBars (int)
fibEngineOn (bool)
fvgEngineOn (bool)
fvgRequireSourceLeg (bool)
maxStoredFvgs (int)
fvgMinRemainingPct (float)
atrValue (float)
mintick (float)
currentBar (int)
currentHigh (float)
currentLow (float)
currentClose (float)
p0 (float)
p1 (float)
p2 (float)
p3 (float)
p4 (float)
pb0 (int)
pb1 (int)
pb2 (int)
pb3 (int)
primaryKey (string)
primaryLockedCount (int)
primaryDirection (int)
primaryW2Depth (float)
primaryW3Extension (float)
primaryW4Depth (float)
primaryW5Ratio (float)
primaryQuality (float)
correctionSourceKey (string)
correctionCommittedCount (int)
correctionOriginPrice (float)
correctionSourceDirection (int)
c1 (float)
cp1 (bool)
c2 (float)
cp2 (bool)
cb2 (int)
correctionConfirmed (bool)
correctionHasProvisional (bool)
fvgOriginalTops (array)
fvgOriginalBottoms (array)
fvgLiveTops (array)
fvgLiveBottoms (array)
fvgDirections (array)
fvgBirthBars (array) Bibliothèque

CryptonianEWViewLibrary "CryptonianEWView"
Cryptonian Elliott Wave View /1. Dedicated presentation-policy layer for Minimal Trader, Balanced, Full Audit and Custom chart modes. Presentation only; no Elliott, Forecast, Trade, Runtime or Audit methodology.
resolve(mode, cleanChart, primaryDegreeLinesOn, secondaryDegreeLinesOn, subSecondaryDegreeLinesOn, alternateCountLinesOn, correctionLinesOn, showPivotSkeleton, showElliottChannels, showPrimaryCount, secondaryDegreeLabelsOn, subSecondaryDegreeLabelsOn, showAlternateCount, showCorrection, showPivotIds, showDevelopingPivot, showCorrectionLevels, showFibModel, showFreshFvg, showInvalidationLevel, showInvalidationTags, showRevisionTags, showTradeLevels, showTradeSignals, showPotentialForecast, forecastAuditOn, forecastAuditLabelsOn, contextForecastRoadmapOn, contextForecastMainLabelOn, contextForecastTargetLabelsOn, htfTradeBridgeGeometryOn, maxTradeLifecycleLabels)
Parameters:
mode (string)
cleanChart (bool)
primaryDegreeLinesOn (bool)
secondaryDegreeLinesOn (bool)
subSecondaryDegreeLinesOn (bool)
alternateCountLinesOn (bool)
correctionLinesOn (bool)
showPivotSkeleton (bool)
showElliottChannels (bool)
showPrimaryCount (bool)
secondaryDegreeLabelsOn (bool)
subSecondaryDegreeLabelsOn (bool)
showAlternateCount (bool)
showCorrection (bool)
showPivotIds (bool)
showDevelopingPivot (bool)
showCorrectionLevels (bool)
showFibModel (bool)
showFreshFvg (bool)
showInvalidationLevel (bool)
showInvalidationTags (bool)
showRevisionTags (bool)
showTradeLevels (bool)
showTradeSignals (bool)
showPotentialForecast (bool)
forecastAuditOn (bool)
forecastAuditLabelsOn (bool)
contextForecastRoadmapOn (bool)
contextForecastMainLabelOn (bool)
contextForecastTargetLabelsOn (bool)
htfTradeBridgeGeometryOn (bool)
maxTradeLifecycleLabels (int)
drawActiveZone(boxStore, labelStore, enabled, startBar, projectionBars, zoneTop, zoneBottom, zoneName, zoneColor, panelColor, labelSize)
Parameters:
boxStore (array)
labelStore (array)
enabled (bool)
startBar (int)
projectionBars (int)
zoneTop (float)
zoneBottom (float)
zoneName (string)
zoneColor (color)
panelColor (color)
labelSize (string) Bibliothèque

Vix Dual Adaptive (Independent) [Zofesu]CREDITS
Based on the Williams VIX Fix concept originally published on TradingView by ChrisMoody (CM_Williams_Vix_Fix, 2014, open-source). Original script:
The underlying VIX Fix formula was created by Larry Williams and is public domain.
─────────────────────────────────────
Vix Dual Adaptive (Independent) is a sentiment oscillator that runs two fully independent Williams VIX Fix engines simultaneously — one calibrated to detect capitulation, one calibrated to detect euphoria. Each engine has its own lookback window, its own percentile threshold, and its own dual-layer statistical filter.
The standard VIX Fix measures fear only: one engine, one direction, shared parameters. This implementation adds an inverse engine that mirrors the calculation to detect overextension at the top of a move, and separates the calibration of both engines so each can be tuned to the specific behavior of the asset and timeframe being traded.
─────────────────────────────────────
01 — What is Vix Dual Adaptive?
─────────────────────────────────────
The indicator plots two histograms from a common zero line — Fear above, Greed below. A histogram bar lights up only when its engine registers a statistically extreme reading. When no extreme is present, bars render in black and serve purely as visual anchors for candle alignment.
Fear Engine (Lime)
Measures how far the current low sits below the highest recent close. Large values mean price has dropped sharply from a recent peak — capitulation conditions.
Formula: (highest(close, lb) − low) / highest(close, lb) × 100
Greed Engine (Purple) — original extension
Measures how far the current high sits above the lowest recent low. Large negative values mean price has extended sharply from a recent trough — euphoric conditions.
Formula: −((high − lowest(low, lb)) / lowest(low, lb) × 100)
─────────────────────────────────────
02 — Why Two Independent Engines
─────────────────────────────────────
Market tops and bottoms do not behave symmetrically. Bottoms form through fast, violent capitulation — often a single bar of panic selling. Tops form through slow distribution — extended drift with decreasing momentum.
A single-engine VIX Fix with shared parameters cannot capture both. A lookback tuned to catch sharp capitulation will miss slow euphoric extension, and a lookback tuned for drift will smooth away panic spikes entirely.
Running two engines with independent lookback windows and independent percentile thresholds solves this. The Fear engine can be set short and sensitive; the Greed engine can be set longer and more selective — or the reverse, depending on the asset's character.
─────────────────────────────────────
03 — Dual Threshold Filtering
─────────────────────────────────────
Each engine filters its raw value through two independent statistical thresholds. A signal bar appears when either threshold is crossed.
Threshold 1 — Bollinger Band boundary
SMA of the VIX Fix value plus or minus 2 standard deviations, calculated over the engine's lookback period. This boundary adapts dynamically to current volatility — it tightens in calm markets and widens during turbulence.
Threshold 2 — Percentile rank line
The highest (or lowest) VIX Fix value recorded over twice the lookback period, multiplied by the percentile setting. At 0.99 this means only readings in the top 1% of the historical range qualify. This threshold is absolute rather than adaptive — it anchors the signal to the asset's own extreme history.
Signal logic:
Fear bar — wvf ≥ BB upper OR wvf ≥ percentile threshold
Greed bar — wvf ≤ BB lower OR wvf ≤ percentile threshold
Using OR rather than AND is intentional. Either condition alone represents a statistically meaningful extreme; requiring both would suppress the majority of valid signals.
─────────────────────────────────────
04 — Settings
─────────────────────────────────────
Fear Lookback — default 145
Bars used for the Fear engine's VIX Fix and Bollinger Band calculation. Higher = smoother, fewer signals.
Fear Percentile — default 0.99
Statistical rank required for a Fear signal. 0.99 = only the top 1% of extremes qualify. Lower values produce more signals.
Greed Lookback — default 148
Independent from the Fear lookback. Tune separately.
Greed Percentile — default 0.99
Independent from the Fear percentile. Tune separately.
Show Bollinger Bands — default off
Show Percentile Lines — default off
Both boundary lines are hidden by default. Enable them during calibration to see where the thresholds sit relative to the histogram, then hide them once the settings are finalized.
─────────────────────────────────────
05 — Calibration
─────────────────────────────────────
Each asset and timeframe requires its own settings. There is no universal configuration — the defaults are calibrated for D1 on major instruments and should be treated as a starting point.
Step 1 — Enable both boundary lines so the thresholds are visible against the histogram.
Step 2 — Set the percentile to 0.99 and adjust the lookback across a range of 50 to 500. Watch how the signal density changes.
Step 3 — Reduce the percentile gradually until the number of signals matches your trading frequency. Fewer, higher-conviction signals for swing trading; more signals for active trading.
Step 4 — Repeat independently for the second engine. The two engines do not need matching values.
Step 5 — Hide the boundary lines once calibration is complete.
Save the finished configuration as an indicator template so it can be reapplied per instrument or TimeFrame.
─────────────────────────────────────
06 — Signal Interpretation
─────────────────────────────────────
Fear bar appears — the market has reached a statistically extreme oversold condition. Potential bullish reversal zone.
Greed bar appears — the market has reached a statistically extreme overextended condition. Potential bearish reversal zone.
The entry trigger is not the appearance of the bar. It is the moment the bar disappears on a closed candle — this confirms the extreme condition has ended rather than continuing. Entry on the following candle.
A bar that stays lit across multiple candles indicates a sustained trend or ongoing accumulation, not a reversal. Waiting for the bar to close and disappear is what separates a reversal signal from a continuation warning.
If both Fear and Greed register simultaneously, the two engines are reading conflicting pressure. This typically occurs during high-volatility expansion. Check the higher timeframe and wait for support or resistance confirmation before entering.
─────────────────────────────────────
07 — How To Use
─────────────────────────────────────
Step 1 — Calibrate the indicator to your instrument and timeframe using the process in section 05.
Step 2 — Wait for a colored histogram bar. Black bars carry no signal.
Step 3 — Do not enter while the bar is lit. Wait for it to disappear on a closed candle.
Step 4 — Enter on the next candle open. Stop loss beyond the extreme of the signal range.
Step 5 — Confirm with structure. A Fear signal landing on a known support level is significantly stronger than one occurring in open space. The indicator identifies when sentiment is extreme; it does not identify where price will turn.
Works on all asset classes: Indices, Stocks, Forex, Gold, Oil, Crypto.
Best timeframes: D1, W1. Indicateur

CryptonianEWAuditLibrary "CryptonianEWAudit"
Cryptonian Elliott Wave Audit /1. Owns production integrity auditing, compact event-state construction, universal-event aggregation and alert deduplication for the library-first Elliott architecture. The audit rules are migrated from Elliott Wave Engine 11.8b2 without changing Elliott or trade methodology.
addUniqueLimited(values, value, maximumSize)
Adds one unique string and caps the registry size.
Parameters:
values (array)
value (string)
maximumSize (int)
eventOnce(eventRegistry, eventCondition, eventName, sourceKey, maximumSize, deduplicate)
Generic event de-duplication helper. This preserves the 11.8b2 event
key contract: eventName | sourceKey | time.
Parameters:
eventRegistry (array)
eventCondition (bool)
eventName (string)
sourceKey (string)
maximumSize (int)
deduplicate (bool)
eventState(lastEvent, currentCountKey, lastInvalidCountKey, forecastKey, tradeId, countStarted, countRevised, countInvalidated, forecastNew, forecastRevised, forecastInvalidated, tradeWaiting, tradeActivated, tradeResolved, tradeCountInvalidExit)
Creates the shared Model.EventState. The code field is a bit-mask for
future audit/UI use; the named booleans remain the authoritative contract.
Parameters:
lastEvent (string)
currentCountKey (string)
lastInvalidCountKey (string)
forecastKey (string)
tradeId (string)
countStarted (bool)
countRevised (bool)
countInvalidated (bool)
forecastNew (bool)
forecastRevised (bool)
forecastInvalidated (bool)
tradeWaiting (bool)
tradeActivated (bool)
tradeResolved (bool)
tradeCountInvalidExit (bool)
tradeLifecycleEvent(resolution)
True when Trade's per-bar resolution contains any lifecycle event.
TP1 is intentionally included even when the trade remains live because 11.8b2
treats TP1 as an alert-worthy lifecycle event.
Parameters:
resolution (TradeResolution type from AYEHAN/CryptonianEWModel/1)
productionAudit(pivotPrices, pivotBars, pivotTimes, pivotTypes, pivotIds, nestedPivotPrices, nestedPivotTimes, fvgOriginalTops, fvgOriginalBottoms, fvgLiveTops, fvgLiveBottoms, fvgDirections, fvgBirthBars, tradeActivationCount, tradeResolutionCount, tradeProfitableResolutions, tradeLosingResolutions, tradeFlatResolutions, tradeCancelled, tradeWaitingCancellationCount, tradeTp1ReachedCount, tradeTp2ReachedCount, tradeLive, tradeSetupId, tradeDirection, tradeEntry, tradeStop, tradeTp1)
Runs the original 11.8b2 production audit and owns persistent issue
history internally. Call this once per host bar.
Parameters:
pivotPrices (array)
pivotBars (array)
pivotTimes (array)
pivotTypes (array)
pivotIds (array)
nestedPivotPrices (array)
nestedPivotTimes (array)
fvgOriginalTops (array)
fvgOriginalBottoms (array)
fvgLiveTops (array)
fvgLiveBottoms (array)
fvgDirections (array)
fvgBirthBars (array)
tradeActivationCount (int)
tradeResolutionCount (int)
tradeProfitableResolutions (int)
tradeLosingResolutions (int)
tradeFlatResolutions (int)
tradeCancelled (int)
tradeWaitingCancellationCount (int)
tradeTp1ReachedCount (int)
tradeTp2ReachedCount (int)
tradeLive (bool)
tradeSetupId (string)
tradeDirection (int)
tradeEntry (float)
tradeStop (float)
tradeTp1 (float)
universalEventRaw(events, committedPivotNow, impulseCompletedNow, correctionCompletedNow, freshFvgConfluenceNow, mtfContextChangedNow, mtfPrimaryGateReadyNow, tradeLifecycleNow, forecastAuditTargetHit, primaryW5TargetHitNow, productionStructuralGate, productionTradeActivationGate, productionAuditChangedNow)
Reproduces the 11.8b2 universal-event OR tree using the compact shared
EventState plus the few event families not represented by Model /1.
Parameters:
events (EventState type from AYEHAN/CryptonianEWModel/1)
committedPivotNow (bool)
impulseCompletedNow (bool)
correctionCompletedNow (bool)
freshFvgConfluenceNow (bool)
mtfContextChangedNow (bool)
mtfPrimaryGateReadyNow (bool)
tradeLifecycleNow (bool)
forecastAuditTargetHit (bool)
primaryW5TargetHitNow (bool)
productionStructuralGate (bool)
productionTradeActivationGate (bool)
productionAuditChangedNow (bool)
universalAlert(rawEvent, maximumSize, deduplicate)
Stateful universal alert. The registry lives in Audit /1 rather than
the indicator host. This preserves 11.8b2's ANY_EW_EVENT | bar_index | time key.
Call once per host bar, then feed .fire to the single alertcondition().
Parameters:
rawEvent (bool)
maximumSize (int)
deduplicate (bool)
processUniversalAlert(events, committedPivotNow, impulseCompletedNow, correctionCompletedNow, freshFvgConfluenceNow, mtfContextChangedNow, mtfPrimaryGateReadyNow, tradeLifecycleNow, forecastAuditTargetHit, primaryW5TargetHitNow, productionStructuralGate, productionTradeActivationGate, productionAuditChangedNow, maximumSize, deduplicate)
Convenience wrapper: aggregate + deduplicate in one host call.
Parameters:
events (EventState type from AYEHAN/CryptonianEWModel/1)
committedPivotNow (bool)
impulseCompletedNow (bool)
correctionCompletedNow (bool)
freshFvgConfluenceNow (bool)
mtfContextChangedNow (bool)
mtfPrimaryGateReadyNow (bool)
tradeLifecycleNow (bool)
forecastAuditTargetHit (bool)
primaryW5TargetHitNow (bool)
productionStructuralGate (bool)
productionTradeActivationGate (bool)
productionAuditChangedNow (bool)
maximumSize (int)
deduplicate (bool)
ProductionAuditState
Complete production-integrity result. Individual checks are retained so
Fields:
pass (series bool)
status (series string)
currentIssue (series string)
signature (series string)
unresolvedActivations (series int)
issueCount (series int)
lastIssue (series string)
changedNow (series bool)
pivotArraysAligned (series bool)
nestedArraysAligned (series bool)
fvgArraysAligned (series bool)
tradeAccounting (series bool)
tradeResultAccounting (series bool)
cancellationAccounting (series bool)
liveIdentity (series bool)
liveOrdering (series bool)
tp1Accounting (series bool)
UniversalEventState
Compact result from the universal Elliott event aggregator.
Fields:
raw (series bool)
fire (series bool)
key (series string) Bibliothèque

CryptonianEWRuntimeLibrary "CryptonianEWRuntime"
Cryptonian Elliott Wave Runtime /1. Owns adaptive MTF profile selection, compact context/bridge request expressions, lower-timeframe confirmation processing, MTF trade gates, bottom-up bootstrap assembly, Context EW forecast assembly, HTF trade-bridge request expressions, nested-pivot request expressions, production gates and final engine-state packing. Methodology is preserved from Elliott Wave Engine 11.8b2; this library is an architecture migration, not a rules rewrite.
autoContextTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
autoConfirmationTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
autoBridgeTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
profileState(enabled, autoProfile, manualContextTimeframe, manualExecutionTimeframe, manualConfirmationTimeframe, chartTimeframe, chartSeconds)
Builds the timeframe/profile portion of Model.MtfState.
It deliberately does not perform any data request.
Parameters:
enabled (bool)
autoProfile (bool)
manualContextTimeframe (string)
manualExecutionTimeframe (string)
manualConfirmationTimeframe (string)
chartTimeframe (string)
chartSeconds (int)
bridgeTimeframe(autoProfile, manualConfirmationTimeframe, chartSeconds)
Returns the active lower bridge timeframe used by the existing
bottom-up Elliott bootstrap. This remains separate because Model /1 MtfState
intentionally stores only Context / Execution / Confirmation.
Parameters:
autoProfile (bool)
manualConfirmationTimeframe (string)
chartSeconds (int)
bridgeTimeframeValid(bridgeTf, chartSeconds)
Parameters:
bridgeTf (string)
chartSeconds (int)
contextPack(mtfPivotStrength, atrLength, mtfMinimumSwingAtr, allowDiagonals, allowTruncation, truncationMinimumPct, contextPivotStrength, contextMinimumSwingAtr, candidateStarts, minimumNewCandidateScore, extensionThreshold, diagonalTolerance, invalidationMode)
Exact 11.8b2 higher-timeframe context packet.
mtfConfirmedSnapshot() retains the old trade-context methodology while
contextConfirmedSnapshot() retains the separate Context-EW forecast geometry.
Parameters:
mtfPivotStrength (int)
atrLength (simple int)
mtfMinimumSwingAtr (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
contextPivotStrength (int)
contextMinimumSwingAtr (float)
candidateStarts (int)
minimumNewCandidateScore (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
mtfContextState(pack)
Converts ContextPack's MTF branch into the shared DegreeState contract.
Parameters:
pack (ContextPack)
contextForecastDegreeState(pack)
Converts ContextPack's full Context-EW branch into DegreeState.
Parameters:
pack (ContextPack)
bridgeDegreeState(pivotStrength, atrLength, minimumSwingAtr, candidateStarts, minimumNewScore, allowDiagonals, allowTruncation, truncationMinimumPct, extensionThreshold, diagonalTolerance, invalidationMode)
Exact lower-bridge structural expression, object form.
Parameters:
pivotStrength (int)
atrLength (simple int)
minimumSwingAtr (float)
candidateStarts (int)
minimumNewScore (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
ltfMomentumSignal(fastLength, slowLength)
Exact lower-timeframe momentum expression used by 11.8b2.
Parameters:
fastLength (simple int)
slowLength (simple int)
nestedPivotEvent(strength, atrLength)
Exact Part 9.2 lower-degree confirmed pivot event expression.
Parameters:
strength (int)
atrLength (simple int)
htfTradeBridgeState(enabled, degreeEngineOn, secondaryEnabled, subSecondaryEnabled, primaryPivotStrength, secondaryPivotStrength, subSecondaryPivotStrength, atrLength, primaryMinimumSwingAtr, secondaryMinimumSwingAtr, subSecondaryMinimumSwingAtr, candidateStarts, minimumNewScore, allowDiagonals, allowTruncation, truncationMinimumPct, extensionThreshold, diagonalTolerance, invalidationMode, minimumModelScore, stopBufferAtr)
Native HTF trade bridge request expression. Candidate discovery,
first-seen geometry freezing and W2/W3/W4/W5 classification remain in Trade /13.
Parameters:
enabled (bool)
degreeEngineOn (bool)
secondaryEnabled (bool)
subSecondaryEnabled (bool)
primaryPivotStrength (int)
secondaryPivotStrength (int)
subSecondaryPivotStrength (int)
atrLength (simple int)
primaryMinimumSwingAtr (float)
secondaryMinimumSwingAtr (float)
subSecondaryMinimumSwingAtr (float)
candidateStarts (int)
minimumNewScore (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
minimumModelScore (float)
stopBufferAtr (float)
updateMtfState(previous, enabled, autoProfile, manualContextTimeframe, manualExecutionTimeframe, manualConfirmationTimeframe, chartTimeframe, chartSeconds, gateMode, requireExecutionTimeframe, ltfConfirmationMaximumAge, realtimeBar, context, ltfSignalValues, ltfSignalTimes, primaryDirection, correctionDirection)
Updates one persistent Model.MtfState object from the current profile,
requested context packet and request.security_lower_tf() signal/time arrays.
Pass a persistent initialized object from the host, then assign the returned object
back to it on every bar. The function intentionally ignores the realtime chart
bar's final LTF intrabar, exactly as 11.8b2 did.
Parameters:
previous (MtfState type from AYEHAN/CryptonianEWModel/1)
enabled (bool)
autoProfile (bool)
manualContextTimeframe (string)
manualExecutionTimeframe (string)
manualConfirmationTimeframe (string)
chartTimeframe (string)
chartSeconds (int)
gateMode (string)
requireExecutionTimeframe (bool)
ltfConfirmationMaximumAge (int)
realtimeBar (bool)
context (ContextPack)
ltfSignalValues (array)
ltfSignalTimes (array)
primaryDirection (int)
correctionDirection (int)
runtimeEvents(current, previous, primaryDirection, correctionDirection)
Small event helper that replaces host history expressions with object
history applied correctly by the caller: pass current and previous Runtime states.
Parameters:
current (MtfState type from AYEHAN/CryptonianEWModel/1)
previous (MtfState type from AYEHAN/CryptonianEWModel/1)
primaryDirection (int)
correctionDirection (int)
bootstrapState(chartPrimaryMissing, bridge, context, chartClose, chartAtr)
Parameters:
chartPrimaryMissing (bool)
bridge (DegreeState type from AYEHAN/CryptonianEWModel/1)
context (DegreeState type from AYEHAN/CryptonianEWModel/1)
chartClose (float)
chartAtr (float)
contextForecastState(enabled, contextTimeframeValid, context, armScore)
Parameters:
enabled (bool)
contextTimeframeValid (bool)
context (ContextPack)
armScore (float)
processNested(eventTypes, eventPrices, eventTimes, eventAtrs, barTimes, pivotPrices, pivotTimes, pendingType, pendingPrice, pendingTime, pendingAtr, lastEventTime, coverageStartTime, coverageEndTime, minimumSwingAtr, enabled)
Parameters:
eventTypes (array)
eventPrices (array)
eventTimes (array)
eventAtrs (array)
barTimes (array)
pivotPrices (array)
pivotTimes (array)
pendingType (int)
pendingPrice (float)
pendingTime (int)
pendingAtr (float)
lastEventTime (int)
coverageStartTime (int)
coverageEndTime (int)
minimumSwingAtr (float)
enabled (bool)
nestedLeg(pivotPrices, pivotTimes, coverageStartTime, coverageEndTime, engineOn, timeframeValid, t0, y0, t1, y1, direction, motive, diagonal, confirmed)
Parameters:
pivotPrices (array)
pivotTimes (array)
coverageStartTime (int)
coverageEndTime (int)
engineOn (bool)
timeframeValid (bool)
t0 (int)
y0 (float)
t1 (int)
y1 (float)
direction (int)
motive (bool)
diagonal (bool)
confirmed (bool)
structuralProductionGate(productionMode, confirmOnClose, barConfirmed)
Parameters:
productionMode (bool)
confirmOnClose (bool)
barConfirmed (bool)
tradeActivationProductionGate(productionMode, confirmOnClose, barConfirmed)
Parameters:
productionMode (bool)
confirmOnClose (bool)
barConfirmed (bool)
packEngineState(primary, secondary, subSecondary, correction, bootstrap, parent, degreeResolution, forecast, contextForecast, mtf, htfTrade, events)
Parameters:
primary (DegreeState type from AYEHAN/CryptonianEWModel/1)
secondary (DegreeState type from AYEHAN/CryptonianEWModel/1)
subSecondary (DegreeState type from AYEHAN/CryptonianEWModel/1)
correction (CorrectionState type from AYEHAN/CryptonianEWModel/1)
bootstrap (BootstrapState type from AYEHAN/CryptonianEWModel/1)
parent (ParentHypothesis type from AYEHAN/CryptonianEWModel/1)
degreeResolution (DegreeResolutionState type from AYEHAN/CryptonianEWModel/1)
forecast (ForecastState type from AYEHAN/CryptonianEWModel/1)
contextForecast (ContextForecastState type from AYEHAN/CryptonianEWModel/1)
mtf (MtfState type from AYEHAN/CryptonianEWModel/1)
htfTrade (TradeBridgePack type from AYEHAN/CryptonianEWModel/1)
events (EventState type from AYEHAN/CryptonianEWModel/1)
ContextPack
One request-safe higher-timeframe packet containing both legacy MTF
Fields:
mtfDirection (series int)
mtfStage (series int)
mtfQuality (series float)
mtfInvalidation (series float)
mtfDiagonal (series bool)
forecastDirection (series int)
forecastStage (series int)
forecastScore (series float)
forecastInvalidation (series float)
forecastDiagonal (series bool)
p0 (series float)
p1 (series float)
p2 (series float)
p3 (series float)
p4 (series float)
p5 (series float)
confirmedClose (series float)
RuntimeEvents
Small host-facing diagnostic packet for runtime transitions.
Fields:
contextChanged (series bool)
motiveGateReady (series bool)
correctionGateReady (series bool) Bibliothèque

Indicateur

Bibliothèque

Indicateur

Key Levels for FuturesWhat this does
Key Levels draws the ten reference prices that most intraday traders end up marking by hand
every morning: the previous month's high and low, the previous week's, the previous day's
regular-session high and low, the London session's, and the premarket's.
They are drawn automatically, they update themselves, and — the part that took the most work —
their tags stay on screen no matter where you scroll.
The ten levels
Tag
Level
Window
MH / ML
Previous month high and low
calendar month
WH / WL
Previous week high and low
calendar week
PDH / PDL
Previous day high and low
RTH 09:30–16:00 ET
LH / LL
London high and low
03:00–08:00 ET
PMH / PML
Premarket high and low
04:00–09:30 ET
Every window is an input, so if your definition of London or premarket differs from mine, change
it. ICT traders who want the London killzone instead of the full session can set it to
0200-0500.
Colour tells you two things at once
Most level indicators give you a pile of horizontal lines that all look alike, and you end up
squinting at the tag to work out what you are looking at. This one encodes the information in
the colour itself.
Hue tells you the timeframe. The palette runs cool to warm as the timeframe shortens:
Violet — monthly, the most structural
Blue — weekly
Cyan — previous day
Amber — London, overnight
Magenta — premarket, the most immediate
Shade tells you the side. Lighter for the high, deeper for the low.
So a deep violet line is the previous month's low and you know that at a glance, without
reading anything. Weekly and monthly levels also draw one step thicker than the intraday ones,
so the structural prices read first when the chart gets busy.
All ten colours, the line width, the tag size and the tag position are inputs. If you disagree
with the palette, it takes ten seconds to change.
Tags that do not run away
The usual approach puts level tags a fixed number of bars to the right of the last candle.
Scroll back to look at something and the tags vanish off the right edge, and you are left
guessing which line is which.
These tags anchor to chart.right_visible_bar_time, so they sit at the right edge of whatever
you are currently looking at. Scroll, zoom, jump back three weeks — the tags come with you and
stay readable. Each shows its abbreviation and, optionally, the exact price.
Weekly and monthly: settled or developing
Both default to the previous completed period — a level that is finished and will not move,
which is how PDH and PDL already behave and what most people mean when they say "last week's
high."
Flip either to Current and it tracks the developing period instead. Those draw dotted
rather than solid, so at a glance you can tell the difference between a level that is fixed and
one that can still be extended by the next candle.
On repainting
Nothing here repaints.
The previous week and month values are read with the standard offset and lookahead_on,
which returns the last completed period and nothing about the current one. The developing week
and month values are accumulated bar by bar on the chart series, so no higher-timeframe request
is involved at all. The session levels build up from the bars as they close.
A level appears when the data that defines it exists, and never changes afterwards.
Settings
Show / Hide — every pair independently. Ten levels is a lot on a quiet chart; turn off what
you are not using today.
Sessions — the London, premarket and RTH windows, plus previous-vs-current toggles for the
week and month.
Style — line width (weekly and monthly automatically draw one step heavier), how far the
tags sit in from the right edge, tag size from tiny to normal, and whether to include the price
in the tag.
Colors — all ten, individually.
Notes
Use an intraday chart. Session windows mean nothing on a daily or higher chart, and the
indicator will tell you so on screen.
On stocks, enable Extended Trading Hours or the premarket and London bars will not exist
and those levels will stay blank. Futures are fine as they are.
Session levels are calculated on the chart timeframe. On any timeframe whose bars line up
with the session boundaries — 1, 2, 3, 5, 10, 15, 30 and 60 minute all do, since the windows
start on the hour or the half hour — this is exact. On an unusual timeframe such as 7 minutes,
a level can be off by one bar's high or low.
Ten tags will overlap when levels cluster. Drop the tag size to Tiny or hide the pairs you
are not watching. Indicateur

Range Breakout by AVRange Compression Breakout
Volatility compression and expansion system
Range Compression Breakout automatically detects periods of low-volatility consolidation, draws and maintains the range in real time, and signals when price transitions into expansion.
How it works
Compression is measured relative to the market's own recent behavior rather than a fixed price distance. In Adaptive Percentile mode, a range qualifies when its high-low span sits among the quietest percentile of its recent history — so the same settings work across futures, FX, crypto, and equities without retuning. ATR Multiple mode is also available for a fixed volatility-based threshold.
Once a range is detected, the box is dynamic. While price stays contained, the box expands to absorb new highs and lows, capturing the full churn of the consolidation instead of resetting on every probe.
Signals
Break — price closes decisively beyond the boundary plus a buffer, with optional multi-bar confirmation and an optional volume-spike filter.
Wick Long / Wick Short — a failed probe outside the range that closes back inside on a long wick, confirmed by the following bar, indicating mean reversion toward the midline.
A cooldown period after each break prevents the box from immediately reforming on the expansion move.
Settings
Four preset profiles — Tight Ranges for low-timeframe scalping, Normal Ranges for intraday, Swing Trading for multi-day consolidations, and Options Selling for extended sideways chop — each configuring lookback, tightness, minimum bars, confirmation, and cooldown. Custom mode exposes all parameters. Box fill, borders, midline, and signal colors are fully adjustable, and each signal type toggles independently.
Alerts
Range Detected, Range Breakout, Breakout with Volume Confirmation, and Range Reversal.
Notes
Volume confirmation should be left off on spot FX and other symbols reporting tick-based volume. Diagnostic values including the range-to-ATR ratio and compression state are available in the Data Window for calibration. Indicateur

Multi Timeframe (i)FVG Analysis [BMT]Multi Timeframe (i)FVG Analysis
Fair value gaps and inverted fair value gaps on the chart timeframe and up to three higher timeframes, with a lifecycle per gap, relevance filters so a higher-timeframe view does not bury the chart, a directional bias that filters what you see and hear, and alerts.
WHAT IT DRAWS
A fair value gap (FVG) is a three-bar imbalance: a bullish FVG is the space between bar one's high and bar three's low when bar three's low is above bar one's high and bar two closed above it; a bearish FVG is the mirror. Each gap is a box from the bar that formed it, with an optional dotted midpoint line.
Every gap has three states, tracked separately on every enabled timeframe:
FVG : live, price has not closed through it.
iFVG (inverted) : price has closed through the far side. A bullish FVG that fails becomes a bearish iFVG and is redrawn in the iFVG color; a bearish FVG that fails becomes a bullish iFVG. The inverted level is drawn brighter than a plain FVG because it is the more actionable one.
Mitigated : price has closed back through an iFVG, and it is removed.
The mitigation test can be the close (default) or the high and low.
TIMEFRAMES
One row per timeframe: the chart timeframe plus H1, H2 and H3. Each row has its own timeframe, a Both / FVG / iFVG / Off switch, and a display filter. Off skips that timeframe entirely, including its data request. "auto" picks a higher timeframe paired to the chart timeframe (1 to 15, 5 to 60, 15 to 240, 60 to daily, and so on).
The defaults draw the chart timeframe only. Turn a higher timeframe on from its Off switch; the rows come preset to 15 minutes, 1 hour and 4 hours.
FILTERS
Three per timeframe.
All draws every live box.
N draws the newest N per side.
ATR draws only boxes within N ATRs of the current price, measured with that timeframe's own ATR(14) rather than the chart's, so "within 1 ATR" means the same thing on a 4-hour box and a 5-minute one.
The lookback is settable (300 bars by default). Boxes run a settable number of bars from where they formed, measured in chart bars by default so a higher-timeframe box does not take over a low-timeframe chart, or in the box's own timeframe if you prefer the longer projection. Extend Boxes runs every live box to the right edge, capped at a settable number of bars past the last bar.
BIAS
Neutral, Bullish or Bearish. It filters what is drawn and which alerts fire; every gap is still tracked underneath, because a gap against your bias is the one that may invert your way.
Bullish: bullish FVGs and bullish iFVGs drawn normally, bearish FVGs dimmed as inversion candidates, bearish iFVGs hidden. Alerts fire for a bullish FVG forming, a bearish FVG inverting, and price entering a bullish FVG. Bearish is the mirror. Neutral shows everything.
ALERTS
Six conditions in the alert dialog, each covering any enabled timeframe:
bullish FVG formed,
bearish FVG formed,
bullish FVG inverted,
bearish FVG inverted,
price entered a bullish FVG,
price entered a bearish FVG.
"Entered" fires the first time the chart bar trades inside a live gap.
Turn on "Send alert() messages" and choose "Any alert() function call" to get one message per event that names the symbol, the timeframe and the gap's levels. Events fire on every tracked gap whether or not the display filter is currently showing it. Without "Wait for bar close", a chart-timeframe gap is reported as soon as it appears intra-bar and can be withdrawn if the bar closes back over it.
THEME
Auto reads the chart background and picks light or dark. Light is the traditional green and red. Dark is built for a dark canvas: fills sit a little above the background so they do not fight the candles, and the two sides are matched in brightness rather than in transparency. Custom exposes the six colors, the border, and the counter-bias dim as inputs, since box colors are not on the Style tab.
STATUS TABLE
Optional, hidden by default. One row per timeframe with the filter in use and live counts of FVGs and iFVGs per side, plus the chart ATR.
NOTES
Every higher timeframe is one request.security call. A gap on a higher timeframe is detected when that timeframe's bar prints it, not on close, unless "Wait for bar close" is on.
Indicateur

KTI-G (Known Trends Index-Gold)█ OVERVIEW
Known Trends Index - Gold (KTI-G) plots, in a separate pane, a daily integer score that sums the calendar patterns in force on each trading day of a gold chart. The thesis is that gold's seasonal tendencies are better tested by letting the chart's own history define the profile, with a hard in-sample cutoff, than by hardcoding windows taken from published sources.
█ HISTORY / BACKGROUND
The index design follows the Known Trends Index that Jay Kaeppel described for the US equity market: each known seasonal trend contributes one point while it is active, and the sum is read as a favorable, neutral, or unfavorable climate rather than as a trade signal. This script applies that summation structure to gold and changes what the components are.
The literature on gold seasonality has not aged well at the level of specific months. A 2013 academic study of London gold prices from 1980 to 2010 found September and November to be the only months with positive and statistically significant returns. A 2024 replication reported a structural break around December 2010, after which those two months turned negative and January became the significant month. Practitioner windows for gold, including Kaeppel's own trading-day-of-year windows for gold futures, describe the same broad second-half and winter tendency with dates that differ by source.
The one part of the story with a physical mechanism is demand. Indian jewelry buying peaks around Diwali and the wedding season that follows it, and Chinese buying rises in the weeks before the lunar new year. Both festivals move on the lunar calendar, so fixed calendar dates describe them poorly.
The script therefore keeps three fixed components with a stated rationale (physical demand with lunar dates, turn of month, and September as a contested pattern), keeps Kaeppel's windows only as an optional comparison overlay, and gives the largest role to an empirical profile learned from the chart with no lookahead.
█ HOW IT WORKS
All date arithmetic runs on GMT-noon timestamps built from the bar's year, month, and day, so the logic is independent of the chart's exchange timezone. A US market holiday calendar is generated for the current year plus one year on either side (New Year's Day, Martin Luther King Day from 1998, Presidents Day, Good Friday by the Gregorian Easter algorithm, Memorial Day, Juneteenth from 2022, Independence Day, Labor Day, Thanksgiving, Christmas). A trading day is a weekday not in that calendar.
Two counters are maintained per bar: the trading day of month (TDOM) and the trading day of year (TDY). TDY is computed by counting calendar trading days between consecutive bars, so it stays correct across missing bars in the chart data.
The components are computed in this order.
1. Empirical profile. Two arrays of 252 slots accumulate the sum and count of daily returns (close divided by prior close, minus one) by TDY. On each bar the component is scored first, using only what has already been accumulated, and the bar's own return is added afterward. The score compares the smoothed profile for the bar's TDY against the unconditional mean daily return: the smoothed value is the mean return over a circular window of plus or minus the smoothing half-width in TDY slots. The score is +1 when the smoothed value exceeds the unconditional mean by the threshold, -1 when it falls below the mean by the threshold, and 0 otherwise. No score is produced until the accumulated count reaches the minimum number of years multiplied by 250. Accumulation stops after the training end date when the freeze option is on; otherwise it continues as an expanding window. TDY values above 252 fold into slot 252.
2. Physical demand. Diwali is computed for the prior and current year as the new moon nearest November 1, taken as a date in India Standard Time. Chinese New Year is computed for the current and next year as the second new moon after December 21 of the preceding year, taken as a date in Beijing time. New moon instants come from the Meeus mean-phase series with the fourteen largest periodic corrections. The component is +1 from 15 calendar days before Diwali through 45 days after it, and from 30 calendar days before Chinese New Year through the day before it. Overlapping windows do not add.
3. Turn of month. +1 on the last two trading days of a month and the first trading day of the next month.
4. September. The user-set September weight on every bar in September, 0 by default.
5. Kaeppel overlay. Off by default. When on, +1 for TDY 250 through year end and TDY 1 through 38, -1 for TDY 39 through 134, +1 for TDY 135 through 188, -1 for TDY 189 through 249.
KTI-G is the sum of the five components. With default settings the possible range is -3 to +4.
On the last bar of a daily chart the script walks every calendar day from January 1 of the current year through February 28 of the next year, rebuilding TDOM and TDY along the way, evaluates the same component function for each future trading day after the current bar, and draws one box per nonzero value in the right margin. The projection uses the profile arrays as they stand on the last bar. The boxes are deleted and redrawn once per new trading day.
█ HOW TO USE
Apply the script to a daily chart of a gold futures continuous contract, a gold bullion fund, or a gold miner proxy. The code is written for daily bars because every component is defined per trading day; on any other timeframe the main plot returns na and the table shows a notice.
The column plot is the index. Teal columns are readings of 2 or higher, gray columns are 0 or 1, red columns are -1 or lower. Two dotted horizontal lines mark the boundaries at 1.5 and -0.5, and a solid line marks zero. These zone cutoffs are the author's choice and are not taken from any published source; they should be re-examined after inspecting the distribution of readings on the chosen symbol.
The semi-transparent boxes to the right of the last bar are the projected index for each future trading day through February 28 of next year, colored by the same zone rule. A small label marks the first projected day. Zero-value future days draw no box.
The table in the top right shows the current reading, the value and sign of each active component, the profile deviation from the mean in basis points per day, the TDY, whether the bar is in-sample or out-of-sample relative to the training end, the number of training days accumulated, and the computed dates of the current year's Diwali and next year's Chinese New Year.
Eight hidden series are available in the Data Window and in chart data export: each of the five components, the profile deviation in basis points, the TDY, and an in-sample flag. These exist so that the components active during any drawdown can be inspected bar by bar.
The intended use is diagnostic. With the freeze option on, every bar after the training end date is a clean out-of-sample test of whether the seasonal shape learned from the earlier period persisted on that symbol. Comparing the frozen result against the expanding-window result shows whether the shape moved.
█ SETTINGS
Show active components (on): draws the table.
Project through Feb 28 of next year (on): draws the forward projection boxes and label.
Empirical profile
• Empirical TDY profile (on): includes the empirical component in the sum.
• Training end (2010-12-31): last date whose return is accumulated into the profile when freezing is on. The default is the break date reported in the 2024 replication study.
• Freeze profile at training end (on): stops accumulation after the training end. Off gives an expanding window that keeps learning.
• Smoothing half-width (10): number of TDY slots on each side of the current slot averaged together, 0 to 40.
• Threshold vs. mean (3.0 bps/day): the profile must differ from the unconditional mean by this amount to score +1 or -1.
• Minimum years before scoring (10): the empirical component returns 0 until this many years of daily returns, at 250 per year, have been accumulated.
Fixed components
• Physical demand, lunar Diwali + CNY (on).
• Turn of month (on).
• September weight (0): -1, 0, or +1 applied on September bars.
• Kaeppel TDY windows overlay (off).
█ WHAT MAKES IT ORIGINAL
The script combines four things that are not, to the author's knowledge, found together in a published gold seasonality indicator.
First, the seasonal profile is learned from the chart with no lookahead and a user-set in-sample cutoff, so the out-of-sample record of gold seasonality on any symbol can be read directly from the plot rather than inferred from a fixed set of published dates.
Second, the demand component uses computed lunar dates for Diwali and Chinese New Year, generated in the script from a new-moon series, instead of fixed Gregorian windows that drift against the festivals by up to a month.
Third, the trading-day-of-year and trading-day-of-month counters are built from a generated holiday calendar and count calendar trading days between bars, so the index is robust to gaps in the symbol's data and can be projected forward for dates that have no bars yet.
Fourth, every component is exposed as its own series so that a reading can be decomposed on any historical bar, which is the step needed to find out which pattern was active when the index was wrong.
█ NOTES / LIMITATIONS
• The empirical component needs at least the minimum years of daily history before the training end date to score at all. A symbol whose data begins after the training end never scores that component while freezing is on; lower the minimum, move the training end, or turn freezing off. The table's training-day count shows how much history has been used.
• The main plot is na on any timeframe other than daily, and the table displays a notice.
• There is no request.security call and no lookahead. The empirical score on a bar uses only returns from earlier bars. The projection boxes and table are rebuilt on the last bar only; historical columns do not repaint.
• The forward projection is date-bounded at February 28 of the year after the chart's last bar. It rolls forward each calendar year and is not extended beyond that date.
• The projection uses the profile as it stands on the last bar. With freezing off, the projected values can change from day to day as the profile continues to learn.
• Trading-day math uses a US exchange holiday calendar. Gold futures trade on a calendar that differs by a day in some years, and special unscheduled closures are not modeled, so TDY values can be offset by one relative to a futures exchange count in those years.
• Diwali and Chinese New Year dates are computed astronomically and can differ from the observed festival by one day. Rare lunar leap-month cases for Chinese New Year are not handled.
• The zone thresholds and the demand window lengths are the author's constructions. Published seasonal patterns have shown decay after publication, and nothing in this script should be read as a forecast.
• The script uses up to 500 boxes for the projection; a projection window of roughly 300 trading days stays within that ceiling. Per-bar loops are bounded by the smoothing window (at most 81 slots) and the calendar-day gap between consecutive bars. Indicateur
