OPEN-SOURCE SCRIPT

IDWM Master Structure

128
Executive Summary
The IDWM Master Structure is a Multi-Timeframe (MTF) trading tool designed to force discipline by aligning traders with the "Parent" trend. It functions by locking onto the "Completed Auction" of a higher timeframe candle (like a Daily or Weekly bar) and projecting that structure onto your lower timeframe chart. Its primary goal is to define the "Dealing Range"—the hard boundaries where value was previously established—so you don't get lost in the noise of smaller price movements.

1. The Principle of Completed Auctions (Hierarchy)
Most technical indicators curve dynamically with every price tick. This script acts differently because it relies on "Settled Arguments." A closed Daily candle represents a finished battle between buyers and sellers; the High and Low are the historical results of that battle.

To enforce this, the script automatically selects a "Parent" timeframe based on your view:

Scalping (charts below 15 minutes) uses the 4-Hour Auction.
Intraday trading (15 minutes to 4 Hours) uses the Daily Auction.
Swing trading (Daily chart) uses the Weekly Auction.

2. Liquidity Pools & The Sticky Range
The High and Low lines drawn by the indicator are not just support and resistance; they represent Liquidity Pools. In market theory, stop-losses (Sell Stops below Lows, Buy Stops above Highs) accumulate at these edges.

Smart money often pushes price just past these lines to grab this liquidity (a "Stop Hunt") before reversing direction. To account for this, the script uses a "Sticky Range" mechanism. It refuses to redraw the box simply because price touched the line. Instead, it uses an Average True Range (ATR) Buffer. A new structure is only formed if the candle closes decisively outside the range plus this volatility buffer. This ensures you are trading real breakouts, not liquidity sweeps.

3. Internal Range Mechanics (Premium vs. Discount)
Inside the Master Box, the script applies Equilibrium Theory to help with trade location.
The most important internal line is the Equilibrium (EQ), which marks the exact 50% point of the range.

Premium Zone (Above EQ): Price is mathematically "expensive" relative to the recent range. Algorithms generally look to establish Short positions here.

Discount Zone (Below EQ): Price is considered "cheap." Algorithms generally look to establish Long positions here.

It also plots the Master Open, which acts as a "Line in the Sand." If price is currently trading above the Master Open, the higher timeframe candle is Green (Bullish), suggesting longs have a higher probability. If below, the candle is Red (Bearish).

4. Wick Theory (Failed Auctions)
The script places special emphasis on the wicks of the Master Candle because a wick represents a "Failed Auction"—a price level the market tried to explore but ultimately rejected.

The indicator highlights the background of the wick area (from the High to the Body). On a retest, these zones often act as supply or demand blocks because the market remembers the previous failure.

It also calculates the "Consequent Encroachment," which is the 50% midpoint of the wick. The rule of thumb here is that if a candle body can close past 50% of a wick, the rejection is nullified, and price will likely travel to fill the entire wick.

5. Energy Expansion (Breakout Targets)
Market energy transfers from Consolidation (inside the box) to Expansion (the breakout). When the price finally breaks the "Sticky Range" (confirming via the ATR buffer), the script projects where that energy will go.

It uses the height of the previous range to calculate Fibonacci extensions. Specifically, it targets the 1.618 Extension, often called the "Golden Ratio." This is a statistically significant level where expansion moves tend to exhaust themselves and reverse.

6. Safety Protocol: Live Detection
A dashboard monitors the state of the parent candle. If the text turns Magenta with a warning symbol, it means the Higher Timeframe candle is "Live" (still forming).

Trading off a live structure is considered higher risk because the "Auction" isn't finished—the High or Low can still shift. The safest approach is to trade when the dashboard indicates a standard, locked, historical structure.

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

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