PROTECTED SOURCE SCRIPT
Zaktualizowano Alert on Price Close Above/Below

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:
2. With “Show exact close price” enabled, messages append the actual close:
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
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)
Informacje o Wersji
OverviewThis 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)
Informacje o Wersji
Open+Close Confirmation ModeAdded 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)
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.