PROTECTED SOURCE SCRIPT

Heikin Ashi EMA Re-Entry (Touch + Trend)

15
What it does
This tool highlights potential re-entry spots during a trend using Heikin Ashi no-wick streaks and an EMA-based trend/chop filter. It looks for a brief touch of the higher-timeframe EMA (pullback), then a bullish/bearish HA streak on the correct side of that EMA with the short-term trend aligned.

How signals are built (plain English)

Calculates HA candles and detects streaks of N consecutive bars with no opposite wick (configurable).

Uses a user-selected timeframe EMA20 as the “HTF anchor” and EMA9 as a short-term trend filter.

Requires price to touch the HTF EMA since the last signal (pullback condition).

Validates that the HA streak is on/above (bullish) or on/below (bearish) the HTF EMA in the last 1–2 bars.

Applies a slope threshold to the HTF EMA to avoid flat/choppy conditions.

Plots a background highlight and a BUY/SELL label when all conditions align.

Includes alert conditions for automation.

Inputs

Consecutive HA Candles: length of the HA streak with no opposite wick.

20 EMA Length / Timeframe: parameters for the higher-timeframe anchor EMA.

Flat EMA Slope Threshold: minimum absolute slope of the HTF EMA; values near zero filter chop.

Short-Term EMA (Trend Filter): length of the fast EMA (default 9).

Bullish/Bearish Background Colors: visual highlights for valid zones.

Signals & Alerts

Bullish Re-Entry: HA no-lower-wick streak, on/above HTF EMA recently, EMA9 > HTF EMA, EMA slope not flat, and a recent touch of the HTF EMA.

Bearish Re-Entry: HA no-upper-wick streak, on/below HTF EMA recently, EMA9 < HTF EMA, EMA slope not flat, and a recent touch of the HTF EMA.

Alerts: Bullish Re-Entry Alert and Bearish Re-Entry Alert fire when the respective conditions are true.

Notes & tips

Works on any symbol/timeframe; the EMA timeframe input allows simple multi-timeframe anchoring.

“Touch” is tracked internally and resets after a signal, helping avoid repeated marks without a fresh pullback.

Heikin Ashi smoothing can shift visuals vs. raw candles; always confirm with your risk rules and execution plan.

This script does not execute trades; it only provides visual and alert signals.

Disclaimer
This indicator is for education and analysis only. It does not constitute financial advice, and it does not guarantee performance. Always test on historical data and use proper risk management.

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.