OPEN-SOURCE SCRIPT

Custom Weekly WED→TUE

70
Purpose:
This indicator creates custom weekly candles with a week boundary running from Wednesday to Tuesday (WED→TUE) for any symbol. It is designed for systems that prefer to close the trading week on Tuesday’s session instead of the standard weekend.
Custom Candle Logic (WED→TUE):
• Open = Opening price on Wednesday (start of the custom week).
• Close = Closing price on Tuesday (end of the custom week).
• High/Low = Maximum/minimum during the entire range from Wednesday → Tuesday.
Display Behavior:
• Only renders when the chart timeframe = 1W (Weekly).
• Completed weeks (with full Wed→Tue data) are shown as candlesticks (colored up/down based on O/C).
• The current incomplete week is shown as a preview box shifted to the next weekly slot (the column to the right), allowing you to see the progress of the ongoing week while keeping the last completed week intact.
Inputs:
• Start day (1=Mon…7=Sun) — default is 3 = Wednesday. You can change this to redefine the week boundary.
• Show current (incomplete) custom week — toggles the preview box for the current running week.
• Up/Down/Doji color — defines the colors of completed weekly candles.
• Preview box transparency — controls the opacity of the preview box for the ongoing week.

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。