OPEN-SOURCE SCRIPT

Last Candle Close Above/Below Alert

2 664
How it works:

The script calculates whether the close of each candle is above or below the close of the previous candle, same as the initial code.

isLastBar is checked and the last candle to be created is the only one that will receive the condition from this variable.

If a highlight is needed it will use this criteria and apply the correct color for the last candle only, and any other candle will not be colored.

If alerts are enabled they will only work for the last bar too.

How to Use:

Add this script to your TradingView chart.

Use the inputs to set the desired timeframe to analyze, whether you want an alert for candles closing above or closing below and the background colors.

The last candle will highlight yellow when the close is higher or lower than the previous candle.

Alerts will be triggered on the last candle if you enable the alert conditions.

Key Features:

Timeframe Selection: You can choose a different timeframe in the settings.
Candle Highlight: Candles that close above or below the previous candle are highlighted in yellow.

Alerts: Alerts are configurable to trigger for "Close Above" or "Close Below" conditions, based on your selection in the settings.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.