Rsv for n days = (cn-ln)/(HN-ln) ×100.
In the formula, Cn is the closing price on the nth day; Ln is the lowest price in n days; Hn is the highest price for n days.
Secondly, calculate the values of k and d:
K value of the current day = 2/3× K value of the previous day +65438+ 0/3× RSV of the current day.
D value of current day = 2/3× D value of previous day +65438+ 0/3× K value of current day.
If there is no K value and D value of the previous day, you can use 50 instead.
J value =3* K value of the day -2* D value of the day.
Taking the KD line with a period of 9 days as an example, that is, the immature random value, the calculation formula is as follows:
No.9 RSV = (C-L9) ÷ (H9-L9) × 100
In the formula, C is the closing price on the 9th day; L9 is the lowest price in 9 days; H9 is the highest price in 9 days.
K value = 2/3× K value on the 8th day +65438+ 0/3× RSV on the 9th day.
D value = 2/3× D value on the 8th day +65438+ 0/3× K value on the 9th day.
J value =3* days 9 K value -2* days 9 D value
If there is no K value and D value of the previous day, you can use 50 instead.
Extended data:
The origin and principle of KDJ index
1, origin
The Chinese name of KDJ index, also called stochastics, originated from the futures market and was created by George ryan.
Lane) pioneered. Stochastics KDJ first appeared in the form of KD index, which was developed on the basis of William index.
However, the KD indicator only judges the overbought and oversold phenomenon of stocks, while the KDJ indicator combines the concept of moving average speed to form a more accurate basis for buying and selling signals. In practice, K-line and D-line cooperate with J-line to form KDJ index.
In the design process, KDJ index mainly studies the relationship between the highest price, the lowest price and the closing price, and also integrates some advantages of momentum concept, power index and moving average. Therefore, it can judge the market quickly, quickly and intuitively, and is widely used in the short-term trend analysis of the stock market. It is the most commonly used technical analysis tool for futures and stock markets.
2. Indicator principle
Random indicator KDJ is a point formed by calculating the highest price, lowest price and closing price. The obtained K value, D value and J value are respectively on the coordinate of the indicator, and countless such points are connected to form a complete KDJ indicator that can reflect the price fluctuation trend.
It is a technical tool that mainly uses the real amplitude of price fluctuation to reflect the strength of price trend and the phenomenon of overbought and oversold, and sends out buying and selling signals before the price rises or falls. In the design process, the relationship between the highest price, the lowest price and the closing price is mainly studied, and some advantages of the concept of momentum, power index and moving average are also integrated.
Therefore, you can judge the market quickly, quickly and intuitively. Because KDJ line is essentially a concept of random fluctuation, it is more accurate to grasp the short-term trend of the market.
Baidu Encyclopedia -KDJ Index