OPEN-SOURCE SCRIPT
ที่อัปเดต: Swing Point - VALID/ INVALID

This indicator identifies reliable swing highs and lows by combining structural patterns with momentum confirmation. It first looks for a standard three-candle peak or valley, allowing up to two candles on the right side to form the necessary lower low or higher high. Once the structure forms, it requires a candle body to close beyond the extreme wick of the peak or valley within that same two-candle window. If both conditions are met, it plots a red or green triangle to mark a confirmed swing point; if the structure forms but the momentum close fails, it plots a purple triangle to warn you of a setup that lacked the power to follow through.
Release Note
The Logic: It looks for a classic 3-candle peak or valley, giving the market up to two candles on the right side to complete the structural shape (Condition 1). It then checks if a candle body convincingly closed past that peak/valley's extreme wick within that same two-candle window (Condition 2).The Signals: If both conditions are met, it plots a Red (High) or Green (Low) triangle, marking a high-conviction structural reversal point. If the shape forms but the body close fails, it plots a Purple triangle, warning you of an unconfirmed swing—which often acts as a liquidity trap or a target.
The Engine: It features a dual-rendering system with a built-in toggle. You can either show infinite historical swings for deep backtesting, or flip the toggle to show an exact, strict count (e.g., only the last 20 total swings) using invisible labels to keep your live trading chart completely clutter-free.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน