黃金分割,手機(jī)版也適用指標(biāo) 公式 源碼[通達(dá)信公式]
指標(biāo)公式源碼分析及使用參考說(shuō)明:
這段代碼是一個(gè)技術(shù)指標(biāo)的公式,包含了多個(gè)指標(biāo)的計(jì)算和繪圖。下面是各個(gè)指標(biāo)的創(chuàng)建思路和使用說(shuō)明:
1. MAA5:MA(C,5)
?? - 創(chuàng)建思路:計(jì)算收盤價(jià)的5日移動(dòng)平均線
?? - 使用說(shuō)明:用于觀察收盤價(jià)的短期趨勢(shì),當(dāng)價(jià)格位于MAA5之上時(shí),可能存在上漲趨勢(shì)。
2. MAA10:=MA(C,10)
?? - 創(chuàng)建思路:計(jì)算收盤價(jià)的10日移動(dòng)平均線
?? - 使用說(shuō)明:與MAA5類似,用于觀察收盤價(jià)的中期趨勢(shì)。
3. MAA30:MA(C,30)
?? - 創(chuàng)建思路:計(jì)算收盤價(jià)的30日移動(dòng)平均線
?? - 使用說(shuō)明:與MAA5類似,用于觀察收盤價(jià)的長(zhǎng)期趨勢(shì)。
4. KS:IF(MAA10>MAA30,MAA10,MAA30)
?? - 創(chuàng)建思路:如果MAA10大于MAA30,則KS取MAA10的值,否則取MAA30的值
?? - 使用說(shuō)明:用于判斷短期趨勢(shì)是否超過(guò)中期趨勢(shì),當(dāng)KS位于MAA5之上時(shí),可能存在上漲趨勢(shì)。
5. A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100
?? - 創(chuàng)建思路:計(jì)算價(jià)格相對(duì)于過(guò)去9日最低價(jià)和最高價(jià)區(qū)間的位置百分比
?? - 使用說(shuō)明:用于判斷當(dāng)前價(jià)格在近期價(jià)格區(qū)間的位置,當(dāng)A3接近100時(shí),表示價(jià)格接近最高點(diǎn)。
6. A4:=SMA(A3,3,1)
?? - 創(chuàng)建思路:計(jì)算A3的3日簡(jiǎn)單移動(dòng)平均線
?? - 使用說(shuō)明:用于平滑A3的曲線,更加穩(wěn)定地觀察價(jià)格位置。
7. A5:=SMA(A4,3,1)
?? - 創(chuàng)建思路:計(jì)算A4的3日簡(jiǎn)單移動(dòng)平均線
?? - 使用說(shuō)明:與A4類似,進(jìn)一步平滑A4的曲線。
8. A6:=3*A4-2*A5
?? - 創(chuàng)建思路:計(jì)算A4和A5的加權(quán)平均值
?? - 使用說(shuō)明:用于進(jìn)一步平滑A4和A5的曲線,更加穩(wěn)定地觀察價(jià)格位置。
9. A7:=C-REF(C,1)
?? - 創(chuàng)建思路:計(jì)算收盤價(jià)的變化值
?? - 使用說(shuō)明:用于觀察連續(xù)兩天收盤價(jià)的變化情況,當(dāng)A7大于0時(shí),表示上漲,小于0時(shí),表示下跌。
10. A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6)
??? - 創(chuàng)建思路:計(jì)算A7的指數(shù)移動(dòng)平均線,并進(jìn)行一定的調(diào)整
??? - 使用說(shuō)明:用于觀察價(jià)格變化的強(qiáng)度和趨勢(shì),當(dāng)A8大于0時(shí),表示上漲趨勢(shì)較強(qiáng)。
11. 買:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))
??? - 創(chuàng)建思路:根據(jù)A8的條件判斷是否滿足買入信號(hào)
??? - 使用說(shuō)明:用于判斷價(jià)格下跌后,是否存在買入的機(jī)會(huì)。具體的條件判斷需要根據(jù)實(shí)際情況進(jìn)行調(diào)整。
以上是各個(gè)指標(biāo)的創(chuàng)建思路和使用說(shuō)明,根據(jù)實(shí)際需求可以進(jìn)行參數(shù)的調(diào)整和組合來(lái)應(yīng)用于具體的股票分析中。
?
源碼:
MAA5:MA(C,5),COLORFF00FF,LINETHICK2;MAA10:=MA(C,10);MAA30:MA(C,30),COLORRED;KS:IF(MAA10>MAA30,MAA10,MAA30),COLORBLUE;A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;A4:=SMA(A3,3,1);A5:=SMA(A4,3,1);A6:=3*A4-2*A5;A7:=C-REF(C,1);A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);買:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));cxh1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);cxh2:=REF(cxh1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh3:=REF(cxh2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxh4:=REF(cxh3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh5:=REF(cxh4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxh6:=REF(cxh5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh7:=REF(cxh6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxh8:=REF(cxh7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh9:=REF(cxh8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxhA:=REF(cxh9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxhB:=REF(cxhA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxhC:=REF(cxhB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);STICKLINE(cxh1 OR cxh2 OR cxh3 OR cxh4 OR cxh5 OR cxh6 OR cxh7 ORcxh8 OR cxh9 OR cxhA OR cxhB OR cxhC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{紅1}cxhD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);cxhE:=REF(cxhD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxhF:=REF(cxhE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh10:=REF(cxhF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxh11:=REF(cxh10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh12:=REF(cxh11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxh13:=REF(cxh12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh14:=REF(cxh13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxh15:=REF(cxh14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh16:=REF(cxh15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);cxh17:=REF(cxh16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);cxh18:=REF(cxh17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);STICKLINE(cxhD OR cxhE OR cxhF OR cxh10 OR cxh11 OR cxh12 OR cxh13 ORcxh14 OR cxh15 OR cxh16 OR cxh17 OR cxh18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;cxh19:=REF(cxhD OR cxhE OR cxhF OR cxh10 OR cxh11 OR cxh12 OR cxh13 ORcxh14 OR cxh15 OR cxh16 OR cxh17 OR cxh18,1) AND cxh1;STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;cxh1A:=REF(cxh1 OR cxh2 OR cxh3 OR cxh4 OR cxh5 OR cxh6 OR cxh7 ORcxh8 OR cxh9 OR cxhA OR cxhB OR cxhC,1) AND cxhD;STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),5,2),COLOR00FF00;STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;STICKLINE(cxh19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10FFFF;STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00D900;STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;STICKLINE(cxh1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090FF2;PMA:MA(C,5),COLORWHITE,LINETHICK2;IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;T:=150;TT:=3;N1:=0;高1:=REF(HHV(H,T),TT);低1:=REF(LLV(L,T),TT);H1:=高1-(高1-低1)*0.191;H2:=高1-(高1-低1)*0.382;H3:=高1-(高1-低1)*0.5;H4:=高1-(高1-低1)*0.618;H5:=高1-(高1-低1)*0.809;頂:REFDATE(高1,DATE),COLORFFFF00;一:REFDATE(H1,DATE),DOTLINE,COLORYELLOW;二:REFDATE(H2,DATE),DOTLINE,COLORMAGENTA;三:REFDATE(H3,DATE),DOTLINE,COLOR00FFFF;四:REFDATE(H4,DATE),DOTLINE,COLORMAGENTA;五:REFDATE(H5,DATE),DOTLINE,COLORYELLOW;低:REFDATE(低1,DATE),COLOR00FF00;TT4:=(CURRBARSCOUNT=1);DRAWTEXT(TT4 AND 頂,頂,'頂'),COLOR208FFF;DRAWTEXT(TT4 AND 一,一,'0.809'),COLOR208FFF;DRAWTEXT(TT4 AND 二,二,'0.618'),COLOR208FFF;DRAWTEXT(TT4 AND 三,三,'0.5'),COLOR208FFF;DRAWTEXT(TT4 AND 四,四,'0.382'),COLOR208FFF;DRAWTEXT(TT4 AND 五,五,'0.191'),COLOR208FFF;DRAWTEXT(TT4 AND 低,低*1.009,'底'),COLOR208FFF;漲停:=BETWEEN(CLOSE/REF(CLOSE,1),1.0984,1.110) AND C=H AND C>O; {藍(lán)心板}R1:=(C>REF(C,1) AND C>REF(C,2));R2:=(REF(R1,1) AND C<=REF(C,1) AND C>=REF(C,2));R3:=(REF(R2,1) AND C>=REF(C,1) AND C<=REF(C,2));R4:=(REF(R3,1) AND C<=REF(C,1) AND C>=REF(C,2));R5:=(REF(R4,1) AND C>=REF(C,1) AND C<=REF(C,2));R6:=(REF(R5,1) AND C<=REF(C,1) AND C>=REF(C,2));R7:=(REF(R6,1) AND C>=REF(C,1) AND C<=REF(C,2));R8:=(REF(R7,1) AND C<=REF(C,1) AND C>=REF(C,2));R9:=(REF(R8,1) AND C>=REF(C,1) AND C<=REF(C,2));RA:=(REF(R9,1) AND C<=REF(C,1) AND C>=REF(C,2));RB:=(REF(RA,1) AND C>=REF(C,1) AND C<=REF(C,2));RC:=(REF(RB,1) AND C<=REF(C,1) AND C>=REF(C,2));RD:=(C<REF(C,1) AND C<REF(C,2));RE:=(REF(RD,1) AND C>=REF(C,1) AND C<=REF(C,2));RF:=(REF(RE,1) AND C<=REF(C,1) AND C>=REF(C,2));R10:=(REF(RF,1) AND C>=REF(C,1) AND C<=REF(C,2));R11:=(REF(R10,1) AND C<=REF(C,1) AND C>=REF(C,2));R12:=(REF(R11,1) AND C>=REF(C,1) AND C<=REF(C,2));R13:=(REF(R12,1) AND C<=REF(C,1) AND C>=REF(C,2));R14:=(REF(R13,1) AND C>=REF(C,1) AND C<=REF(C,2));R15:=(REF(R14,1) AND C<=REF(C,1) AND C>=REF(C,2));R16:=(REF(R15,1) AND C>=REF(C,1) AND C<=REF(C,2));R17:=(REF(R16,1) AND C<=REF(C,1) AND C>=REF(C,2));R18:=(REF(R17,1) AND C>=REF(C,1) AND C<=REF(C,2));R19:=((REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1)) AND R1);R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);藍(lán)心板:=REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1); {綠心板}RSV9:=(C-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K1:=SMA(RSV9,3,1); DK1:=K1-REF(K1,1);出手就贏:=IF(DK1>7 AND REF(DK1,1)<0 AND (DK1-REF(DK1,1))>9,50,0);綠心板:=(出手就贏=50 OR REF("KDJ.J",1)<0) AND "KDJ.J">0;紅心板:=藍(lán)心板 AND 綠心板;紅色持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC;短進(jìn):=R19;青色觀望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18;急速超跌:=(C-MA(C,34))/MA(C,34)*100<-14;品紅離場(chǎng):=R1A;STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(紅色持股,C,O,2.8,0),COLOR000055;STICKLINE(紅色持股,C,O,2,0),COLOR000088;STICKLINE(紅色持股,C,O,1.5,0),COLOR0000AA;STICKLINE(紅色持股,C,O,1,0),COLOR0000CC;STICKLINE(紅色持股,C,O,0.5,0),COLOR0000EE;STICKLINE(青色觀望,C,O,2.8,0),COLOR555500;STICKLINE(青色觀望,C,O,2,0),COLOR888800;STICKLINE(青色觀望,C,O,1.5,0),COLORAAAA00;&
?
公式導(dǎo)入教程: 【通達(dá)信公式源碼導(dǎo)入方法教程】 【同花順公式源碼導(dǎo)入方法教程】 【大智慧新一代公式源碼導(dǎo)入方法教程】
?
有思路,想編寫各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 或微信:cxhjy888 進(jìn)行 有償收費(fèi) 編寫!(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無(wú)法通過(guò)。謝謝您!)
(怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊查閱!)
(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無(wú)法通過(guò)。謝謝您!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容