Utilities
Typical Price
MarketTechnicals.typical
— Functiontypical(ohlc::TimeArray; h = :High, l = :Low, c = :Close)
Typical Price
\[\text{Typical Price} = \frac{P^\text{High} + P^\text{Low} + P^\text{Close}}{3}\]
julia> merge(ohlc, typical(ohlc))
500×5 TimeArray{Float64,2,Date,Array{Float64,2}} 2000-01-03 to 2001-12-31
│ │ Open │ High │ Low │ Close │ typical │
├────────────┼────────┼────────┼────────┼────────┼──────────┤
│ 2000-01-03 │ 104.88 │ 112.5 │ 101.69 │ 111.94 │ 108.71 │
│ 2000-01-04 │ 108.25 │ 110.62 │ 101.19 │ 102.5 │ 104.77 │
│ 2000-01-05 │ 103.75 │ 110.56 │ 103.0 │ 104.0 │ 105.8533 │
│ 2000-01-06 │ 106.12 │ 107.0 │ 95.0 │ 95.0 │ 99.0 │
│ 2000-01-07 │ 96.5 │ 101.0 │ 95.5 │ 99.5 │ 98.6667 │
│ 2000-01-10 │ 102.0 │ 102.25 │ 94.75 │ 97.75 │ 98.25 │
│ 2000-01-11 │ 95.94 │ 99.38 │ 90.5 │ 92.75 │ 94.21 │
│ 2000-01-12 │ 95.0 │ 95.5 │ 86.5 │ 87.19 │ 89.73 │
│ ⋮ │ ⋮ │ ⋮ │ ⋮ │ ⋮ │ ⋮ │
│ 2001-12-20 │ 21.4 │ 21.47 │ 20.62 │ 20.67 │ 20.92 │
│ 2001-12-21 │ 21.01 │ 21.54 │ 20.8 │ 21.0 │ 21.1133 │
│ 2001-12-24 │ 20.9 │ 21.45 │ 20.9 │ 21.36 │ 21.2367 │
│ 2001-12-26 │ 21.35 │ 22.3 │ 21.14 │ 21.49 │ 21.6433 │
│ 2001-12-27 │ 21.58 │ 22.25 │ 21.58 │ 22.07 │ 21.9667 │
│ 2001-12-28 │ 21.97 │ 23.0 │ 21.96 │ 22.43 │ 22.4633 │
│ 2001-12-31 │ 22.51 │ 22.66 │ 21.83 │ 21.9 │ 22.13 │