[程式碼]KDJ指標
這是之前在AFL Library看到的,現在要註冊才能進去看這種計算方式似乎與精業版的KDJ相似,而與AB原有的KD不太一樣_SECTION_BEGIN("Stochastic %J");
printf("The KDJ indicator is actually a derived form of the Stochastic with the
only difference being an extra line called the J line." +
" The J line represents the divergence of the %D value from the %K. The value
of J can go beyond for %K and %D lines on the chart." +
"\nTrading Signals: A negative value of J combined with %K and %D at the bottom
range indicates a strong over sold signal." +
" Likewise, when the J value goes above 100, combined with %K and %D at the top
range, it will indicate a strong over bought signal. " +
"\nSettings: Default:14 period, 3 period, 1 period");
N = param("Range", 9, 2, 20, 1);
M1 = param("%K Period", 3, 1, 20, 1);
M2 = param("%D Period", 3, 1, 20, 1);
RSV = (CLOSE - LLV(LOW, N))/(HHV(HIGH, N)- LLV(LOW, N)) * 100;
K = EMA(RSV, M1);
D = EMA(K, M2);
J = 3 * K-2 * D;
plot(J, "Stochastic %J", colorred);
plot(D, "Stochastic %D", colorblue);
plot(K, "Stochastic %K", colorgreen);
plot(80, "", colorblack);
plot(20, "", colorblack);
_SECTION_END();順便問一下,KD指標還有分快、慢不同版本(不是指快、慢線),這其中的區別何在? 本帖最後由 飛砂風中轉 於 11-3-25 10:19 PM 編輯
"快速KD"作法是以KD線的快線作慢線..而KD線的快線不作平滑處理所形成快線所畫成的..其用法跟KD線一樣。 我把我的策略化為簡單的電腦程式。長線賺錢其實不難。順勢而為 我把我的策略化為簡單的電腦程式。長線賺錢其實不難。順勢而為
bbdcd 發表於 11-3-26 12:34 AM http://www.coco-in.net/images/common/back.gif
厲害喔! 恭喜啦~~ 非常感謝樓上的幾位大大.程式真的學無止境,永遠都有改善的空間. 本帖最後由 gofeel168 於 11-3-27 10:11 AM 編輯
感謝!又給小弟一個新的思考方向!{:4_151:} 謝謝fygul大分享指標 謝fygul大詳細說明
謝fygul大 回復 2# 飛砂風中轉
原來如此。以前看到Slow KD就傻眼了。因有些券商提供的KD指標只有Slow版,用起來還真不習慣。 一定有甚麼玄機~有甚麼玄機~ 上面的RSV要改一下,不然會出問題v1=HHV(High, Range);
v2=LLV(Low, Range);
RSV = IIf((V1==V2), 50, (Close - v2)/ (v1- v2) * 100);還有,這與精業版的不一樣,之前弄錯了
頁:
[1]