jmikes

Pocket Pivot with extrapolated Volume and Moving Averages

jmikes Cập nhật   
The script shows historical pocket pivots, much as other scripts with a green diamond shape on the volume pane.
When the market is open, the current bar, however, is extrapolated to the end of the day using a sixth-order polynomial.
Thus real-time pocket pivots are shown. To work properly, the user must input a time-zone offset parameter; the default is west coast USA.
Time-zone offset is -12 hours to +12 hours compared to the NYSE exchange time zone (USA west coast: -3.)
The volume extrapolation polynomial is based on a historical NASDAQ intraday volume model developed locally by a team.
Only ten-day lookback pocket pivots are computed as defined initially by Dr. Chris Kacher. (The default lookback can be changed by the user.)
Only pocket pivots are shown where the low of the daily bar is within user-defined proximity to the 50-day moving average or 10-day moving average (for continuation pocket pivots.)
Phát hành các Ghi chú:
Original script incorrectly computed end of trading day and beginning of trading day by subtracting the timezone offset from the NYSE market time.
The corrected script adds the timezone offset to correctly use that term.
Phát hành các Ghi chú:
The prior indicator applied extrapolation to volume on weekends: this is not proper. Added line to test if the market is closed (session.ismarket ==false).
Also tweaked the lineWidth default value to equal 4.
Phát hành các Ghi chú:
Modified method to turn off extrapolation on weekends by testing if dayofweek(time) == dayofweek.saturday or dayofweek.sunday.
Erroneously extrapolating volume on weekends has been a bug since the beginning and it has taken me time to learn of the above test. The remaining hole in the strategy are market holidays and short trading sessions. I do not have a method for this.
Phát hành các Ghi chú:
Removed requirement for setting local time zone offset
Phát hành các Ghi chú:
Yet again getting the extrapolation disabled on weekends. My errors.
Phát hành các Ghi chú:
Yet again trying to disable the extrapolation function on weekends...
Phát hành các Ghi chú:
Minor cleanup. I noticed that the extrapolation wasn't working at a time when the market was open. The volume extrapolation is supposed to work when the market is open.
Phát hành các Ghi chú:
Added test for chart timeframe. Volume extrapolation is only valid on daily charts. Extrapolation is disabled for other timeframes. 2023-06-16
Mã nguồn mở

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

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

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

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