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
94 lines of Pine Script v6 from src/day-candle-finished-hours-ago.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.
By aggregating four-hour bar data from higher-timeframe requests, it constructs custom 24-hour periods and renders them as candlesticks in a separate pane alongside an information table displaying the virtual day's start time. Inputs allow users to customize bullish and bearish candle colors.
Virtual daily candlestick plotting
Four-hour sub-bar aggregation for custom daily OHLC
Information table displaying virtual session timing
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 1D 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
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.
This indicator detects three-candle time patterns on the price chart, tracking range, manipulation, and distribution phases based on Smart Money Concepts. It establishes high and low boundaries from the opening candle and identifies boundary rejections during
TheStrat Suite is a multi-timeframe price action indicator implementing Rob Smith's TheStrat methodology. It calculates bar classifications for inside bars, hammers, shooters, failed 2s and outside bars across configurable timeframes. The indicator detects sig
This indicator detects liquidity sweeps during the Asian session and identifies reversal opportunities in the New York session. It tracks the high and low of the Asia trading range using session timestamps in UTC+3. Sweep up and down are flagged when price bre
Indicatorv5SMC / ICT / price actionSessions & time
Session Extreme Revisit identifies the highest supply candle and lowest demand candle formed during London and New York sessions and draws extended reaction zones on the price chart. It evaluates candidate candles using size, wick ratio, and displacement filte
AmiComStrategy is an indicator that calculates correlations between securities using the Corell indicator over specified timeframes such as 5D. It filters trading opportunities based on session times like 1300-1700 and security up and down times such as 3H. Th
This indicator builds a smart-money context frame in a separate pane by calling a private context engine. It exposes hidden numeric plots for schema version, readiness, bias, quality, market structure including break of structure and change of character, imbal