OPEN-SOURCE SCRIPT

SMA Zone with Breakouts/Tests 1.0.

1 159
This indicator plots a dynamic “SMA Zone” between two simple moving averages (one applied to lows, one to highs) and highlights key interaction points with the zone:

Breakouts

Bull Break: price closes above the upper SMA

Bear Break: price closes below the lower SMA

Requires confirmation via either above-average volume or an unusually wide bar (spread > ATR) closing near its extreme

Tests & Retests

After a breakout, the first re-entry into the zone edge is labeled “Test,” subsequent re-entries are numbered “Retest,” “2nd Retest,” etc.

Zone Weakening: each additional Test/Retest signifies diminished zone strength—fewer reliable boundaries remain (Traditional S/R theory)
Alerts

Fires a unified “Zone Signal” alert on every Break, Test, and Retest (set condition to “Any alert() function call”).

Disclaimer:

This is not financial advice and should not be used as a standalone trading signal.

It’s designed to draw your attention to important price-zone interactions so you can manually tune in.

The logic can be further enhanced or combined with other indicators/algorithms as part of a more complex trading system.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.