OPEN-SOURCE SCRIPT

Pivot Levels with EMA Trend

625
📌 Trend Change Levels with EMA Trend

✨ Description:

This TradingView script identifies clean trend change levels based on 1-hour structure shifts and filters them to keep only those not invalidated. It follows the "Jake Ricci" method, each level is printed at the beginning of the candle that changes the trend, on a 1 hour chart. For precision, make sure to exclude after/pre market and only use the levels on regular hours charts.

It includes dynamic EMAs (9, 50, 200), intraday VWAP, the daily open level printed, and a visual trend label based on EMA(9) slope.

Designed for intermediate traders, it helps build bias, manage entries, and avoid false setups by focusing on clean, reactive levels that the market respects.

🔧 Core Logic:
On the 1H chart, the script compares current and previous closes to detect trend direction. If the trend flips (e.g., up to down), the open of the candle that caused the flip becomes a candidate level.
Only levels that remain untouched by future candle closes are plotted — this filters out “weak” levels that price already violated (which means, a candle closes after passing through the level).

These levels become key S/R zones and often act as reaction points during pullbacks, traps, and liquidity sweeps.

The idea is to check how the price reacts to those levels. Usually there's a clean retest of the level. After that, if the price continues in that direction, it tends to reach the following level.

🔹 Included Tools:

🟣 Trend Change Levels (1H):
Fixed horizontal lines based on confirmed shifts in trend, shown only when not broken.

📉 EMAs (9 / 50 / 200):
Visibility can be set per timeframe. Use for trend context.

📍 EMA Trend Label:
Shows \"UP\", \"DOWN\", or \"RANGE\" based on EMA(9) slope.

🔵 VWAP (Intraday Reset):
Real-time volume-weighted average price that resets daily. Useful for fair value zones and reversion plays.

🟠 Daily Open Line:
Plot of the current day’s open. Used for intraday directional bias. Usually: DO NOT take longs below the Open Print, DO NOT take shorts above it.

📊 ATR Table:
Displays current ATR multiplier on the chart. It's useful to understand if the market is expanding or not.


📈 How to Use It (Strategy):

1. Start on the 1H chart to generate levels.
Only the open of candles that reversed trend are considered — and only if future candles didn’t close through them. I suggest manually adding horizontal lines to mark again the levels, so that they stick to all the timeframes.

2. Use the trend label to decide your bias — \"UP\" for long setups, \"DOWN\" for shorts. Avoid trading against the slope.

3. Switch to the 5m chart and wait for price to approach a plotted level. These are often used for manipulation, retests, or clean reversals.

4. Look for confirmation: rejection candles, break-and-retest, strong engulfing candles, or traps above/below the level. ALWAYS check the price action around the level, along with the volume.

5. Check if VWAP or an EMA is near the level. If yes, the confluence strengthens the trade idea.

6. Use the ATR value to understand if the market is expanding (candles are bigger than the ATR). You don't want to stay in a slow and ranging trade.

✅ Example Entry Flow:

1. On the 1H chart, note a trend change level printed recently.
2. Check the current trend label — if it says \"UP,\" prefer longs.
3. Wait for price to retrace toward the level.
4. On the 5m, look for a bullish engulfing candle or trap setup at the level.
5. Check if VWAP and EMA(50) are near. If yes, execute the trade.
6. Set stop just under the low of the candle prior to your entry. Ideally, a retracing candle.

To be clear: imaging to be LONG, you wait for a retracement that should touch your level. You wait for a candle that resumes the LONG trend, enter when it breaks the high of the previous candle (sill in retracement), you place your stop under the candle prior to your entry.

Notes:
  • No repainting — levels only show up after confirmed shifts.
  • Removes broken levels for chart clarity and reliability.
  • Helps spot high-probability pullback zones and fakeouts.
  • Perfect confluence tool to support price action, SMC, or EMA strategies.
  • Works across multiple timeframes with customizable inputs.


👤 Ideal For:

  1. Intraday traders looking for reactive entry points and direction confirmation.
  2. Swing traders wanting to pinpoint continuation zones or reversal pivots.



🚨 Final Note:<br> This indicator doesn’t generate buy/sell signals. It improves your trade filtering by identifying areas the market already respected and reacting to them with price action. Combine it with your own system, test it in replay, and use screenshots to document setups.

📌 If used with discipline, this becomes a precision tool — not a signal generator.

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.