Price Channel Marker

* 🔴 Red Line – Marks the high of the most recent red candle (bearish) whose high is just below the current price. It selects the red candle with the high closest in price to the current close, and ensures it is from a valid historical context (ignoring recent highs above the current price).
* 🟢 Green Line – Marks the low of the most recent green candle (bullish) whose low is just above the current price, also selected based on proximity to the current price.
Together, these two lines define a potential price compression zone or "trap" area — showing where price may currently be trading between recent supply (red candle) and demand (green candle). The lines update dynamically and extend into the future to help visualize breakout or rejection levels.
Use Cases:
* Spot potential breakout zones.
* Define short-term support and resistance.
* Filter for entries in range-bound or squeeze conditions.
Customization:
* Adjustable lookback range (up to 5000 bars).
* Colors and line style are easily customizable.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.