OPEN-SOURCE SCRIPT
已更新 PTB

Previous Highs and Lows with Fibonacci
This Pine Script indicator, "Previous Highs and Lows with Fibonacci," is designed to overlay on a trading chart and visually represent key Fibonacci levels based on historical highs and lows. It features:
Lookback Periods: The script allows you to define two lookback periods for calculating highs and lows: a short lookback period and a long lookback period. These are adjustable via input fields.
Highs and Lows Calculation: It calculates the highest and lowest values over the specified short and long periods, which are then plotted on the chart as reference lines.
Previous Highs and Lows Storage: The indicator stores the previous highs and lows for both short and long periods. These values are updated based on changes in the chart's timeframe.
Fibonacci Levels: The script calculates and plots key Fibonacci levels (0.0, 0.236, 0.382, 0.618, and 1.0) based on the highest and lowest values from the long lookback period. These Fibonacci lines are plotted as dotted lines on the chart.
Fibonacci Level Management: Old Fibonacci lines are deleted before new ones are drawn, ensuring that the chart remains uncluttered.
0.5 Fibonacci Level: The script specifically calculates and plots the 0.5 Fibonacci level, which is used to identify potential price levels of interest.
Crossing Alert: An alert condition is set to notify you when the price crosses the 0.5 Fibonacci level, which can be crucial for making trading decisions.
Plotting: In addition to the Fibonacci levels, the script plots the current highs and lows for both short and long periods for easy reference.
This Pine Script indicator, "Previous Highs and Lows with Fibonacci," is designed to overlay on a trading chart and visually represent key Fibonacci levels based on historical highs and lows. It features:
Lookback Periods: The script allows you to define two lookback periods for calculating highs and lows: a short lookback period and a long lookback period. These are adjustable via input fields.
Highs and Lows Calculation: It calculates the highest and lowest values over the specified short and long periods, which are then plotted on the chart as reference lines.
Previous Highs and Lows Storage: The indicator stores the previous highs and lows for both short and long periods. These values are updated based on changes in the chart's timeframe.
Fibonacci Levels: The script calculates and plots key Fibonacci levels (0.0, 0.236, 0.382, 0.618, and 1.0) based on the highest and lowest values from the long lookback period. These Fibonacci lines are plotted as dotted lines on the chart.
Fibonacci Level Management: Old Fibonacci lines are deleted before new ones are drawn, ensuring that the chart remains uncluttered.
0.5 Fibonacci Level: The script specifically calculates and plots the 0.5 Fibonacci level, which is used to identify potential price levels of interest.
Crossing Alert: An alert condition is set to notify you when the price crosses the 0.5 Fibonacci level, which can be crucial for making trading decisions.
Plotting: In addition to the Fibonacci levels, the script plots the current highs and lows for both short and long periods for easy reference.
發行說明
Indicator Description: PTBThe PTB indicator is designed for use in technical analysis on TradingView. It plots various Fibonacci levels on the chart to help identify potential support and resistance zones based on historical price movements.
Key Features:
Lookback Periods:
Short Lookback Period: Defined by the user, this period is used to calculate short-term highs and lows.
Long Lookback Period: Defined by the user, this period is used to calculate long-term highs and lows.
Highs and Lows Calculation:
Short-Term High and Low: The highest and lowest prices over the short lookback period.
Long-Term High and Low: The highest and lowest prices over the long lookback period.
Fibonacci Levels:
The indicator calculates and plots Fibonacci levels based on the long-term high and low. The key Fibonacci levels included are:
0.236
0.382
0.5
0.618
0.786
Alerts:
The indicator provides alert conditions when the price crosses any of the key Fibonacci levels (0.236, 0.382, 0.5, 0.618, 0.786). These alerts can be used to notify traders of potential significant price movements.
Plotting:
The calculated Fibonacci levels are plotted on the chart with different colors for easy identification:
0.236 Level: Navy
0.382 Level: Fuchsia
0.5 Level: Purple
0.618 Level: Teal
0.786 Level: Orange
Usage:
Traders can use the plotted Fibonacci levels to gauge potential areas of support and resistance. The alert conditions help in identifying significant price movements as the price crosses these critical levels.
2 days ago
Release Notes
Indicator Description: PTB_V2
The PTB indicator is designed for use in technical analysis on TradingView. It plots various Fibonacci levels on the chart to help identify potential support and resistance zones based on historical price movements.
Key Features:
Lookback Periods:
Short Lookback Period: Defined by the user, this period is used to calculate short-term highs and lows.
Long Lookback Period: Defined by the user, this period is used to calculate long-term highs and lows.
Highs and Lows Calculation:
Short-Term High and Low: The highest and lowest prices over the short lookback period.
Long-Term High and Low: The highest and lowest prices over the long lookback period.
Fibonacci Levels:
The indicator calculates and plots Fibonacci levels based on the long-term high and low. The key Fibonacci levels included are:
0.236
0.382
0.5
0.618
0.786
Alerts:
The indicator provides alert conditions when the price crosses any of the key Fibonacci levels (0.236, 0.382, 0.5, 0.618, 0.786). These alerts can be used to notify traders of potential significant price movements.
Plotting:
The calculated Fibonacci levels are plotted on the chart with different colors for easy identification:
0.236 Level: Navy
0.382 Level: Fuchsia
0.5 Level: Purple
0.618 Level: Teal
0.786 Level: Orange
Usage:
Traders can use the plotted Fibonacci levels to gauge potential areas of support and resistance. The alert conditions help in identifying significant price movements as the price crosses these critical levels.
發行說明
**Indicator Name: PTB_MoneyFlow****Description:**
The PTB_MoneyFlow indicator is designed to help traders identify key price levels and potential price movements using Fibonacci retracement levels, alongside tracking recent highs and lows over both short and long periods.
### Key Features:
1. **Highs and Lows Tracking**:
- The indicator calculates and plots the highest and lowest prices over two user-defined lookback periods:
- **Short Lookback Period**: Default is 30 bars.
- **Long Lookback Period**: Default is 600 bars.
- These levels are plotted on the chart, helping to highlight recent market extremes.
2. **Fibonacci Retracement Levels**:
- The indicator calculates and plots the Fibonacci retracement levels based on the long lookback period's high and low prices.
- The following Fibonacci levels are included: 0.236, 0.382, 0.5, 0.618, and 0.786.
- Each Fibonacci level is represented with different colors for quick visual identification. The lines are drawn with 50% transparency to ensure clarity when multiple lines overlap.
3. **Price Cross Alerts**:
- The indicator monitors if the current price crosses any of the key Fibonacci levels and triggers alerts when a crossover occurs. This can provide valuable signals for potential reversal or continuation of price movements at these critical levels.
4. **Visuals**:
- Both the short and long period highs and lows are plotted with distinct colors.
- Fibonacci lines are drawn in dotted styles with custom colors and transparency, making the chart easier to interpret.
### Usage:
This indicator is useful for traders looking to:
- Identify areas of price support and resistance using Fibonacci levels.
- Track recent market extremes over different timeframes.
- Set alerts for when price crosses important Fibonacci retracement levels, which could indicate potential trading opportunities.
The indicator is versatile and can be adapted to various trading strategies that rely on Fibonacci analysis and tracking key market highs and lows.
發行說明
Indicator Name: PTB_MoneyFlowDescription:
The PTB_MoneyFlow indicator is designed to help traders identify key price levels and potential price movements using Fibonacci retracement levels, alongside tracking recent highs and lows over both short and long periods.
Key Features:
Highs and Lows Tracking:
The indicator calculates and plots the highest and lowest prices over two user-defined lookback periods:
Short Lookback Period: Default is 3 bars.
Long Lookback Period: Default is 144 bars.
These levels are plotted on the chart, helping to highlight recent market extremes.
Fibonacci Retracement Levels:
The indicator calculates and plots the Fibonacci retracement levels based on the long lookback period's high and low prices.
The following Fibonacci levels are included: 0.236, 0.382, 0.5, 0.618, and 0.786.
Each Fibonacci level is represented with different colors for quick visual identification. The lines are drawn with 50% transparency to ensure clarity when multiple lines overlap.
Price Cross Alerts:
The indicator monitors if the current price crosses any of the key Fibonacci levels and triggers alerts when a crossover occurs. This can provide valuable signals for potential reversal or continuation of price movements at these critical levels.
Visuals:
Both the short and long period highs and lows are plotted with distinct colors.
Fibonacci lines are drawn in dotted styles with custom colors and transparency, making the chart easier to interpret.
Usage:
This indicator is useful for traders looking to:
Identify areas of price support and resistance using Fibonacci levels.
Track recent market extremes over different timeframes.
Set alerts for when price crosses important Fibonacci retracement levels, which could indicate potential trading opportunities.
The indicator is versatile and can be adapted to various trading strategies that rely on Fibonacci analysis and tracking key market highs and lows.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。