OPEN-SOURCE SCRIPT

Daily Lows and Highs with Fading on Breach (RVOL Filter)

79
Daily Highs and Lows with RVOL Filter and Fading Lines

This TradingView Pine Script draws horizontal lines at the daily lows of high RVOL red candles and at the daily highs of high RVOL green candles. Lines are colored red for lows and green for highs. The line width dynamically adjusts based on RVOL levels (thicker lines for stronger volume). When price breaches these levels on the next day, the lines gradually fade in opacity and decrease in width, visually indicating multiple breaches without removing the lines entirely. The script includes customizable RVOL threshold, line style, and width settings, plus debug information for easy monitoring.

Script Criteria Explanation:

The script draws horizontal lines based on daily candles with high relative volume (RVOL).

For Red Candles (Close < Open):

If the daily RVOL is above the user-defined threshold (default 2), a red line is drawn at the daily low price.

The line width depends on the RVOL level:

Width 5 if RVOL is between 2 and 3.

Width 10 if RVOL is above 3.

For Green Candles (Close > Open):

If the daily RVOL is above the threshold, a green line is drawn at the daily high price.

The line width follows the same RVOL logic as red lines:

Width 5 if RVOL is between 2 and 3.

Width 10 if RVOL is above 3.

Line Behavior on Breach:

When the next day’s price breaches these lines (low breaches red lines, high breaches green lines), the lines:

Increase their transparency (fade) by 20% each breach, up to a maximum of 80% transparency (making the line 20% visible).

Decrease their width by 1 with each breach, down to a minimum width of 1.

Lines are never removed; they only visually fade and shrink as they get breached multiple times.

Lines extend 100 bars into the future (to the right) to stay visible over time.

The user can customize the RVOL threshold, line style (solid/dotted/dashed), and base line width in the settings.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。