Parabolic SAR

Any math people here?
How to calculate parabolic SAR given an input data array?

OK:
SAR(i) = SAR(i-1)+ACCELERATION*(EPRICE(i-1)-SAR(i-1))
Where:
SAR(i-1) — is the value of the indicator on the previous bar;
ACCELERATION — is the acceleration factor;
EPRICE(i-1) — is the highest (lowest) price for the previous period (EPRICE=HIGH for long positions and EPRICE=LOW for short positions).

The question is what to take as SAR(initial) ?

Tradingboy
 
Often in these situations people take the first price (close) N periods back.


Quote from tradingboy:

Any math people here?
How to calculate parabolic SAR given an input data array?

OK:
SAR(i) = SAR(i-1)+ACCELERATION*(EPRICE(i-1)-SAR(i-1))
Where:
SAR(i-1) — is the value of the indicator on the previous bar;
ACCELERATION — is the acceleration factor;
EPRICE(i-1) — is the highest (lowest) price for the previous period (EPRICE=HIGH for long positions and EPRICE=LOW for short positions).

The question is what to take as SAR(initial) ?

Tradingboy
 
Thanks! Thats what I suspected. N periods back - meaning set N as a parameter? Or if I have N point size data array, this has to be the first element available?

Tradingboy
 
Back
Top