OPEN-SOURCE SCRIPT
Telah dikemas kini

NQ Fractal Buddy

3 685
NQ Fractal Buddy

NQ Fractal Buddy is a research-driven toolkit designed specifically for NQ/MNQ traders using the Fractal Model.

The project started from my own interest in trading the Fractal Model and wanting to investigate its behaviour quantitatively using historical Nasdaq futures data.

After reconstructing the model programmatically across a large historical sample, I wanted to take the research further.

Rather than only looking at whether a Fractal Model sequence continued to develop, I wanted to answer two practical questions:

Once a qualifying C2 has completed, how far has NQ historically tended to expand during the developing C3/C4 sequence?

And:

How often has the C2 protected extreme survived through C3 to reach C4, and how often has it remained intact throughout C4?

Those questions eventually developed into the two main statistical features of NQ Fractal Buddy:

Expected Expansion and Structural Expectancy.

The rest of the indicator is built around those features to provide the higher-timeframe structure, points of interest and lower-timeframe tools I use when analysing the Fractal Model.


The Fractal Model

The Fractal Model brings together ideas used in ICT-style price-action analysis and Candle Range Theory (CRT) to study how liquidity and candle structure can develop across multiple timeframes.

A major part of the model is understanding the relationship between a sequence of higher-timeframe candles, commonly referred to as C1, C2, C3 and C4.

NQ Fractal Buddy is designed around this workflow.

The different components of the indicator are therefore not intended to be a collection of unrelated indicators. Each has a specific role within the same analysis process.

HTF candles provide the higher-timeframe map. C2/C3 identification helps visualise the developing fractal sequence. CISD can provide lower-timeframe structural confirmation for execution. FVGs, Volume Imbalances, swings and equilibrium provide additional areas of interest within that structure.

Expected Expansion and Structural Expectancy then add a statistical layer derived from historical NQ behaviour.

The idea is to bring the structure, execution tools and historical context together in one workspace.


Expected Expansion

Expected Expansion is the main research-driven component of NQ Fractal Buddy.

I reconstructed a large historical sample of NQ fractal events and investigated what happened after a qualifying C2 completed.

Rather than simply asking whether the structure succeeded or failed, the research measured the favorable price expansion that occurred during the subsequent developing C3/C4 sequence before the model's defined structural failure or observation endpoint.

From those historical observations, Fractal Buddy derives an expansion distribution represented by:

P25 · P50 · P75 · P90

These are historical favorable-expansion quantiles.


Understanding P25, P50, P75 and P90

One intuitive way to understand these levels is to ask what proportion of the corresponding historical observations expanded at least that far.

P25 — approximately 75% of the historical observations reached or exceeded this amount of favorable expansion.

P50 — approximately 50% reached or exceeded this amount. This represents the median historical favorable expansion.

P75 — approximately 25% reached or exceeded this amount.

P90 — approximately 10% reached or exceeded this amount.

For example, if Fractal Buddy displays a P50 Expected Expansion of 73 points, that means approximately half of the corresponding historical observations produced at least 73 points of favorable expansion under the defined measurement rules, while approximately half produced less.

Likewise, P25 represents a more commonly observed amount of expansion, while P75 and P90 represent progressively larger and historically less common expansions.

This can be particularly useful when comparing the projected distribution with levels already identified through your own technical analysis.

For example, a liquidity objective sitting around P25 occupies a very different location within the historical expansion distribution than an objective sitting around P75 or beyond P90.


What the levels do NOT mean

There is an important distinction between a historical quantile and a forward-looking probability.

P25 does not mean that the current setup has a guaranteed or independently estimated 75% probability of reaching P25.

Likewise, P50 does not mean the current trade has a 50% probability of reaching P50, and P90 does not mean the current setup has a 10% probability of reaching P90.

Instead, those percentages describe the historical distribution used to construct the model: approximately 75%, 50%, 25% and 10% of the corresponding historical observations reached or exceeded P25, P50, P75 and P90 respectively.

The levels therefore provide statistical context for the developing structure rather than a guarantee or precise forecast of what the current C3/C4 sequence will do.


How I Use Expected Expansion

The expansion levels become particularly interesting when they overlap with something already present in the trader's analysis.

That could include:

  • External liquidity
  • Previous highs or lows
  • A Fair Value Gap
  • Another PD Array
  • A higher-timeframe level
  • Another independently identified point of interest


