This indicator calculates and plots a virtual weekly candle structured as if the previous seven-day period finished yesterday relative to the current date.
1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
159 lines of Pine Script v6 from src/week-candle-finished-yesterday.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.
Weekly candle closed yesterday queries daily price data to derive rolling weekly open, high, low, and close levels. Designed for ICT and smart money concepts that analyze rolling weekly periods, the script draws in a separate pane and displays an informational table. Settings allow adjustments for additional day shifts, table positioning, and candle colors.
Rolling seven-day virtual weekly candle calculation
Custom open, high, low, and close levels from daily bars
Configurable additional day shift offset
Informational display table with selectable positioning
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Show virtual levels on real 1W candles?
bool
false
show_on_real
Bullish Candle
color
color.new(color.green, 20)
bull_color
Bearish Candle
color
color.new(color.gray, 20)
bear_color
Draw today's virtual week start?
bool
true
draw_current_week
Additional day shift
int
0
day_shift
Table position
enum
TablePosition.left
table_position
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr
This Pine Script indicator identifies liquidity sweeps and confirms signals using a close-back candle pattern directly on the price chart. It tracks recent swing highs and lows over a customizable lookback period. A bullish signal forms when a prior bar sweeps
The Confluence Suite indicator draws multiple trading signals and tools directly on the price chart. It generates entry and exit signals based on selected modes and filters, with an AI signal classifier rating quality from 1-4. Additional features include smar
The indicator tracks four-bar fractal sweep and reclaim setups on chart timeframes of 15 minutes and above. It calculates Reclaim Strength based on where C2 closes relative to C1's range and plots level lines for the swept C1 extreme and C2 extreme. An on-scre
ICT HTF Candles displays higher timeframe candle structures directly on the price chart using customized boxes and lines. It tracks up to six user-defined higher timeframes, plotting historical body, wick, and imbalance zones alongside optional price level tra
This overlay indicator detects tweezer tops and bottoms and kangaroo-tail pin bars, then draws supply and demand zones from those patterns. It scores each zone, decays freshness, merges overlapping zones, and can invalidate a zone after a close-through or afte