OPEN-SOURCE SCRIPT
Custom Weekly WED→TUE

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.
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.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.