Category 6

計算 KD 值的方法

這幾天計算KD發現一堆網站都錯誤
到最後在WIKI上的公式才是正確的

日期
收盤
5日內出現高價
5日內出現低價
RSV
K
D
2015-01-05 17.3 16 17.3          
2015-01-06 17.6 17.1 17.2          
2015-01-07 18.3 16.9 17.7          
2015-01-08 18.9 18.3 18.9       50 50
2015-01-09 19 18.5 18.5 19 16 0.833333 33.61111 44.53704
2015-01-12 19.15 18.35 18.35 19.15 16.9 0.644444 22.62222 37.2321
2015-01-13 18.6 18.15 18.25 19.15 16.9 0.6 15.28148 29.91523
2015-01-14 18.7 18.25 18.3 19.15 18.15 0.15 10.23765 23.35604
2015-01-15 18.6 18.15 18.15 19.15 18.15 0 6.825103 17.84572
2015-01-16 18.3 17.6 17.8 19.15 17.6 0.129032 4.593079 13.42818
2015-01-19 18.75 18.25 18.5 18.75 17.6 0.782609 3.322922 10.05976
2015-01-20 18.75 18.25 18.6 18.75 17.6 0.869565 2.505137 7.541551
2015-01-21 18.3 17.3 17.3 18.75 17.3 0 1.670091 5.584398
2015-01-22 17.65 17.1 17.5 18.75 17.1 0.242424 1.194202 4.120999
2015-01-23 17.9 17.45 17.45 18.75 17.1 0.212121 0.866842 3.03628
2015-01-26 18.15 17.5 18 18.75 17.1 0.545455 0.759713 2.277424
2015-01-27 18.65 17.85 17.85 18.65 17.1 0.483871 0.667765 1.740871
2015-01-28 18.2 17.85 18.2 18.65 17.1 0.709677 0.681736 1.387826
2015-01-29 18.5 18.15 18.45 18.65 17.45 0.833333 0.732269 1.169307

計算5日 K線
需要用到的資料:每天高價.低價.收盤價

把上面資料放到EXCEL裡面

  1. 找出5日內高價
    E6=MAX(B2:B6)
    往下拉
  2. 找出5日內低價
    F6=MIN(C2:C6)
    往下拉
  3. 算 RSV
    G6=(D6-F6)/(E6-F6)*100%
  4. 算 K
    H6=(1/3)*G6+(1-1/3)*H5
    需要用到上一個K如果沒有可以直接用50
  5. 算D
    I6=(1/3)*H6+(1-1/3)*I5
    需要用到上一個D如果沒有可以直接用50
Share on Google Plus

About jackox

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 意見:

張貼留言

Portfolio

技術提供:Blogger.

Popular Posts

總網頁瀏覽量

Accordition

Contact Info

Followus

Recent Comments

網誌存檔

Text SlideShow

Featured

About Us

Introduction

Manual Slider

Category 1

聯絡表單




Category 5