I'm starting to learn resistance / support.
I'm trying to calculate it, but i'm not sure to understand something.
Let say i have an array of 5 last trades done (i can have much more, it's just for the example) : [[1611965400000, 107.145, 107.434, 107.0, 107.029, 230.9], [1611965700000, 107.033, 107.182, 106.714, 106.73, 490.3], [1611966000000, 106.708, 106.834, 106.524, 106.545, 390.3], [1611966300000, 106.603, 106.626, 106.038, 106.154, 597.3], [1611966600000, 106.145, 106.311, 106.037, 106.188, 462.9]]
Here what value is equal in my array of data:
[
[
1504541580000, // UTC timestamp in milliseconds, integer
4235.4, // (O)pen price, float
4240.6, // (H)ighest price, float
4230.0, // (L)owest price, float
4230.7, // (C)losing price, float
37.72941911 // (V)olume (in terms of the base currency), float
],
...
]
To calculate the pivot /support / resistance i have to do that :
pp = (high + low + close) / 3
r1 = 2 * pp - low
s1 = 2 * pp - high
But, for high / low / close, should i take the average of all my data in array? or should i take only the last element ? or should i take the highest for the high, the lowest for the low, but what for the close ?
Thank for your help !