OPEN-SOURCE SCRIPT

Black Tie Murrey Math MTF

679
Murrey Math grid implementation. Computes a price-octave grid divided into 1/8 levels within a "trading frame" sized to the recent price range. The grid auto-anchors to mathematically clean reference numbers based on the price's order of magnitude.

LEVELS

8/8 Top of frame, major resistance
7/8 6/8 Weak resistance and momentum levels
5/8 Top of fair-value zone, sell-bias area
4/8 Frame midpoint, magnet level in ranging markets
3/8 Bottom of fair-value zone, buy-bias area
2/8 1/8 Weak support and momentum levels
0/8 Bottom of frame, major support
+/- 1/8 to 3/8 Frame overshoots, statistical reversal zones outside the main frame

ALGORITHM

The frame is built in five steps. First, the indicator picks a "scale reference": a clean round number based on the price's order of magnitude. Second, it computes how many times to divide that scale by 8 to arrive at a unit comparable to the current range. Third, it derives a power-of-2 multiplier so the frame width matches the actual range. Fourth, it anchors the frame to the price midpoint by rounding to the nearest multiple of the half-frame. Fifth, if the actual range overshoots the computed frame by more than 25 percent, it retries with adjusted parameters.

This produces a stable grid that doesn't repaint on small price moves but adapts cleanly when price breaks into a new octave.

USAGE

Use 8/8 and 0/8 as primary range boundaries.
Use 5/8, 4/8, and 3/8 as fair-value reference points.
Use the extreme levels (+/- 3/8) as exhaustion zones for mean reversion setups.

SETTINGS

Calculation Timeframe lets you compute the grid on a higher timeframe and project it onto your execution chart.
Lookback Bars controls how much history is scanned. Default 64 is balanced; lower values adapt faster, higher values produce more stable grids.
Use Candle Bodies filters wicks out of the range calculation, which produces cleaner levels on noisy instruments.
Each of the 15 levels has individual visibility, color, and style controls.

The implementation is original. The mathematical principles behind Murrey Math are public domain (T. Henning Murrey, "Murrey Math Trading Frame", 1995).

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.