Skip to content

Support And Resistances

Ruben edited this page Feb 7, 2018 · 6 revisions

Floor pivot levels

Input: list of ohlc values
Returns the input list with a new attribute floor containing r3,r2,r1 resistances, pl pivot level and s1,s2,s3 support values.

var points = [{c:15, h:18, l:5}]
var floorValues = floorPivots (points); 
console.log(floorValues);
[ { c: 15, h: 18, l: 5,
floor: 
 { r3: 33.33333333333333,
   r2: 25.666666666666664,
   r1: 20.333333333333332,
   pl: 12.666666666666666,
   s1: 7.333333333333332,
   s2: -0.3333333333333339,
   s3: -5.666666666666668 } } ]

Tom Demarks low and high

Input: list of ohlc values.
Returns the input list with a new attribute tom containing predicted l low values and h high values.

 var points = [{h:10, l:5, o:6, c:7}, {h:15, l:8, o:10, c:11}, 
               {h:25, l:10, o:17, c:12}];
 var tomValues = tomDemarksPoints (points);
 console.log(tomValues);
 [ { h: 10, l: 5, o: 6, c: 7, tom: { l: 6, h: 11 } },
   { h: 15, l: 8, o: 10, c: 11, tom: { l: 9.5, h: 16.5 } },
   { h: 25, l: 10, o: 17, c: 12, tom: { l: 3.5, h: 18.5 } } ]

Woddies points

Input: list of ohlc values.
Returns the input with a new attribute wood containing r1,r2 resistances and s1,s2 support levels.

var points = [{h:10, l:5, c:7},  {h:15, l:8, c:11},
              {h:25, l:10, c:12},{h:10, l:8, c:9}];
var woodiesValues = woodiesPoints (points);
console.log(woodiesValues);
{ h: 10, l: 8, c: 9,
  wood: { pivot: 9, r1: 10, s1: 8, s2: 7, r2: 11 } } ]

Camarilla points

TODO

Fibonacci retracements

Input: list of ohlc values.
Returns an array containing 5 arrays for retracements of 100%, 61.8%, 50%, 38.2%, 23.6% and 0%.
The second parameter defines whether the retracements should be resistances ("UPTREND") or supports ("DOWNTREND").

var points = [{h:10, l:5}, {h:12, l:8}, {h:9, l:7}, {h:15, l:6}, {h:16, l:9}];
var resists = fibonacciRetrs (points, 'UPTREND');
console.log(resists);   
...
[[10, 8.09, 7.5, 6.91, 6.18, 5],
[12, 10.47, 10, 9.53, 8.94, 8],
[9, 8.24, 8, 7.76, 7.47, 7],
[15, 11.56, 10.50, 9.44, 8.12, 6],
[16, 13.33, 12.50, 11.67, 10.65, 9]];

var supports = fibonacciRetrs(points, "DOWNTREND");   
console.log(supports);
...
[[5, 6.91, 7.5, 8.09, 8.82, 10],
[6, 7.15, 7.5, 7.85, 8.29, 9],
[3, 3.76, 4, 4.24, 4.53, 5],
[6, 6.38, 6.5, 6.62, 6.76, 7],
[1, 1.38, 1.5, 1.62, 1.76, 2]];
Clone this wiki locally