OPEN-SOURCE SCRIPT

Day-of-Week Performance

Theo EdgeTools
This Pine Script indicator calculates and displays the average performance for each weekday over a specified lookback period on a chart. The performance is computed based on the percentage change from the open to the close price of each day.
Features:

Lookback Period:
Input field to specify the number of days to look back for calculating performance. The default is set to 756 days.

Performance Calculation:
Calculates the average percentage change from open to close for each weekday (Monday through Friday) within the specified lookback period.

Histogram Plots:
Displays histograms on the chart for each weekday. Each histogram represents the average performance of that day of the week.
Histograms are plotted with distinct colors:
Monday: Blue
Tuesday: Red
Wednesday: Green
Thursday: Orange
Friday: Purple

Performance Table:
A table is displayed in the top-right corner of the chart showing the average percentage performance for each weekday.
The table updates with the lookback period and the calculated average performance values for each weekday.
Positive performance values are shown in green, and negative values are shown in red.

This indicator helps visualize day-of-the-week performance trends, providing insights into which days typically perform better or worse over the specified period.
Cycles

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