I believe that the formulas to calculate R3 & S3 are in error.
r3 = pp + 2 * (currentHigh - currentLow);
s3 = pp - 2 * (currentHigh - currentLow);
The best I can tell, the formulas should be:
r3 = r1 + (currentHigh - currentLow);
s3 = s1 - (currentHigh - currentLow);
I know that there are different ways to calculate different kinds of pivots. In looking at the code it looked like the pivots being calculated are Floor Pivots. If I'm wrong, please tell me what kind of pivots are being calculated and a reference for the formulas. This would be useful to know.
Thanks in advance
Comment