| Type: | Package |
| Title: | True Range-Weighted Average Price ('TrueWAP') |
| Version: | 0.1.0 |
| Author: | Joshua Callaway [aut, cre] |
| Maintainer: | Joshua Callaway <Callaway@roar-analytics.com> |
| Description: | This groundbreaking technical indicator directly integrates volatility into price averaging by weighting median range-bound prices using the True Range. Unlike conventional metrics such as TWAP (Time-Weighted Average Price), which focuses solely on time, or VWAP (Volume-Weighted Average Price), which emphasizes volume, 'TrueWAP' captures fluctuating market behavior by reflecting true price movement within high/low performance boundaries. |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | https://github.com/CallawayCross/TrueWAP |
| BugReports: | https://github.com/CallawayCross/TrueWAP/issues |
| Depends: | R (≥ 4.3.2) |
| Imports: | zoo (≥ 1.8-14), TTR (≥ 0.24.4) |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 7.3.2 |
| Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2025-07-02 17:33:57 UTC; snow_ |
| Repository: | CRAN |
| Date/Publication: | 2025-07-07 09:20:06 UTC |
Title TWAP
Description
Calculates Time-Weighted Average Price (TWAP)
Usage
TWAP(OHLC, period)
Arguments
OHLC |
Data frame object with Open, High, Low, & Close fields |
period |
Rolling window length |
Value
Vector of TWAP values
Examples
data(nikkei)
TWAP(nikkei$OHLC, 50)
Title TrueWAP
Description
Calculates True Range-Weighted Average Price (TrueWAP)
Usage
TrueWAP(high, low, close, true_range, period)
Arguments
high |
Vector of High Values |
low |
Vector of Low Values |
close |
Vector of Close Values |
true_range |
Vector of True Range Values |
period |
Rolling window length |
Value
Vector of TrueWAP values
Examples
data(nikkei)
TrueWAP(
high = nikkei$High
, low = nikkei$Low
, close = nikkei$Close
, true_range = nikkei$tr
, period = 50)
Title VWAP
Description
Calculates Volume-Weighted Average Price (VWAP)
Usage
VWAP(HLC3, volume, period)
Arguments
HLC3 |
Vector of High, Low, Close Average Values |
volume |
Vector of Volume values |
period |
Rolling window length |
Value
Vector of VWAP values
Examples
data(nikkei)
VWAP(nikkei$HLC3, nikkei$Volume, 50)
Title anchoredTWAP
Description
Calculates Anchored Time-Weighted Average Price (TWAP)
Usage
anchoredTWAP(OHLC, period)
Arguments
OHLC |
Data frame object with Open, High, Low, & Close fields |
period |
Vector of bars since start of fixed period |
Value
Vector of Anchored TWAP values
Examples
data(nikkei)
anchoredTWAP(
OHLC = nikkei$OHLC
, period = nikkei$bars_since_segment
)
Title anchoredTrueWAP
Description
Calculates Anchored True Range-Weighted Average Price (TrueWAP)
Usage
anchoredTrueWAP(high, low, close, true_range, period)
Arguments
high |
Vector of High Values |
low |
Vector of Low Values |
close |
Vector of Close Values |
true_range |
Vector of True Range Values |
period |
Vector of bars since start of fixed period |
Value
Vector of Anchored TrueWAP values
Examples
data(nikkei)
anchoredTrueWAP(
high = nikkei$High
, low = nikkei$Low
, close = nikkei$Close
, true_range = nikkei$tr
, period = nikkei$bars_since_segment
)
Title anchoredVWAP
Description
Calculates Anchored Volume-Weighted Average Price (VWAP)
Usage
anchoredVWAP(HLC3, volume, period)
Arguments
HLC3 |
Vector of High, Low, Close Average Values |
volume |
Vector of Volume values |
period |
Vector of bars since start of fixed period |
Value
Vector of Anchored VWAP values
Examples
data(nikkei)
anchoredVWAP(
HLC3 = nikkei$HLC3
, volume = nikkei$Volume
, period = nikkei$bars_since_segment
)
nikkei
Description
An example data set of OHLCV data for Nikkei 225 (Osaka), Active Daily Continuation
Usage
data("nikkei")
Format
A data frame with 4411 observations on the following 27 variables.
Opena numeric vector
Higha numeric vector
Lowa numeric vector
Closea numeric vector
Volumea numeric vector
Adjusteda numeric vector
OHLCa numeric vector
HLC3a numeric vector
tra numeric vector
atra numeric vector
trueHigha numeric vector
trueLowa numeric vector
segmenta Date
Datea Date
FirstRowNumSegmenta numeric vector
RowNuma numeric vector
bars_since_segmenta numeric vector
current_stda numeric vector
Mature_Daysa numeric vector
Mature_STDa numeric vector
lags_mature_daysa numeric vector
lags_mature_stda numeric vector
current_smaa numeric vector
current_adiva numeric vector
Mature_ADIVa numeric vector
Current_IVa numeric vector
lags_mature_adiva numeric vector
Examples
data(nikkei)
## maybe str(nikkei) ; plot(nikkei) ...