Wednesday, October 15, 2025

Bullish Gap Up Detection | Tradingview.com

Here is the indicator. 

 This indicator is designed to identify gap-up trading opportunities in real-time. A gap-up occurs when the opening price of a stock is higher than the previous day's high, signaling potential bullish momentum.


Key Features:

Gap Detection: The indicator detects when today’s open is above yesterday’s high and remains above that level throughout the trading session.

Visual Alerts: A triangle shape appears below the price bar when a gap-up condition is met, providing clear visual signals for traders to consider potential entry points.

EMA Analysis: The indicator incorporates two Exponential Moving Averages:
10-day EMA: Used to assess short-term price trends and help determine if the stock is currently in an upward momentum phase.
20-day EMA: Provides additional context for medium-term trends, ensuring that gaps are only considered when the stock is in a favorable trend.
The indicator confirms that the 10-day EMA is above the 20-day EMA, indicating bullish sentiment in the market.

This indicator can be used in various trading strategies to capitalize on momentum following gap-up openings. It’s suitable for day traders and swing traders looking for entry points in trending stocks.

//@version=5
indicator("Bullish Gap Up Detection", overlay=true)

// Input parameters for EMAs
emaShort = 10
emaMedium = 20

// Calculate EMAs
ema10 = ta.ema(close, emaShort)
ema20 = ta.ema(close, emaMedium)

// Conditions for EMA trends (used in logic but not plotted)
emaConditionDaily = ema10 > ema20
priceAboveEma10 = close > ema10

// Detect upward or flat trend (for gap up condition)
// Flat trend: defined as low volatility (low price variation)
flatTrend = ta.stdev(close, 20) < ta.stdev(close, 50)

// Upward trend: defined by 10-day EMA above 20-day EMA and price above 10-day EMA
upwardTrend = emaConditionDaily and priceAboveEma10

// Gap up detection: Only if today's open is above yesterday's high and remains above it
gapUp = open > high[1] and close > high[1]

// Plot the gap up signals as triangleup without text
plotshape(gapUp, title="Gap Signal", location=location.belowbar, color=color.blue, style=shape.triangleup, size=size.small)

No comments:

Post a Comment