初入股市的投資者學(xué)習(xí)了解最多的就是技術(shù)指標(biāo),比如是macd、kdj、rsi等都是可以研判個(gè)股買賣點(diǎn)以及趨勢(shì)變化的實(shí)用性指標(biāo),當(dāng)然也有部分的投資者喜歡借用股票行情軟件進(jìn)行分析,其中最重要的是要明白指標(biāo)公式的源碼內(nèi)容,下面我們通過macd量線金叉的指標(biāo)公式源碼進(jìn)行解說:
首先,macd指標(biāo)是有diff與dea兩條線組成的,兩線在低位形成金叉的形態(tài)是一種買入的信號(hào),在高位形成死叉的狀態(tài)是賣出點(diǎn)位,其具體的源碼如下:
DIFF:(EMA(CLOSE,12) - EMA(CLOSE,26))*20,COLORFFFFFF,LINETHICK1;
DEA:EMA(DIFF,9),COLOR00FFFF,LINETHICK1;
MACD:2*(DIFF-DEA), COLORSTICK;
MACD1:2*(DIFF-DEA),COLORRED,LINETHICK0;
MACD2:SMA(MACD1,0,3),COLORFFFF00,LINETHICK0;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2,0),COLOR00FFFF;
STICKLINE(MACD1
S1:=MACD<0;
S2:= (MACD>=0);
S3:=BARSLAST(CROSS(DIFF,DEA));
S4:=REF(S3,S3+1);
S5:=DEA>REF(DEA,S4);
S6:=DEA;
上成立:=CROSS(DIFF,DEA) AND S5;
下成立:=CROSS(DIFF,DEA) AND S6;
L1:=(EMA(CLOSE,3) - EMA(CLOSE,13));
L2:=EMA(L1,9);
L3:=BARSLAST(CROSS(L1,L2));
L4:=REF(L3,L3+1);
L5:=L2;
變盤:CROSS(L1,L2) AND L5,LINETHICK0,COLORD6FF9C;
STICKLINE(變盤,5,-5,4,1),COLORD6FF9C;
成立距今:BARSLAST(CROSS(DIFF,DEA)),LINETHICK0;
L6:=BARSCOUNT(CLOSE);
DRAWTEXT(CROSS(L1,L2),DIFF,'買'),COLOR0000FF;
DRAWTEXT(CROSS(L2,L1),DIFF,'賣'),COLORFFFF00;
REF(DEA,S3),POINTDOT,COLORGREEN;
IF(L1>L2,REF(DEA,S3),0),POINTDOT,LINETHICK5,COLORB078FF;
IF(MACD<0,REF(DEA,S3),0),POINTDOT,LINETHICK5,COLORGREEN;
LS:=IF(DIFF>DEA AND DIFF>0,1,0);
加速上揚(yáng):IF(REF(LS=0,1) AND LS=1,0.1,0);
XG1:CROSS(MACD1,MACD2) AND MACD1<0,LINETHICK0;
XG2:CROSS(DIFF,DEA),LINETHICK0;
M1:=MACD>REF(MACD,1) AND DIFF
綠柱短了:M1 AND COUNT(M1,10)=1 AND C>MA(C,55) AND COUNT(MACD<0,5)>=5,LINETHICK0;
DRAWTEXT(綠柱短了,MACD,'綠柱短了'),COLOR00FF80;
從源碼公式中能夠分辨出不同的指標(biāo)點(diǎn)位操作方法是不同的,投資者需要注意的就是股價(jià)的變盤點(diǎn)位以及實(shí)戰(zhàn)中個(gè)股加速上揚(yáng)的啟動(dòng)點(diǎn),把握好其中的操作機(jī)會(huì)。
以上就是本文講解的關(guān)于股市中macd指標(biāo)源碼的操作公式,主要是金叉買入信號(hào)的技巧,如果您還想要了解更加專業(yè)的技術(shù)分析知識(shí)或者是操作案例,請(qǐng)點(diǎn)擊股票知識(shí)大全欄目進(jìn)行學(xué)習(xí)了解,亨瑞軟件將為您提供一條完善的技術(shù)分析體系,幫助您在實(shí)戰(zhàn)中獲得投資經(jīng)驗(yàn)。