August_Supertrader

Williams %R OB/OS Candle Coloring

### Description for TradingView Publication

**Title:** Williams %R OB/OS Candle Coloring

**Description:**

This Pine Script indicator enhances the visibility of market conditions by changing the color of the candlesticks based on the Williams %R values. It helps traders quickly identify overbought and oversold conditions without the need to display the Williams %R line or any additional bands.

**How It Works:**
- The script calculates the Williams %R value using a specified lookback period (default is 14 days).
- It then compares the Williams %R value against predefined overbought and oversold levels.
- **Overbought Condition:** When the Williams %R value is greater than the upper band level (-20 by default), the candlestick color changes to blue.
- **Oversold Condition:** When the Williams %R value is less than the lower band level (-80 by default), the candlestick color changes to yellow.

**How to Use:**
1. **Input Parameters:**
- **Length:** The lookback period for calculating Williams %R (default is 14).
- **Upper Band Level:** The threshold for overbought conditions (default is -20).
- **Lower Band Level:** The threshold for oversold conditions (default is -80).

2. **Candlestick Coloring:**
- Blue candles indicate potential overbought conditions.
- Yellow candles indicate potential oversold conditions.

This indicator is designed to provide a visual cue directly on the price chart, making it easier for traders to spot extreme market conditions at a glance.

**Concepts Underlying the Calculation:**
Williams %R, developed by Larry Williams, is a momentum indicator that measures overbought and oversold levels. It compares the current closing price to the highest high and lowest low over a specified period. By using color-coded candles, traders can quickly assess market conditions and make informed decisions without the need to interpret an additional indicator line.

This script is particularly useful for traders who prefer a clean chart but still want to leverage the insights provided by the Williams %R indicator.

---

### ภาษาไทย:

**คำอธิบาย:**

สคริปต์ Pine Script ตัวนี้ช่วยเพิ่มการมองเห็นสภาวะตลาดโดยการเปลี่ยนสีของแท่งเทียนตามค่าของ Williams %R ช่วยให้เทรดเดอร์สามารถระบุสภาวะการซื้อเกินและขายเกินได้อย่างรวดเร็วโดยไม่ต้องแสดงเส้น Williams %R หรือเส้นระดับเพิ่มเติมใดๆ

**วิธีการทำงาน:**
- สคริปต์คำนวณค่าของ Williams %R โดยใช้ช่วงเวลาที่กำหนด (เริ่มต้นที่ 14 วัน)
- จากนั้นเปรียบเทียบค่าของ Williams %R กับระดับการซื้อเกินและขายเกินที่กำหนดไว้
- **สภาวะการซื้อเกิน:** เมื่อค่าของ Williams %R มากกว่าระดับ Upper Band (-20 เริ่มต้น) สีของแท่งเทียนจะเปลี่ยนเป็นสีน้ำเงิน
- **สภาวะการขายเกิน:** เมื่อค่าของ Williams %R น้อยกว่าระดับ Lower Band (-80 เริ่มต้น) สีของแท่งเทียนจะเปลี่ยนเป็นสีเหลือง

**วิธีการใช้งาน:**
1. **ค่าพารามิเตอร์:**
- **Length:** ช่วงเวลาที่ใช้คำนวณ Williams %R (เริ่มต้นที่ 14)
- **Upper Band Level:** ระดับการซื้อเกิน (เริ่มต้นที่ -20)
- **Lower Band Level:** ระดับการขายเกิน (เริ่มต้นที่ -80)

2. **การเปลี่ยนสีแท่งเทียน:**
- แท่งเทียนสีน้ำเงินระบุถึงสภาวะการซื้อเกิน
- แท่งเทียนสีเหลืองระบุถึงสภาวะการขายเกิน

อินดิเคเตอร์นี้ถูกออกแบบมาเพื่อให้สัญญาณภาพตรงบนกราฟราคาช่วยให้เทรดเดอร์สามารถมองเห็นสภาวะตลาดได้อย่างชัดเจนและทำการตัดสินใจได้ง่ายขึ้น

**แนวคิดที่อยู่เบื้องหลังการคำนวณ:**
Williams %R ที่พัฒนาโดย Larry Williams เป็นอินดิเคเตอร์โมเมนตัมที่วัดระดับการซื้อเกินและขายเกิน มันเปรียบเทียบราคาปิดปัจจุบันกับราคาสูงสุดและต่ำสุดในช่วงเวลาที่กำหนด โดยใช้แท่งเทียนที่มีการเปลี่ยนสี เทรดเดอร์สามารถประเมินสภาวะตลาดและทำการตัดสินใจได้อย่างรวดเร็วโดยไม่ต้องตีความเส้นอินดิเคเตอร์เพิ่มเติม

สคริปต์นี้มีประโยชน์โดยเฉพาะสำหรับเทรดเดอร์ที่ต้องการกราฟที่สะอาดแต่ยังต้องการใช้ข้อมูลเชิงลึกจากอินดิเคเตอร์ Williams %R
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?