OPEN-SOURCE SCRIPT
Bitgak [Osprey]

🟠 INTRODUCTION
Bitgak, translated as "Oblique Angle" in Korean, is a strategy used by multi-hundred-million traders in Korea, sometimes more heavily than Fibonacci retracement.
It is a concept that by connecting two or more pivot points on the chart and creating equidistant parallel lines, we can spot other pivot points. As seen in the example, a line at a different height but with the same angle spots many pivot points.
This indicator spots pivot points on the chart and tests all different possible Bitgak lines with a brute-force method. Then it shows the parallel line configuration with the most pivots hitting it. You may use the lines drawn on the chart as possible reversal points.
It is best to use on Day and Week candles. In the very short range of time, the noise makes it hard to capture meaningful data.
🟠 HOW TO USE

The orange dots are the major pivot points (you can set the period of the long-term pivot) upon which the lines are built.
Change the "Manual Lookback Bars" from 300 to a meaningful period upon your inspection.
"Hit Tolerance %" means how close a pivot needs to be to the line to be considered as having touched the line.

If the line is too narrow, which is not very useful, you may consider increasing the "Long-term Pivot Bars" and experimenting with different settings for Channel Lines and Heuristics.
The result:

"Top Anchors to Test (L)" is how many L highest peaks and L lowest troughs should be weighed heavily when testing the lines. That is, with L = 1, the algorithm will reward the Bitgak lines that touch 1 highest peak and 1 lowest trough. It doesn't make much intuitive sense, so I suggest just testing it out.
🟠 HOW IT WORKS
Step 1: Pivot Detection
The indicator runs two parallel detection systems:
Short-term pivots (default: 7 bars on each side) - Captures minor swing highs/lows for detailed analysis
Long-term pivots (default: 17 bars on each side) - Identifies major structural turning points
These pivots form the foundation for all channel calculations.
Step 2: Anchor Point Selection
From the detected long-term pivots, the algorithm identifies:
The L highest peaks (default L=1, meaning the single highest peak)
The L lowest troughs (default L=1, meaning the single lowest trough)
These become potential "anchor points" for channel construction. Higher L values test more combinations but increase computation time.
Step 3: Channel Candidate Generation
For support channels: Every pair of troughs becomes a potential base line (A-B)
For resistance channels: Every pair of peaks becomes a potential base line (A-B)
The algorithm then tests each peak (for support) or trough (for resistance) as pivot C.
Step 4: Optimal Spacing Calculation
For each A-B-C combination, the algorithm calculates:
Unit Spacing = (Distance from C to A-B line) / Multiplier
It tests multipliers from 0.5 to 4.0 (or your custom range), asking: "If pivot C sits on the 1.0 line, what spacing makes the most pivots hit other lines?"
Step 5: Scoring & Selection
Each configuration is scored by counting how many pivots fall within tolerance (default 1% of price) of any parallel line in the range [-4.0 to +4.0]. The highest-scoring channel is drawn on your chart.
Bitgak, translated as "Oblique Angle" in Korean, is a strategy used by multi-hundred-million traders in Korea, sometimes more heavily than Fibonacci retracement.
It is a concept that by connecting two or more pivot points on the chart and creating equidistant parallel lines, we can spot other pivot points. As seen in the example, a line at a different height but with the same angle spots many pivot points.
This indicator spots pivot points on the chart and tests all different possible Bitgak lines with a brute-force method. Then it shows the parallel line configuration with the most pivots hitting it. You may use the lines drawn on the chart as possible reversal points.
It is best to use on Day and Week candles. In the very short range of time, the noise makes it hard to capture meaningful data.
🟠 HOW TO USE
The orange dots are the major pivot points (you can set the period of the long-term pivot) upon which the lines are built.
Change the "Manual Lookback Bars" from 300 to a meaningful period upon your inspection.
"Hit Tolerance %" means how close a pivot needs to be to the line to be considered as having touched the line.
If the line is too narrow, which is not very useful, you may consider increasing the "Long-term Pivot Bars" and experimenting with different settings for Channel Lines and Heuristics.
The result:
"Top Anchors to Test (L)" is how many L highest peaks and L lowest troughs should be weighed heavily when testing the lines. That is, with L = 1, the algorithm will reward the Bitgak lines that touch 1 highest peak and 1 lowest trough. It doesn't make much intuitive sense, so I suggest just testing it out.
🟠 HOW IT WORKS
Step 1: Pivot Detection
The indicator runs two parallel detection systems:
Short-term pivots (default: 7 bars on each side) - Captures minor swing highs/lows for detailed analysis
Long-term pivots (default: 17 bars on each side) - Identifies major structural turning points
These pivots form the foundation for all channel calculations.
Step 2: Anchor Point Selection
From the detected long-term pivots, the algorithm identifies:
The L highest peaks (default L=1, meaning the single highest peak)
The L lowest troughs (default L=1, meaning the single lowest trough)
These become potential "anchor points" for channel construction. Higher L values test more combinations but increase computation time.
Step 3: Channel Candidate Generation
For support channels: Every pair of troughs becomes a potential base line (A-B)
For resistance channels: Every pair of peaks becomes a potential base line (A-B)
The algorithm then tests each peak (for support) or trough (for resistance) as pivot C.
Step 4: Optimal Spacing Calculation
For each A-B-C combination, the algorithm calculates:
Unit Spacing = (Distance from C to A-B line) / Multiplier
It tests multipliers from 0.5 to 4.0 (or your custom range), asking: "If pivot C sits on the 1.0 line, what spacing makes the most pivots hit other lines?"
Step 5: Scoring & Selection
Each configuration is scored by counting how many pivots fall within tolerance (default 1% of price) of any parallel line in the range [-4.0 to +4.0]. The highest-scoring channel is drawn on your chart.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.