PROTECTED SOURCE SCRIPT
Actualizado

Alert on Price Close Above/Below

49
Overview
This indicator sends alerts when a candle closes above or below a user-defined price level on a chosen timeframe. Unlike standard price alerts that can trigger mid-candle, this script confirms on bar close, making it more reliable for breakout/breakdown use cases.

How it works
- Select the evaluation timeframe (e.g., 15m, 1H, 4H).
- Set a Primary Level and choose the direction (Above or Below).
- Optionally enable a Secondary Level with its own direction.
- The alert triggers only when the chosen timeframe’s candle closes beyond your level(s).
- Dynamic alert messages include the timeframe and can optionally include the exact closing price.

Alert message style
1. Dynamic alerts (when you choose “Any alert() function call”) use this format:
{TF} {TICKER} Close Above {Price}
{TF} {TICKER} Close Below {Price}

2. With “Show exact close price” enabled, messages append the actual close:
{TF} {TICKER} Close Above {Price} (Close={ActualClose})


Setup steps
1. Add the indicator to your chart on the symbol/timeframe you want to monitor.
2. Open the settings:
- Set “Evaluate On Timeframe” (this is the timeframe used to confirm closes).
- Choose “Primary Direction” (Above/Below) and enter the “Primary Level.”
- Optional: enable and configure the Secondary Level (direction + price).
3. Create a TradingView alert:
- Click the Alert button in the top toolbar.
- In “Condition,” pick this indicator and select “Any alert() function call” to receive dynamic messages.
- In “Interval,” select the timeframe same as the indicator.
- Optional: rename the alert for clarity.
4. Save. You’ll receive alerts when conditions are met.

Examples
4H BTCUSDT Close Above 100000
1H ETHUSDT Close Below 4000 (Close=3900)

Notas de prensa
Overview
This indicator sends alerts when a candle closes above or below a user-defined price level on a chosen timeframe. Unlike standard price alerts that can trigger mid-candle, this script confirms on bar close, making it more reliable for breakout/breakdown use cases.

How it works
- Select the evaluation timeframe (e.g., 15m, 1H, 4H).
- Set a Primary Level and choose the direction (Above or Below).
- Optionally enable a Secondary Level with its own direction.
- The alert triggers only when the chosen timeframe’s candle closes beyond your level(s).
- Dynamic alert messages include the timeframe and can optionally include the exact closing price.

Alert message style
1. Dynamic alerts (when you choose “Any alert() function call”) use this format:
{TF} {TICKER} Close Above {Price}
{TF} {TICKER} Close Below {Price}


2. With “Show exact close price” enabled, messages append the actual close:
{TF} {TICKER} Close Above {Price} (Close={ActualClose})


Setup steps
1. Add the indicator to your chart on the symbol/timeframe you want to monitor.
2. Open the settings:
- Set “Evaluate On Timeframe” (this is the timeframe used to confirm closes).
- Choose “Primary Direction” (Above/Below) and enter the “Primary Level.”
- Optional: enable and configure the Secondary Level (direction + price).
3. Create a TradingView alert:
- Click the Alert button in the top toolbar.
- In “Condition,” pick this indicator and select “Any alert() function call” to receive dynamic messages.
- In “Interval,” select the timeframe same as the indicator.
- Optional: rename the alert for clarity.
4. Save. You’ll receive alerts when conditions are met.

Examples
4H BTCUSDT Close Above 100000
1H ETHUSDT Close Below 4000 (Close=3900)
Notas de prensa
Open+Close Confirmation Mode

Added a new option: Open+Close mode.

In this mode, an alert will only trigger if both the opening price and the closing price of the candle are above/below your chosen level.

This provides a stronger breakout confirmation by filtering out candles that only “wick” above or below but fail to sustain the move.

Example

Close Only mode:
4H BTCUSDT opens at 99,000, closes at 101,000, level = 100,000

✅ Alert triggers (close above 100,000)

Open+Close mode:
4H BTCUSDT opens at 99,000, closes at 101,000, level = 100,000

❌ No alert (open was below 100,000)
✅ Alert only triggers if both open ≥ 100,000 and close ≥ 100,000

Alert Messages
Close Only → 4H BTCUSDT Close Above 100,000 (Close=101,000)
Open+Close → 4H BTCUSDT Open+Close Above 100,000 (Close=101,000)

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.