OPEN-SOURCE SCRIPT
Updated

5 DMA (Close Above) Buy

539
5 DMA (Close Above) Buy
This indicator identifies momentum-based breakout signals when a green candle closes above the 5-day Simple Moving Average (5DMA) for the first time after price was previously below it.

🔹 Signal Logic:

The script plots a green arrow below the candle when a bullish candle (close > open) closes above the 5DMA

Signals are only shown once per trend leg

The signal resets only after price closes back below the 5DMA

🔔 Built-in Alerts:
Use the included alert condition: "Buy Alert" to be notified in real time whenever a valid signal occurs.

This tool is ideal for traders seeking simple price-action confirmations to catch early trend continuation after pullbacks.

Release Notes
V2, does not create entry point for Intraday....just in case :)
Release Notes
V2.1
Release Notes
V2.1
Release Notes
📝 Suggested Long-Form Description for Publishing
📌 Description (for Public Indicator Page)

This indicator is a refined entry system built around short-term momentum and trend confluence.
It highlights potential bullish setups where price demonstrates strength after a period of retracement.

Signal Criteria:

A candle must close below the 5-day SMA to "reset" the signal logic.

After the reset, a green candle (close > open) must:

Close above the 5DMA

Have the 9EMA below or touching the close (indicating early trend support)

📈 The script plots:

A green/red 5DMA, based on whether it’s rising or falling

A light blue 9EMA (trend baseline)

Green arrows below candles that trigger a valid signal

🔁 This is part of a constantly evolving signal system.
We are actively improving this tool through ongoing testing, confluence integration, and user feedback.
Future updates may include:

Optional filters (RSI, MACD, volume)

Exit logic for strategy mode

Multi-timeframe confluence

✅ Built for traders seeking clean, reliable entry conditions based on price structure and moving average alignment.
Release Notes
📈 5DMA Optional HMA Entry Signal – Precision-Based Momentum Trigger
Author: YourUsername
Script Version: 5
Category: Trend-Following / Reversal Timing / Entry Optimization

🔍 Overview:
The 5DMA Optional HMA Entry indicator is a refined price-action entry tool built for traders who rely on clean trend alignment and precise timing. This script identifies breakout-style entry points when price gains upward momentum relative to short-term moving averages — specifically the 5-day Simple Moving Average (5DMA) and an optional Hull Moving Average (HMA).

Whether you're swing trading stocks, scalping ETFs like UVXY or VXX, or looking for pullback recovery entries, this tool helps time your long entries with clarity and flexibility.

⚙️ Core Logic:
Primary Condition (Always On):
🔹 Close must be above the 5DMA – ensuring upward short-term momentum is confirmed.

Optional Condition (Toggled by User):
🔹 Close above the HMA – adds slope-responsive trend filtering for smoother setups. Enable or disable via checkbox.

Bonus Entry Filter (Optional):
🔹 Green Candle Wick Breakout – optional pattern logic that detects bullish momentum when the high pierces above both MAs, with a green body.

Reset Mechanism:
🔁 Signal resets only after price closes back below all active MAs (5DMA and HMA if enabled), reducing noise and avoiding repeated signals during chop.

🧠 Why This Works:
This indicator captures the kind of setups that professional traders look for:

Momentum crossovers without chasing late.

Mean reversion snapbacks that align with fresh bullish moves.

Avoids premature entries by requiring clear structure above moving averages.

Optional HMA filter allows adaptability: turn it off during choppy markets or range conditions, and on during trending environments.

🔔 Features:
✅ Adjustable HMA Length

✅ Enable/Disable HMA Filter

✅ Optional Green Wick Breakout Detection

✅ Visual “Buy” label plotted below qualifying bars

✅ Real-time Alert Conditions for automated trading or manual alerts

🎯 Use Cases:
VIX-based ETFs (e.g., UVXY, VXX): Catch early breakouts aligned with volatility spikes.

Growth Stocks: Time pullback entries during bullish runs.

Futures/Indices: Combine with macro levels for intraday scalps or swing setups.

Overlay on Trend Filters: Combine with RSI, MACD, or VWAP for confirmation.

🛠️ Recommended Settings:
For smooth setups in volatile names, use:

HMA Length: 20

Keep green wick filter ON

For fast momentum trades, disable the HMA filter to act on 5DMA alone.

⭐ Final Thoughts:
This script is built to serve both systematic traders and discretionary scalpers who want actionable signals without noise or lag. The toggleable HMA feature lets you adjust sensitivity depending on market conditions — a key edge in adapting to volatility cycles.

Perfect for those who value clean, non-repainting entries rooted in logical structure.

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.