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
สคริปต์โอเพนซอร์ซ

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

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?