OPEN-SOURCE SCRIPT

Percentual Variation

已更新
This script is an indicator for plotting percentage-based lines using the previous day's closing price. It is useful for traders who want to visualize support and resistance levels derived from predefined percentages. Here's what the script does:

Calculates percentage levels:

It uses the previous day's closing price to calculate two positive levels (above the close) and two negative levels (below the close) based on fixed percentages:
+0.25% and +0.50% (above the close).
-0.25% and -0.50% (below the close).
Plots the lines on the chart:

Draws four horizontal lines representing the calculated levels:
Green lines indicate levels above the closing price.
Red lines indicate levels below the closing price.
Displays labels on the chart:

Adds labels near the lines showing the corresponding percentage, such as "+0.25%", "+0.50%", "-0.25%", and "-0.50%".
This script provides a clear visual representation of key percentage-based levels, which can be used as potential entry, exit, or target points in trading strategies.
發行說明
"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.
Bands and ChannelsChart patternsCycles

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明