Explaining the Lower Timeframe Function and Its Role in Trading Introduction
Candlesticks on higher timeframes summarize long periods of trading activity, but they hide the internal balance of buying and selling. A daily candle, for instance, may show only a strong close, while in reality buyers and sellers may have fought much more evenly. To uncover this hidden structure, Pine Script offers the requestUpAndDownVolume() function, which retrieves up-volume, down-volume, and delta from a chosen lower timeframe (LTF).
Function in Practice
By applying this function, traders can measure how much of a move was supported by genuine buying pressure and how much came from selling pressure. The function works across timeframes: when analyzing a daily chart, one can select a one-minute or one-second LTF to see how the volume was distributed within each daily bar . This approach reveals details that are invisible on the higher timeframe alone.
Helper for Data Coverage
Lower-timeframe data comes with strict limitations. A one-second chart may only cover a few hours of history, while a one-minute chart can stretch much further back. To make this limitation transparent, a helper was implemented in our code: it shows explicitly how far the available LTF data extends . Instead of assuming full coverage, the trader knows the exact portion of the higher bar that is represented.
//══════════════
// Volume — Lower TF Up/Down
//══════════════
int global_volume_period = input.int(20, minval=1, title="Global Volume Period", tooltip="Shared lookback for ALL volume calculations (e.g., averages/sums).", group=grpVolume)
bool use_custom_tf_input = input.bool(true, "Use custom lower timeframe", tooltip="Override the automatically chosen lower timeframe for volume calculations.", group=grpVolume)
string custom_tf_input = input.timeframe("1", "Lower timeframe", tooltip="Lower timeframe used for up/down volume calculations.", group=grpVolume)
import TradingView/ta/10 as tvta
resolve_lower_tf(bool useCustom, string customTF) =>
useCustom ? customTF :
timeframe.isseconds ? "1S" :
timeframe.isintraday ? "1" :
timeframe.isdaily ? "5" : "60"
get_up_down_volume(string lowerTf) =>
= tvta.requestUpAndDownVolume(lowerTf)
var float upVolume = na
var float downVolume = na
var float deltaVolume = na
string lower_tf = resolve_lower_tf(use_custom_tf_input, custom_tf_input)
= get_up_down_volume(lower_tf)
upVolume := u_tmp
downVolume := d_tmp
deltaVolume := dl_tmp
//──── LTF coverage counter — counts chart bars with valid Up/Down (non-na) 〔Hazel-lite〕
var int ltf_total_bars = 0
var int last_valid_bar_index = na // new: remember the bar_index of the last valid LTF bar
if not na(deltaVolume)
ltf_total_bars += 1
last_valid_bar_index := bar_index
int ltf_safe_window = ltf_total_bars
var label ltf_cov_label = na // label handle for the “coverage” marker
Use in Strategy Development
Because both the main function and the helper for data coverage have been implemented in our work, we use the Hazel-nut BB Volume strategy here as a practical example to illustrate the subject. This strategy serves only as a framework to show how lower-timeframe volume analysis affects higher-timeframe charts. In the following sections, several charts will be presented and briefly explained to demonstrate these effects in practice.
In this example, the daily chart is used as the main timeframe, while a one-second lower timeframe (LTF) has been applied to examine the internal volume distribution. The helper clearly indicates that only 59 one-second bars are available for this daily candle. This is critical, because it shows the analysis is based on a partial window of intraday data rather than a full day.
The up/down volume split reveals that buyers accounted for about 1.957 million units versus sellers with 1.874 million, producing a positive delta of roughly +83,727. In percentage terms, buyers held a slight edge (≈51%), while sellers were close behind (≈49%). This near balance demonstrates how the daily candle’s bullish appearance was built on only a modest dominance by buyers.
By presenting both the margin values (e.g., upper band margin 13.61%) and the absolute money flow, the chart connects higher-timeframe Bollinger Band context with the micro-timeframe order flow. The annotation “Up/Down data valid starting here” reinforces the importance of the helper: it alerts the user that valid LTF volume coverage begins from a specific point, preventing misinterpretation of missing data.
In short, this chart illustrates how choosing a very fine LTF (1 second) can reveal subtle buyer–seller dynamics, while at the same time highlighting the limitation of short data availability. It is a practical case of the principle described earlier—lower-timeframe insight enriches higher-timeframe context, but only within the boundary of available bars.
Analysis with One-Minute LTF
In this chart, the daily timeframe remains the base, but the lower timeframe (LTF) has been shifted to one minute. The helper indicates that data coverage extends across 353 daily bars, a much deeper historical window than in the one-second example. This means we can evaluate buyer/seller balance over nearly a full year of daily candles rather than just a short slice of history.
The up/down split shows buyers at ≈2.019M and sellers at ≈1.812M, producing a positive delta of +206,223. Here, buyers hold about 52.7%, compared to sellers at 47.3%. This stronger bias toward buyers contrasts with the previous chart, where the one-second LTF produced only a slim delta of +83,727 and ratios closer to 51%/49%.
Comparison with the One-Second LTF Chart
Data coverage: 1s gave 59 daily bars of usable history; 1m extends that to 353 bars.
Delta magnitude: 1s produced a modest delta (+83k), reflecting very fine-grained noise; 1m smooths those micro-fluctuations into a larger, clearer delta (+206k).
Interpretation: The 1s chart highlighted short-term balance, almost evenly split. The 1m chart, backed by longer history, paints a more decisive picture of buyer strength.
Key Takeaway
This comparison underscores the trade-off: the lower the LTF, the higher the detail but the shorter the history; the higher the LTF, the broader the historical coverage but at the cost of microscopic precision. The helper function bridges this gap by making the coverage explicit, ensuring traders know exactly what their analysis is built on.
Impact of TradingView Plan Levels
Another factor shaping the use of this function is the user’s access to data. TradingView accounts differ in how much intraday history they provide and which intervals are unlocked.
◉ On the free plan, the smallest available interval is one minute, with a few months of intraday history.
◉ Paid plans unlock second-based charts, but even then, history is measured in hours or days, not months.
◉ Higher tiers extend the number of bars that can be loaded per chart, which becomes relevant when pulling large volumes of lower-timeframe data into higher-timeframe studies
Conclusion
With requestUpAndDownVolume(), it becomes possible to see how each symbol behaves internally across different timeframes. The helper function makes clear where the data stops, preventing misinterpretation. By applying this setup within strategies like Hazel-nut BB Volume, one can demonstrate how changing the lower timeframe directly alters the picture seen on higher charts. In this way, the function is not just a technical option but a bridge between detail and context.
Lowertimeframeanalysis
xau/usd continuation sell of from $2,678Gold has been showing clear structure to the downside on the 1H. However, on the 4H time frames and above we didn't actually see price further BOS to the downside buy rather it pushed back up the 8H imbalance to create EQH liquidity. This makes me wonder whether or not we will see a last push up from Gold before price then makes it way further down.
However, this week we can be sure to catch some sells on gold as we see a lot of bearish indication on the lower time frames. I am expecting for price to open and consolidate before it takes the ASH and potentially fails the 30min supply zones i have before reacting from the 6H supply. It is also possible that price may want to fill the 6h Imbalance above and actually react from the 4H supply instead.
If price truly wishes to respect these Asian highs and simply further react without having a significant retracement then I can potentially expect price to react from these lower time frame 30min supply order blocks.
GBPJPY Long IdeaWith the DXY hovering around significant supply zones, coupled with the cable being primed for a push up to 1.27192 and possibly beyond, we can theoretically map out a path for bulls to hold serve until the High time frame key levels. This potential push up could bring fruitful shorts in the near future. However, I’m bullish on lower time frames. Happy Trading.
Live META Trade Update - 14 out of our target 48 R:R securedThis will be helpful to see for those wondering how to utilize lower time frame algorithms within higher time frame analysis. Same idea! Just always remember, unless you're scalping, the daily algorithms hold much more weight.
Happy Trading all :)