Explaining the Lower Timeframe Function and Its Role in Trading B2Gold CorpBATS:BTGata_sabanciIntroduction 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 tvtaresolve_lower_tf(bool useCustom, string customTF) => useCustom ? customTF : timeframe.isseconds ? "1S" : timeframe.isintraday ? "1" : timeframe.isdaily ? "5" : "60"get_up_down_volume(string lowerTf) => [u, d, dl] = tvta.requestUpAndDownVolume(lowerTf) [math.abs(u), math.abs(d), dl]var float upVolume = navar float downVolume = navar float deltaVolume = nastring lower_tf = resolve_lower_tf(use_custom_tf_input, custom_tf_input)[u_tmp, d_tmp, dl_tmp] = get_up_down_volume(lower_tf)upVolume := u_tmpdownVolume := d_tmpdeltaVolume := dl_tmp//──── LTF coverage counter — counts chart bars with valid Up/Down (non-na) 〔Hazel-lite〕var int ltf_total_bars = 0var int last_valid_bar_index = na // new: remember the bar_index of the last valid LTF barif not na(deltaVolume) ltf_total_bars += 1 last_valid_bar_index := bar_indexint ltf_safe_window = ltf_total_barsvar 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.