OPEN-SOURCE SCRIPT
Reversal Probability Rows [LuxAlgo]

The Reversal Probability Rows tool identifies historical price zones where reversals have frequently occurred and calculates the statistical probability of a reversal happening at those levels based on the distribution of pivot points.
🔶 USAGE
The indicator segments the price range of a specified lookback period into several horizontal rows. Within each row, it calculates the density of historical tops (Pivot Highs) and bottoms (Pivot Lows) relative to the total number of pivots found within the entire lookback range.
Users can interpret the probability boxes to the right of the price as follows:
🔹 Bearish Reversal Zones (Red Boxes)
When the current price is below a specific row, the indicator treats that row as potential resistance. The percentage displayed represents the probability of a bearish reversal occurring there, based on how many historical tops fell within that row compared to the total number of tops in the lookback period.
🔹 Bullish Reversal Zones (Green Boxes)
When the current price is above a specific row, the indicator treats that row as potential support. The percentage represents the probability of a bullish reversal, based on how many historical bottoms fell within that row compared to the total number of bottoms in the lookback period.
🔹 Current Price Row
When the current price is moving within a specific row, the indicator identifies whether that zone has historically been more prone to tops or bottoms. It will display the dominant reversal type (the higher probability of the two) and color the box accordingly (Red for tops, Green for bottoms).
🔶 DETAILS
The script segments the "Range Period" (defined by the highest high and lowest low of the lookback) into equidistant rows. It then scans the lookback period for pivot points based on the "Pivot Sensitivity" setting.
The probability calculation follows a distribution-based approach:
The visual intensity (transparency) of the boxes is determined by the "weight" of the row; rows containing the highest frequency of pivots appear more solid, while rows with fewer historical reversals appear more transparent.
🔶 SETTINGS
🔹 Calculation Settings
🔹 Visualization Settings
🔶 USAGE
The indicator segments the price range of a specified lookback period into several horizontal rows. Within each row, it calculates the density of historical tops (Pivot Highs) and bottoms (Pivot Lows) relative to the total number of pivots found within the entire lookback range.
Users can interpret the probability boxes to the right of the price as follows:
🔹 Bearish Reversal Zones (Red Boxes)
When the current price is below a specific row, the indicator treats that row as potential resistance. The percentage displayed represents the probability of a bearish reversal occurring there, based on how many historical tops fell within that row compared to the total number of tops in the lookback period.
🔹 Bullish Reversal Zones (Green Boxes)
When the current price is above a specific row, the indicator treats that row as potential support. The percentage represents the probability of a bullish reversal, based on how many historical bottoms fell within that row compared to the total number of bottoms in the lookback period.
🔹 Current Price Row
When the current price is moving within a specific row, the indicator identifies whether that zone has historically been more prone to tops or bottoms. It will display the dominant reversal type (the higher probability of the two) and color the box accordingly (Red for tops, Green for bottoms).
🔶 DETAILS
The script segments the "Range Period" (defined by the highest high and lowest low of the lookback) into equidistant rows. It then scans the lookback period for pivot points based on the "Pivot Sensitivity" setting.
The probability calculation follows a distribution-based approach:
Probability % = (Number of Pivots of Type X in Row / Total Number of Pivots of Type X in Lookback) * 100
The visual intensity (transparency) of the boxes is determined by the "weight" of the row; rows containing the highest frequency of pivots appear more solid, while rows with fewer historical reversals appear more transparent.
🔶 SETTINGS
🔹 Calculation Settings
- Range Period: The number of historical bars used to define the high/low range and gather statistical data.
- Number of Rows: The vertical resolution of the visualization. More rows create smaller, more specific price zones.
- Pivot Sensitivity: The number of bars required on each side of a high or low to classify it as a reversal point (Pivot).
🔹 Visualization Settings
- Show Pivot Markers: Toggles the visibility of the "•" markers on the chart that represent the historical tops and bottoms used in the calculation.
- Box Width (Bars): Adjusts the horizontal width of the probability boxes projected to the right of the current bar.
- Row Highlight Color: The background color and border style of the calculation grid area.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.