Time-Segmented Volume from Price Changes and Trading Volume
Summary
The document presents a formula for time-segmented volume (TSV): it accumulates trading volume multiplied by the close-to-close price change over 13 bars, then plots that series alongside a seven-period moving average. The sign of each contribution follows the price change, so rising closes add positive volume and falling closes add negative volume; unchanged closes contribute zero. The text identifies the close as the current bar’s closing price and compares it with the previous bar’s close.
The period of 13 is suggested as a way to represent the half-hour intervals in a typical US trading day. The document asks whether this calculation is correct or whether a better one exists, but gives no evaluation, alternative formula, or performance evidence. It therefore serves as an indicator definition and an open methodological question. The stated lookback may depend on bar frequency and trading hours, and the text does not explain how to interpret TSV signals or validate them across instruments and data settings.
Key ideas
- TSV is formed by summing volume weighted by the close-to-close price change over a rolling period.
- Rising closes contribute positively, falling closes contribute negatively, and unchanged closes contribute zero.
- The example uses a 13-bar sum and plots a seven-period moving average as a reference.
- The proposed 13-bar period is associated with half-hour segments in a typical US trading day.
- The document raises, but does not resolve, questions about the formula’s correctness and interpretation.
Tags
Full text
# How to calculate time-segmented volume?
# How to calculate time-segmented volume?
amibrokers has this calculation for TSV:
```
_SECTION_BEGIN(" Time Segmented Volume ");
t=(Sum(IIf( C>Ref(C,-1), (V*(C-Ref(C,-1))),IIf(C<Ref(C,-1),(V*(C-Ref(C,-1))),0)),13));
m=MA(t ,7 );
Plot(t, "Time Segmented Volume 13", colorRed);
Plot(m, " Simple Moving Average 7" , colorYellow);
_SECTION_END();
```
Key: t is calculated TSV; read IIF as IF (happily, IIF has been defenestrated); C is the close on the current bar; (C,-1) is the close on the just-previous bar. @chrisaycock points out below that the usual trading day in the US has 13 half-hour periods, represented perhaps by the constant 13.
Can you comment on the correctness of the calculation? Or suggest a better one?Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.