OPEN-SOURCE SCRIPT
CRR Birgua HUD (HH-HL / LL-LH)

CRR Birgua HUD (HH-HL / LL-LH) essentially does three things:
Detects price structure using pivots.
Marks highs as:
HH = Higher High
LH = Lower High
Marks lows as:
HL = Higher Low
LL = Lower Low
It uses a pivot length (pivotLen, default 3) to find these turning points.
Measures the “Birgua” (impulse correction).
In a downtrend:
When an LH appears, it measures how much the retracement rose from the last low to that LH.
In an uptrend:
When an HL appears, it measures how much the retracement fell from the last high to that HL.
It calculates two things:
% correction (birgua_lastPct)
ATR multiples (birgua_lastAtrMult)
It only considers it “valid” if:
% correction ≥ birgua_minBirguaPc (e.g., 25%)
ATR multiple ≥ birgua_minAtrMult (e.g., 0.5)
If valid: it labels it with OK; otherwise: SMALL.
Creates a HUD and a “Birgua Score.”
Calculates a Birgua Score (0–100):
Starts at 50.
If the last Birgua was at an HL (strong bullish), it increases from 50.
If it was at an LH (strong bearish), it decreases from 50.
It can draw a line at the bottom with this score if you enable Show Birgua Score.
At the top of the screen, it displays a HUD with:
Direction: BULL (HL), BEAR (LH), or NEUTRAL.
B: XX.X% (Birgua percentage).
ATR: X.XX (ATR multiples).
Strength: Strong / Weak / N/A based on the minimums you defined.
🧠 Quick Use:
HL + strong Birgua → probable bullish continuation.
LH + strong Birgua → probable bearish continuation.
The HUD summarizes whether the last correction was strong or weak and on which side (bull or bear).
Detects price structure using pivots.
Marks highs as:
HH = Higher High
LH = Lower High
Marks lows as:
HL = Higher Low
LL = Lower Low
It uses a pivot length (pivotLen, default 3) to find these turning points.
Measures the “Birgua” (impulse correction).
In a downtrend:
When an LH appears, it measures how much the retracement rose from the last low to that LH.
In an uptrend:
When an HL appears, it measures how much the retracement fell from the last high to that HL.
It calculates two things:
% correction (birgua_lastPct)
ATR multiples (birgua_lastAtrMult)
It only considers it “valid” if:
% correction ≥ birgua_minBirguaPc (e.g., 25%)
ATR multiple ≥ birgua_minAtrMult (e.g., 0.5)
If valid: it labels it with OK; otherwise: SMALL.
Creates a HUD and a “Birgua Score.”
Calculates a Birgua Score (0–100):
Starts at 50.
If the last Birgua was at an HL (strong bullish), it increases from 50.
If it was at an LH (strong bearish), it decreases from 50.
It can draw a line at the bottom with this score if you enable Show Birgua Score.
At the top of the screen, it displays a HUD with:
Direction: BULL (HL), BEAR (LH), or NEUTRAL.
B: XX.X% (Birgua percentage).
ATR: X.XX (ATR multiples).
Strength: Strong / Weak / N/A based on the minimums you defined.
🧠 Quick Use:
HL + strong Birgua → probable bullish continuation.
LH + strong Birgua → probable bearish continuation.
The HUD summarizes whether the last correction was strong or weak and on which side (bull or bear).
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。