update: added weekly and monthly pivots, the offset is a average approximation so there may be inconsistency on the date forecasted to be end of week/month. (using diferent sessions or limited time intervals is not possible).
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publications is governed by House rules. 您可以收藏它以在圖表上使用。