"Configurable Percentage Variation"
This script, written in Pine Script version 6, is designed to display levels of percentage variations around the previous day's closing price on a trading chart. Users can configure these levels, including their percentage values, line colors, and line styles, directly through the script's input settings.
#### Key Features:
1. **Configurable Percentage Levels**:
- Define up to four percentage variation levels (`Percentage 1` to `Percentage 4`).
- Each level is calculated based on the closing price of the previous day.
2. **Customizable Line Appearance**:
- Users can modify the **color** of each line through the input settings.
- Choose from three **line styles**: Solid, Dashed, and Dotted.
3. **Dynamic Updates**:
- The script automatically updates the lines at the beginning of each trading day and extends them throughout the current session.
4. **Labels with Percentage and Price**:
- At the end of each trading session, the script displays labels near the lines, showing the percentage value and its corresponding price.
5. **User-Friendly Inputs**:
- Easily adjust the percentage values and visual aspects of the lines (color and style) without modifying the code.
6. **Precision Placement**:
- Lines are drawn with reference to the previous day's closing price and extend dynamically across the current trading session.
#### How to Use:
1. Load the script onto your trading chart.
2. Use the input fields to:
- Set the percentage variations.
- Choose the line color for better visual distinction.
- Select the line style (Solid, Dashed, or Dotted).
3. Observe the lines representing the calculated percentage levels for the day, and the labels indicating their specific values.
This script empowers users to tailor the visual representation of percentage levels to their preference, enhancing chart analysis and decision-making.