OPEN-SOURCE SCRIPT

PTB

От binhphan651457
Обновлено
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.
Информация о релизе
Indicator Description: PTB
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.
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_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:
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.
educational

Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?

Отказ от ответственности