| Title: | True Range-Weighted Average Price ('TrueWAP') |
|---|---|
| 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. |
| Authors: | Joshua Callaway [aut, cre] |
| Maintainer: | Joshua Callaway <[email protected]> |
| License: | GPL (>=2) |
| Version: | 0.1.0 |
| Built: | 2026-06-04 09:38:26 UTC |
| Source: | https://github.com/callawaycross/truewap |
Calculates Anchored True Range-Weighted Average Price (TrueWAP)
anchoredTrueWAP(high, low, close, true_range, period)anchoredTrueWAP(high, low, close, true_range, period)
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 |
Vector of Anchored TrueWAP values
data(nikkei) anchoredTrueWAP( high = nikkei$High , low = nikkei$Low , close = nikkei$Close , true_range = nikkei$tr , period = nikkei$bars_since_segment )data(nikkei) anchoredTrueWAP( high = nikkei$High , low = nikkei$Low , close = nikkei$Close , true_range = nikkei$tr , period = nikkei$bars_since_segment )
Calculates Anchored Time-Weighted Average Price (TWAP)
anchoredTWAP(OHLC, period)anchoredTWAP(OHLC, period)
OHLC |
Data frame object with Open, High, Low, & Close fields |
period |
Vector of bars since start of fixed period |
Vector of Anchored TWAP values
data(nikkei) anchoredTWAP( OHLC = nikkei$OHLC , period = nikkei$bars_since_segment )data(nikkei) anchoredTWAP( OHLC = nikkei$OHLC , period = nikkei$bars_since_segment )
Calculates Anchored Volume-Weighted Average Price (VWAP)
anchoredVWAP(HLC3, volume, period)anchoredVWAP(HLC3, volume, period)
HLC3 |
Vector of High, Low, Close Average Values |
volume |
Vector of Volume values |
period |
Vector of bars since start of fixed period |
Vector of Anchored VWAP values
data(nikkei) anchoredVWAP( HLC3 = nikkei$HLC3 , volume = nikkei$Volume , period = nikkei$bars_since_segment )data(nikkei) anchoredVWAP( HLC3 = nikkei$HLC3 , volume = nikkei$Volume , period = nikkei$bars_since_segment )
An example data set of OHLCV data for Nikkei 225 (Osaka), Active Daily Continuation
data("nikkei")data("nikkei")
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
data(nikkei) ## maybe str(nikkei) ; plot(nikkei) ...data(nikkei) ## maybe str(nikkei) ; plot(nikkei) ...
Calculates True Range-Weighted Average Price (TrueWAP)
TrueWAP(high, low, close, true_range, period)TrueWAP(high, low, close, true_range, period)
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 |
Vector of TrueWAP values
data(nikkei) TrueWAP( high = nikkei$High , low = nikkei$Low , close = nikkei$Close , true_range = nikkei$tr , period = 50)data(nikkei) TrueWAP( high = nikkei$High , low = nikkei$Low , close = nikkei$Close , true_range = nikkei$tr , period = 50)
Calculates Time-Weighted Average Price (TWAP)
TWAP(OHLC, period)TWAP(OHLC, period)
OHLC |
Data frame object with Open, High, Low, & Close fields |
period |
Rolling window length |
Vector of TWAP values
data(nikkei) TWAP(nikkei$OHLC, 50)data(nikkei) TWAP(nikkei$OHLC, 50)
Calculates Volume-Weighted Average Price (VWAP)
VWAP(HLC3, volume, period)VWAP(HLC3, volume, period)
HLC3 |
Vector of High, Low, Close Average Values |
volume |
Vector of Volume values |
period |
Rolling window length |
Vector of VWAP values
data(nikkei) VWAP(nikkei$HLC3, nikkei$Volume, 50)data(nikkei) VWAP(nikkei$HLC3, nikkei$Volume, 50)