Current location - Trademark Inquiry Complete Network - Futures platform - Calculation formula of SAR indicator
Calculation formula of SAR indicator

Unlike MACD, DMI and other indicators, the calculation formula of the SAR indicator is quite complicated. The calculation of SAR is mainly based on the calculation of the constantly changing SAR in each cycle, that is, the calculation of the stop loss price. Before calculating SAR, you must first select a period, such as n days or n weeks, etc. The parameters of n days or weeks are generally 4 days or 4 weeks. Next, determine whether the stock price in this cycle is rising or falling, and then calculate the SAR value according to the step-by-step reasoning method.

Calculate the SAR value of Tn period as an example. The calculation formula is as follows:

SAR(Tn)=SAR(Tn-1)+AF(Tn)*[EP(Tn-1) )-SAR(Tn-1)]

Among them, SAR(Tn) is the SAR value of the Tnth period, and SAR(Tn-1) is the value of the (Tn-1)th period

AF is the acceleration factor (or acceleration coefficient), and EP is the extreme price (the highest price or the lowest price)

When calculating the SAR value, you should pay attention to the following principles:

< p>1. Determination of the initial value SAR(T0)

If SAR(T1) has an upward trend in the T1 period, then SAR(T0) is the lowest price of the T0 period. If there is a downward trend in the T1 period, then SAR (T0) is the highest price of the T0 period;

2. Determination of the extreme price EP

If the Tn period is an upward trend, EP (Tn-1) is the Tn-1 period The highest price, if the Tn period is a downward trend, EP(Tn-1) is the lowest price of the Tn-1 period;

3. Determination of the acceleration factor AF

(a) Acceleration The initial value of the factor is 0.02, that is, AF(T0)=0.02;

(b) If Tn-1 and Tn periods are both upward trends, when the highest price in Tn period > the highest price in Tn-1 period price, then AF(Tn)=AF(Tn-1)+0.02, when the highest price of Tn period <= the highest price of Tn-1 period, then AF(Tn)=AF(Tn-1), but the acceleration factor AF The maximum does not exceed 0.2;

(c) If Tn-1 and Tn periods are both downward trends, when the lowest price of Tn period = the lowest price in period Tn-1, then AF(Tn)=AF(Tn-1);

(d) Any market price For any change, the acceleration factor AF must be calculated again from 0.02;

For example, the Tn-1 cycle is an upward trend, and the Tn cycle is a downward trend (or Tn-1 falls, Tn rises), AF(Tn) It needs to be recalculated based on 0.02, that is, AF(Tn)=AF(T0)=0.02;

(e) The maximum acceleration factor AF does not exceed 0.2. When AF>0.2, AF needs to be recalculated by Starting from 0.02;

4. Determination of SAR value

(a) Through the formula SAR(Tn)=SAR(Tn-1)+AF(Tn)*[EP(Tn- 1)-SAR(Tn-1)], calculate the value of the Tn period;

(b) If the Tn period is an upward trend, when SAR(Tn)>the lowest price of the Tn period (or SAR( Tn)>the lowest price in Tn-1 period), then the final SAR value in Tn period should be the minimum value among the lowest prices in Tn-1 and Tn period,

When SAR(Tn)<=Tn period The lowest price and SAR(Tn)<=the lowest price of Tn-1 period, then the final SAR value of Tn period is SAR(Tn), that is, SAR=SAR(Tn);

(c) If Tn The cycle is a downward trend. When SAR(Tn)

When SAR(Tn)>=the highest price of Tn period and SAR(Tn)>=the highest price of Tn-1 period, then the final SAR value of Tn period is SAR(Tn), That is, SAR=SAR(Tn);

5. The parameter of the calculation base period of the SAR indicator period is 2, such as 2 days, 2 weeks, 2 months, etc., and the parameter variation range of the calculation period is 2- 8.

6. The calculation method and process of the SAR indicator are relatively cumbersome. For investors, as long as they master the calculation process and principles, in actual operations, investors do not need to calculate the SAR value by themselves. More importantly, investors Investors should flexibly grasp and use the research and judgment methods and functions of SAR indicators.

[1]