PROTECTED SOURCE SCRIPT

Daily SMA Gate + IHS(15m RS) - Early Signal

37
Description

This script combines Daily SMA gating with a 15-minute Inverse Head & Shoulders (IHS) Right Shoulder (RS) detector to create a clean 0/1 signal for pullback opportunities.

How It Works

Daily SMA Gate (orange line)

Checks if price is trading above the 50-day SMA and within a set % of the 20-day SMA.

This creates a higher-timeframe bullish filter so signals only appear when price structure aligns with trend context.

15-Minute RS Detector (green line)

Scans intraday price action for an IHS-style Right Shoulder pivot (L1–L2–L3 pattern).

Fires the RS signal as soon as the pivot is confirmed, instead of waiting for extra bar delays.

Combined Signal (blue line)

Only turns 1 (ON) when both conditions are met:
✅ Daily SMA gate passes
✅ RS pattern detected on the 15-minute timeframe

This produces early, high-quality signals ideal for pullback screening.

Usefulness

Designed as a screener for pullback entries in trending markets.

Works well for traders who combine higher-timeframe trend filters with intraday pattern triggers.

Helps avoid chasing extended moves by highlighting RS pivots near key daily averages.

Settings

Daily SMA Gate

SMA(50) length and SMA(20) length can be adjusted.

Within % of SMA(20) lets you widen/narrow the proximity filter.

Option to toggle between using the live daily bar or confirmed daily closes only.

RS Detector

Pivot L / Pivot R control swing sensitivity.

De-dup window avoids duplicate signals (optional, not plotted here).

ATR-based vs %-based tolerance (Use ATR tol for L3~L1).

Min bars between pivots for pattern quality.

Plots

Blue = final combined signal (main output)

Orange = Daily SMA gate only

Green = RS(15m) only

⚡ Best Practice:
Use the blue combined signal as your main screening tool, and toggle the green/orange lines if you want to debug why a signal did/didn’t fire.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.