Entry / TP / SL Alert Bands (Simple & Stable)

Description
This tool plots customizable Entry, Take-Profit, and Stop-Loss reference levels, along with two alert bands derived as a percentage of the distance between Entry→TP and Entry→SL. The bands update immediately when inputs are adjusted and remain constant across the chart. This is useful for traders who want to visually monitor when price approaches key zones associated with their pre-defined trade plan.
Core Features
• Manual Entry, TP, and SL input fields
• Long or Short mode
• Upper alert band = a user-defined % of the distance toward TP
• Lower alert band = a user-defined % of the distance toward SL
• Optional visibility controls for Entry, TP, SL lines
• Alerts for:
– Price crossing the upper band
– Price crossing the lower band
– Price crossing either band
• Works on any symbol and any timeframe
• Alerts use TradingView’s built-in alertcondition() system
How It Works
The script computes the absolute distance between Entry→TP and Entry→SL, then applies user-defined percentages to determine where the alert bands should be drawn. If TP/SL are reversed relative to Entry for the selected direction, the relevant band may be invisible (e.g., negative or invalid distance). Proper TP/SL placement is required for intended use.
Notes
• This tool does not generate buy/sell signals.
• This tool does not provide financial advice.
• Proper risk management, independent decision-making, and verification of all settings are required.
⸻
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้งานที่ผู้เขียนอนุมัตเท่านั้นจึงจะสามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องขอและได้รับอนุญาตก่อนใช้งาน ซึ่งโดยทั่วไปจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม โปรดทำตามคำแนะนำของผู้เขียนด้านล่าง หรือติดต่อ drlicht1 โดยตรง
TradingView ไม่แนะนำให้จ่ายเงินหรือใช้สคริปต์ เว้นแต่คุณจะเชื่อถือผู้เขียนและเข้าใจวิธีการทำงานของสคริปต์นั้นอย่างถ่องแท้ คุณยังสามารถหาทางเลือกแบบโอเพนซอร์สฟรีได้ใน สคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำจำกัดสิทธิ์ความรับผิดชอบ
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้งานที่ผู้เขียนอนุมัตเท่านั้นจึงจะสามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องขอและได้รับอนุญาตก่อนใช้งาน ซึ่งโดยทั่วไปจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม โปรดทำตามคำแนะนำของผู้เขียนด้านล่าง หรือติดต่อ drlicht1 โดยตรง
TradingView ไม่แนะนำให้จ่ายเงินหรือใช้สคริปต์ เว้นแต่คุณจะเชื่อถือผู้เขียนและเข้าใจวิธีการทำงานของสคริปต์นั้นอย่างถ่องแท้ คุณยังสามารถหาทางเลือกแบบโอเพนซอร์สฟรีได้ใน สคริปต์ชุมชนของเรา