For example, if the historical median expansion sits near a liquidity objective already identified through your own analysis, the statistical model provides another piece of context around that area.

Expected Expansion can therefore be used as a framework for potential objectives or simply as an additional layer of information alongside an existing strategy.

It is not an automatic target generator or trade signal.


Structural Expectancy

Expected Expansion answers the question:

"How far did comparable structures historically expand?"

Structural Expectancy addresses a different question:

"How often did the C2 protected extreme survive as the fractal continued to develop?"

Fractal Buddy displays two measurements:

Reach C4
The historical probability that the C2 protected extreme survives through C3 and remains intact at the open of C4.

C4 Intact
The historical probability that the C2 protected extreme remains intact through the entire C4 candle and its close.

The displayed probabilities are conditioned on characteristics of the completed C2 using models developed from historical NQ observations.


Structural probability is not trade probability

This distinction is important.

If Fractal Buddy displays:

Reach C4 ~70%

that does not mean a trade has a 70% probability of winning.

It means that historical structures with the corresponding characteristics preserved the C2 protected extreme through C3 to the opening of C4 at approximately that rate under the model definition.

Likewise, C4 Intact measures structural survival through C4. It is not a win rate, expected profitability figure or guarantee about future price action.

This information can be considered alongside Expected Expansion and the trader's own directional bias, execution criteria and risk management.


Higher-Timeframe Candles

The HTF candle display provides the visual framework for the indicator.

Multiple higher timeframes can be displayed alongside the execution chart, allowing the developing candle structure to be observed without constantly switching chart timeframes.

This is particularly useful with the Fractal Model because the trader may be analysing a higher-timeframe C2/C3/C4 sequence while simultaneously looking for execution on a much lower timeframe.

The HTF display makes it easier to see where the current lower-timeframe price action sits inside the larger developing candle.

The displayed timeframes are configurable so traders can build the hierarchy appropriate to their own analysis.


C2 / C3 Identification

Fractal Buddy includes tools for identifying and visualising the C2/C3 structure directly within the HTF candle framework.

These are intended to make the developing Fractal Model sequence easier to follow and provide the structural context used by Expected Expansion and Structural Expectancy.

They are not automatic trade signals.


CISD

Change in State of Delivery (CISD) is commonly used as a lower-timeframe confirmation or execution mechanism by traders using this style of analysis.

Fractal Buddy includes CISD functionality so that lower-timeframe structural changes can be analysed alongside the higher-timeframe fractal rather than requiring a separate indicator.

This creates a workflow such as:

HTF structure → C2 completes → developing C3/C4 context → LTF confirmation/execution

The trader remains responsible for deciding whether a setup is valid and whether a trade should be taken.


Fair Value Gaps & Volume Imbalances

Fractal Buddy can display Fair Value Gaps (FVGs) and Volume Imbalances (VIs), including within the higher-timeframe candle framework.

These help visualise areas of imbalance within the developing structure that a trader may consider potential areas of interest, reaction or draw on price.

Their inclusion is particularly useful when an imbalance overlaps with an Expected Expansion level or another independently identified liquidity objective.


Swings & Equilibrium

Swing structure and equilibrium tools provide additional context for understanding where price is trading within the developing range.

They can help identify relevant structural extremes and the relationship between current price and the range being analysed.

Again, these features are included because they support the same Fractal Model workflow rather than functioning as separate trading systems.


ICT Time Anchors

The indicator also includes commonly referenced ICT time anchors, including configurable New York reference times.

Time is an important part of this style of analysis, particularly when observing how a developing higher-timeframe candle behaves through different sessions.

Displaying these references directly on the execution chart allows the trader to consider time and price together while monitoring the developing fractal structure.


Bringing It All Together

The intended workflow is not:

"The indicator says buy or sell."

Instead, a trader might:

Identify a higher-timeframe fractal structure → evaluate the completed C2 → establish their own directional thesis → identify liquidity and other points of interest → use their preferred lower-timeframe confirmation such as CISD → consult Expected Expansion for historical expansion context → consult Structural Expectancy for historical information about survival of the C2 protected extreme.

This is why the different components have been combined into one indicator.

The HTF candles provide the map. The structural tools help identify what is occurring within that map. CISD provides an execution framework for traders who use it. Expected Expansion and Structural Expectancy provide the historical statistical context.

A trader using another methodology can also use the statistical components independently as an additional layer of context.

The goal of Fractal Buddy is to provide more information about the structure already developing in front of the trader, not to replace the trader's analysis.


Research & Validation

The statistical components of NQ Fractal Buddy were developed from historical Nasdaq futures (NQ) data.

The underlying research database contains NQ 1-minute data extending from 2010 through 2026. The core Fractal Model reconstruction used a 2019–2025 research period and produced large samples across the timeframes studied — including 52,164 reconstructed 15-minute events and 12,611 1-hour events.

The research involved programmatically reconstructing historical Fractal Model events, measuring their subsequent structural behaviour and favorable expansion, and investigating which characteristics of the completed C2 contained useful information about what followed.

Multiple timeframes and model variations were investigated, but a timeframe was not included in the production statistical tools simply because an in-sample result looked interesting.

The models were not simply fitted to all available observations and then reported on the same data. Development and validation were separated during the research process.

For Expected Expansion, the final production models for 15-minute, 1-hour and 4-hour structures were subsequently tested against unseen forward data before being frozen for production use.

Structural Expectancy likewise uses production-supported models for 15-minute, 1-hour and 4-hour structures.

Other timeframes were researched during development but were not automatically promoted into the production indicator where the evidence did not meet the project's production requirements.

The purpose of this process was to reduce the risk of treating an interesting historical relationship as useful simply because it happened to fit the data used to discover it.

The final indicator deliberately uses frozen models rather than continuously changing the statistical rules to fit recent observations.

Where the tool uses fallback behaviour because of data or contract-roll conditions, that state is identified in the interface rather than silently presented as equivalent to the normal model.


Designed Specifically for NQ / MNQ

The statistical research behind Expected Expansion and Structural Expectancy was developed using NQ futures data.

The resulting statistical outputs should therefore be treated as NQ/MNQ-specific.

The fact that a similar visual candle pattern occurs in another market does not establish that the same statistical relationships apply there.


Important Limitations

NQ Fractal Buddy is an analytical and research tool, not a complete trading system.

Historical relationships can change, and historical behaviour does not guarantee future behaviour.

Expected Expansion does not predict where price must trade.

P25/P50/P75/P90 are historical favorable-expansion quantiles, not calibrated target-hit probabilities for the current setup.

The historical sample used to construct those quantiles means that approximately 75%, 50%, 25% and 10% of the corresponding observations reached or exceeded P25, P50, P75 and P90 respectively. That historical relationship should not be interpreted as a guarantee that a new observation will behave identically.

Reach C4 and C4 Intact are historical structural-survival probabilities, not trade win probabilities.

CISD, FVGs, imbalances, swings, liquidity concepts and other structural tools require interpretation and should not be treated as automatic entry signals.

No statistical reading from the indicator removes the need for independent analysis and risk management.


Code Lineage & Attribution

NQ Fractal Buddy was developed from my earlier open-source TradingView project, HTF Structure Lens, published by SuvoConquers.

HTF Structure Lens historically incorporated portions of the higher-timeframe candle visualization framework from "ICT HTF Candles (fadi)" by fadizeidan. The referenced original work by fadizeidan was licensed under the Mozilla Public License 2.0. Credit and thanks to fadizeidan for that original open-source work.

The higher-timeframe rendering architecture used in the current NQ Fractal Buddy implementation was subsequently independently rewritten. NQ Fractal Buddy nevertheless retains and extends functionality developed through HTF Structure Lens, so that historical project lineage is acknowledged here.

NQ Fractal Buddy substantially extends that earlier project with original NQ Fractal Model research and implementation, including the historical reconstruction and analysis behind Expected Expansion and Structural Expectancy, the resulting production models, and their integration into the broader Fractal Model workflow described above.

Fractal Model, ICT/CRT, CISD, Fair Value Gap, Volume Imbalance and related market-analysis concepts predate this project. Their names are used descriptively and no ownership of those underlying concepts is claimed.

fadizeidan is not affiliated with and does not endorse NQ Fractal Buddy.
Nota Keluaran
Daily Expected Expansion fix

Fixed an issue that prevented Daily Expected Expansion from displaying on recent dates. Daily EE will now continue to calculate P25/P50/P75 expansion levels from qualifying completed Daily C2s.

The underlying model and frozen research values are unchanged.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.