計算方法如下:
R3 (阻力點3) = H (高) + 2 x ( P - L (低) )
R2 (阻力點2) = P + (H(高) - L(低)) = P + (R1(阻力點1) - S1(支撐點1))
R1 (阻力點1) = (P x 2) - L(低)
P(Pivot Point) = (H (高)+ L(低) + C(收盤價) / 3
S1(支撐點1) = (P x 2) - H(高)
S2(支撐點2) = P - (H(高) - L(低)) = P - (R1(R1(阻力點1) - S1(支撐點1))
S3(支撐點3) = L(低) - 2 x (H(高) - P)
大部份只使用到 R1、R2、S1、S2,當然…你可以無限的延續下去…計算出很多的支稱和壓力…簡單的指標程式碼如下:
vars:line3(0), line4(0), line5(0), line6(0), line7(0), count(0);
if date[0] <> date[1] then begin
line5 = (highd(1)+lowd(1)+closed(1))/3;
line4 = line5 * 2 - lowd(1);
line3 = line5 + (highd(1)-lowd(1));
line6 = line5 * 2 - highd(1);
line7 = line5 - (highd(1)-lowd(1));
count = 0;
end;
plot1(line3, "line3", red, red, 1);
plot2(line4, "line4", yellow, red, 2);
plot3(line6, "line6", blue, blue, 1);
plot4(line7, "line7", yellow, blue, 2);
這個程式碼是在分線內利用日線資料畫出支稱和壓力…畫出來的圖會如下所示:
好好利用這些資料是會有不錯的成效的。
請問想加上P中心價,完整程式碼要如何改呢,謝謝大大,阿仁
回覆刪除line5 就是中心價了...
回覆刪除