OPEN-SOURCE SCRIPT

SMA Zone with Breakouts/Tests 1.0.

703
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.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.