關燈

改良九轉序列,配合MACD大大提高逃頂逃底的機會。

2
回復
3967
查看
[複製鏈接]
發表於 13/10/2021 07:29 | 顯示全部樓層 |閱讀模式
 

馬上註冊,結交更多好友,享用更多功能,讓你輕鬆玩轉社區。

您需要 登錄 才可以下載或查看,沒有帳號?註冊

x

程式碼:
A1 := IF(((REF(CLOSE,1) >= REF(CLOSE,5)) AND (CLOSE < REF(CLOSE,4))),1,0);
A2 := IF(((REFX(CLOSE,1) < REF(CLOSE,3)) AND (A1 = 1)),2,0);
A3 := IF(((REFX(CLOSE,2) < REF(CLOSE,2)) AND (A2 = 2)),3,0);
A4 := IF(((REFX(CLOSE,3) < REF(CLOSE,1)) AND (A3 = 3)),4,0);
A5 := IF(((REFX(CLOSE,4) < CLOSE) AND (A4 = 4)),5,0);
A6 := IF(((REFX(CLOSE,5) < REFX(CLOSE,1)) AND (A5 = 5)),6,0);
A7 := IF(((REFX(CLOSE,6) < REFX(CLOSE,2)) AND (A6 = 6)),7,0);
A8 := IF(((REFX(CLOSE,7) < REFX(CLOSE,3)) AND (A7 = 7)),8,0);
A9 := IF(((REFX(CLOSE,8) < REFX(CLOSE,4)) AND (A8 = 8)),9,0);
B1 := IF((A9 = 9),1,0);
B2 := IF((REF(A9,1) = 9),2,0);
B3 := IF((REF(A9,2) = 9),3,0);
B4 := IF((REF(A9,3) = 9),4,0);
B5 := IF((REF(A9,4) = 9),5,0);
B6 := IF((REF(A9,5) = 9),6,0);
B7 := IF((REF(A9,6) = 9),7,0);
B8 := IF((REF(A9,7) = 9),8,0);
B9 := IF((REF(A9,8) = 9),9,0);
M1 := ((((((((B1 + B2) + B3) + B4) + B5) + B6) + B7) + B8) + B9);
DRAWTEXT((M1 = 1),(LOW * 0.998),'1'),COLORMAGENTA;
DRAWTEXT((M1 = 2),(LOW * 0.998),'2'),COLORMAGENTA;
DRAWTEXT((M1 = 3),(LOW * 0.998),'3'),COLORMAGENTA;
DRAWTEXT((M1 = 4),(LOW * 0.998),'4'),COLORMAGENTA;
DRAWTEXT((M1 = 5),(LOW * 0.998),'5'),COLORMAGENTA;
DRAWTEXT((M1 = 6),(LOW * 0.998),'6'),COLORMAGENTA;
DRAWTEXT((M1 = 7),(LOW * 0.998),'7'),COLORMAGENTA;
DRAWTEXT((M1 = 8),(LOW * 0.998),'8'),COLORMAGENTA;
AA1 := IF((CLOSE < REF(CLOSE,4)),1,0);
AA2 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA1,1) = 1)),1,0);
AA3 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA2,1) = 1)),1,0);
AA4 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA3,1) = 1)),1,0);
AA5 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA4,1) = 1)),1,0);
AA6 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA5,1) = 1)),1,0);
AA7 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA6,1) = 1)),1,0);
AA8 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA7,1) = 1)),1,0);
AA9 := IF(((CLOSE < REF(CLOSE,4)) AND (REF(AA8,1) = 1)),1,0);
BB1 := IF(((AA9 = 1) AND (REF(AA9,1) = 0)),1,0);
DRAWTEXT((BB1 = 1),(LOW * 0.998),'9'),COLORGREEN;
A11 := IF(((REF(CLOSE,1) <= REF(CLOSE,5)) AND (CLOSE > REF(CLOSE,4))),1,0);
A21 := IF(((REFX(CLOSE,1) > REF(CLOSE,3)) AND (A11 = 1)),2,0);
A31 := IF(((REFX(CLOSE,2) > REF(CLOSE,2)) AND (A21 = 2)),3,0);
A41 := IF(((REFX(CLOSE,3) > REF(CLOSE,1)) AND (A31 = 3)),4,0);
A51 := IF(((REFX(CLOSE,4) > CLOSE) AND (A41 = 4)),5,0);
A61 := IF(((REFX(CLOSE,5) > REFX(CLOSE,1)) AND (A51 = 5)),6,0);
A71 := IF(((REFX(CLOSE,6) > REFX(CLOSE,2)) AND (A61 = 6)),7,0);
A81 := IF(((REFX(CLOSE,7) > REFX(CLOSE,3)) AND (A71 = 7)),8,0);
A91 := IF(((REFX(CLOSE,8) > REFX(CLOSE,4)) AND (A81 = 8)),9,0);
B11 := IF((A91 = 9),1,0);
B21 := IF((REF(A91,1) = 9),2,0);
B31 := IF((REF(A91,2) = 9),3,0);
B41 := IF((REF(A91,3) = 9),4,0);
B51 := IF((REF(A91,4) = 9),5,0);
B61 := IF((REF(A91,5) = 9),6,0);
B71 := IF((REF(A91,6) = 9),7,0);
B81 := IF((REF(A91,7) = 9),8,0);
B91 := IF((REF(A91,8) = 9),9,0);
M11 := ((((((((B11 + B21) + B31) + B41) + B51) + B61) + B71) + B81) + B91);
DRAWTEXT((M11 = 1),(HIGH * 1.004),'1'),COLORMAGENTA;
DRAWTEXT((M11 = 2),(HIGH * 1.004),'2'),COLORMAGENTA;
DRAWTEXT((M11 = 3),(HIGH * 1.004),'3'),COLORMAGENTA;
DRAWTEXT((M11 = 4),(HIGH * 1.004),'4'),COLORMAGENTA;
DRAWTEXT((M11 = 5),(HIGH * 1.004),'5'),COLORMAGENTA;
DRAWTEXT((M11 = 6),(HIGH * 1.004),'6'),COLORMAGENTA;
DRAWTEXT((M11 = 7),(HIGH * 1.004),'7'),COLORMAGENTA;
DRAWTEXT((M11 = 8),(HIGH * 1.004),'8'),COLORMAGENTA;
AA11 := IF((CLOSE > REF(CLOSE,4)),1,0);
AA21 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA11,1) = 1)),1,0);
AA31 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA21,1) = 1)),1,0);
AA41 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA31,1) = 1)),1,0);
AA51 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA41,1) = 1)),1,0);
AA61 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA51,1) = 1)),1,0);
AA71 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA61,1) = 1)),1,0);
AA81 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA71,1) = 1)),1,0);
AA91 := IF(((CLOSE > REF(CLOSE,4)) AND (REF(AA81,1) = 1)),1,0);
BB11 := IF(((AA91 = 1) AND (REF(AA91,1) = 0)),1,0);
DRAWTEXT((BB11 = 1),(HIGH * 1.004),'9'),COLORRED;




 
發表於 13/10/2021 23:28 | 顯示全部樓層
 
頂一頂!支持樓主…….  
 
發表於 14/10/2021 00:12 | 顯示全部樓層
 
支持一下!
 
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

贊助我們

微信支付

香港支付寶

服務熱線:

+852 9182 8031

Email:kc18@kc18.com

Copyright   ©2021  股票論壇 - 網上輕鬆學習