Trade levels

Floor Trader Pivots

MarketTechnicals.floorpivotsFunction
floorpivots(ohlc::TimeArray)

Floor Trader Pivots

Formula

\[\begin{align*} R_3 & = \text{Pivot}_t + (R_2 - S_1) \\ R_2 & = \text{Pivot}_t + (R_1 - S_1) \\ R_1 & = 2 \text{Pivot}_t - P^{low}_{t-1} \\ \text{Pivot}_t & = P^{typical}_{t-1} = \frac{P^{high}_{t-1} + P^{low}_{t-1} + P^{close}_{t-1}}{3} \\ S_1 & = 2 \text{Pivot}_t - P^{high}_{t-1} \\ S_2 & = \text{Pivot}_t - (R_1 - S_1) \\ S_3 & = \text{Pivot}_t - (R_2 - S_1) \end{align*}\]

source
julia> floorpivots(ohlc)
499×7 TimeArray{Float64,2,Date,Array{Float64,2}} 2000-01-04 to 2001-12-31
│            │ s3      │ s2      │ s1       │ pivot    │ r1       │ r2       │
├────────────┼─────────┼─────────┼──────────┼──────────┼──────────┼──────────┤
│ 2000-01-04 │ 94.11   │ 97.9    │ 104.92   │ 108.71   │ 115.73   │ 119.52   │
│ 2000-01-05 │ 89.49   │ 95.34   │ 98.92    │ 104.77   │ 108.35   │ 114.2    │
│ 2000-01-06 │ 93.5867 │ 98.2933 │ 101.1467 │ 105.8533 │ 108.7067 │ 113.4133 │
│ 2000-01-07 │ 79.0    │ 87.0    │ 91.0     │ 99.0     │ 103.0    │ 111.0    │
│ 2000-01-10 │ 90.8333 │ 93.1667 │ 96.3333  │ 98.6667  │ 101.8333 │ 104.1667 │
│ 2000-01-11 │ 86.75   │ 90.75   │ 94.25    │ 98.25    │ 101.75   │ 105.75   │
│ 2000-01-12 │ 80.16   │ 85.33   │ 89.04    │ 94.21    │ 97.92    │ 103.09   │
│ 2000-01-13 │ 74.96   │ 80.73   │ 83.96    │ 89.73    │ 92.96    │ 98.73    │
│ ⋮          │ ⋮       │ ⋮       │ ⋮        │ ⋮        │ ⋮        │ ⋮        │
│ 2001-12-20 │ 19.6233 │ 20.0467 │ 20.8333  │ 21.2567  │ 22.0433  │ 22.4667  │
│ 2001-12-21 │ 19.52   │ 20.07   │ 20.37    │ 20.92    │ 21.22    │ 21.77    │
│ 2001-12-24 │ 19.9467 │ 20.3733 │ 20.6867  │ 21.1133  │ 21.4267  │ 21.8533  │
│ 2001-12-26 │ 20.4733 │ 20.6867 │ 21.0233  │ 21.2367  │ 21.5733  │ 21.7867  │
│ 2001-12-27 │ 19.8267 │ 20.4833 │ 20.9867  │ 21.6433  │ 22.1467  │ 22.8033  │
│ 2001-12-28 │ 21.0133 │ 21.2967 │ 21.6833  │ 21.9667  │ 22.3533  │ 22.6367  │
│ 2001-12-31 │ 20.8867 │ 21.4233 │ 21.9267  │ 22.4633  │ 22.9667  │ 23.5033  │

Woodies Pivots

MarketTechnicals.woodiespivotsFunction
woodiespivots(ohlc::TimeArray)

Woodie's Pivot

Formula

\[\begin{align*} \text{Range} & = P^{high}_{t-1} - P^{low}_{t-1} \\ R_4 & = S_4 + \text{Range} \tag{not implemented} \\ R_3 & = R_1 + \text{Range} \\ R_2 & = \text{Pivot}_t + \text{Range} \\ R_1 & = 2 \text{Pivot}_t - P^{low}_{t-1} \\ \text{Pivot}_t & = frac{P^{high}_{t-1} + P^{low}_{t-1} + 2 P^{open}_t}{4} \\ S_1 & = 2 \text{Pivot}_t - P^{high}_{t-1} \\ S_2 & = \text{Pivot}_t - \text{Range} \\ S_3 & = S1 - \text{Range} \\ S_4 & = S3 - \text{Range} \tag{not implemented} \end{align*}\]

source
julia> woodiespivots(ohlc)
499×7 TimeArray{Float64,2,Date,Array{Float64,2}} 2000-01-04 to 2001-12-31
│            │ s3     │ s2      │ s1      │ pivot    │ r1      │ r2       │
├────────────┼────────┼─────────┼─────────┼──────────┼─────────┼──────────┤
│ 2000-01-04 │ 92.035 │ 96.8625 │ 102.845 │ 107.6725 │ 113.655 │ 118.4825 │
│ 2000-01-05 │ 89.605 │ 95.3975 │ 99.035  │ 104.8275 │ 108.465 │ 114.2575 │
│ 2000-01-06 │ 94.78  │ 98.89   │ 102.34  │ 106.45   │ 109.9   │ 114.01   │
│ 2000-01-07 │ 78.5   │ 86.75   │ 90.5    │ 98.75    │ 102.5   │ 110.75   │
│ 2000-01-10 │ 93.75  │ 94.625  │ 99.25   │ 100.125  │ 104.75  │ 105.625  │
│ 2000-01-11 │ 84.69  │ 89.72   │ 92.19   │ 97.22    │ 99.69   │ 104.72   │
│ 2000-01-12 │ 81.68  │ 86.09   │ 90.56   │ 94.97    │ 99.44   │ 103.85   │
│ 2000-01-13 │ 80.98  │ 83.74   │ 89.98   │ 92.74    │ 98.98   │ 101.74   │
│ ⋮          │ ⋮      │ ⋮       │ ⋮       │ ⋮        │ ⋮       │ ⋮        │
│ 2001-12-20 │ 19.585 │ 20.0275 │ 20.795  │ 21.2375  │ 22.005  │ 22.4475  │
│ 2001-12-21 │ 19.735 │ 20.1775 │ 20.585  │ 21.0275  │ 21.435  │ 21.8775  │
│ 2001-12-24 │ 19.79  │ 20.295  │ 20.53   │ 21.035   │ 21.27   │ 21.775   │
│ 2001-12-26 │ 20.525 │ 20.7125 │ 21.075  │ 21.2625  │ 21.625  │ 21.8125  │
│ 2001-12-27 │ 19.84  │ 20.49   │ 21.0    │ 21.65    │ 22.16   │ 22.81    │
│ 2001-12-28 │ 20.965 │ 21.2725 │ 21.635  │ 21.9425  │ 22.305  │ 22.6125  │
│ 2001-12-31 │ 20.95  │ 21.455  │ 21.99   │ 22.495   │ 23.03   │ 23.535   │