OPEN-SOURCE SCRIPT

13-week high, low, Fibonacci retracement levels, with 100SMA

Indicator: 13 Week High/100 Day SMA/13 Week Low with 0.382, 0.5, and 0.618 Fibonacci Levels

Description:
This indicator for TradingView, written in Pine Script version 6, displays a table on the chart that provides a visual analysis of key price levels based on a 13-week timeframe and a 100-day Simple Moving Average (SMA).

Core Calculations:
13-Week High and Low: The indicator calculates the highest high and lowest low over the past 13 weeks using weekly data. This provides a longer-term perspective on the price range.
13-Week Fibonacci Retracement Levels: Based on the calculated 13-week high and low, the script determines the 0.382, 0.5, and 0.618 Fibonacci retracement levels. These levels are often used by traders to identify potential support and resistance areas.
100-Day SMA: The indicator calculates the 100-day Simple Moving Average of the closing price using daily data. The SMA is a widely used trend-following indicator.

Table Display:
The indicator presents the calculated values in a neatly formatted table on the chart.

The table includes the following information:
13W High: The highest price reached over the last 13 weeks.
13W Low: The lowest price reached over the last 13 weeks.
13W SMA: The calculated 100-day Simple Moving Average value.
Fibonacci Levels: The 0.382, 0.5 ("Mid"), and 0.618 Fibonacci retracement levels, labeled as "↗," "|," and "↘," respectively.

Dynamic SMA Coloring:
The 100-day SMA value in the table is dynamically colored to provide a quick visual indication of the current price's relationship to the SMA:
Teal: The current closing price is above the 100-day SMA, suggesting a potential uptrend.
Red: The current closing price is below the 100-day SMA, suggesting a potential downtrend.
Blue: The current closing price is equal to the 100-day SMA.
Moving Averages

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm