【通達(dá)信】背離一目了然指標(biāo)公式
攻城獅 2016.02.03 22:16
W:=1;
M:=1;
MM:=9*M;
SHORT:=MM*4/3;
LONG:=MM*26/9;
DIFF:=(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG));
DEA:=EMA(DIFF,MM),COLOR58FF58;
MACD:=2*(DIFF-DEA),COLORFFFF00,LINETHICK0;
紅柱:DRAWBAND(MACD,RGB(180,50,50),0,RGB(0,128,0));
綠柱:DRAWBAND(0,RGB(0,128,0),MACD,RGB(180,50,50));
AMACD:=ABS(MACD);
{STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,W,1),COLOR6058FF;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),0,MACD,W,0),COLOR6058FF;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,W,1),COLORFFFF00;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),0,MACD,W,0),COLORFFFF00;}
{www.chiang1015.com 概念股網(wǎng)_通達(dá)信股票指標(biāo)公式}
紅柱面積 := IF (MACD>0,SUM(AMACD,BARSLAST(MACD<0)),0),LINETHICK0,COLORRED;
綠柱面積 := IF (MACD<0,SUM(AMACD,BARSLAST(MACD>0)),0),LINETHICK0,COLORBLUE;
BV:=SUM(MACD,0);
紅轉(zhuǎn)綠:=CROSS(MACD,0);
綠轉(zhuǎn)紅:=CROSS(0,MACD);
BC:=BARSLAST(紅轉(zhuǎn)綠 OR 綠轉(zhuǎn)紅)+1;
最高紅柱子:IF(MACD>0,HHV(MACD,BC),0),NODRAW;
最低綠柱子:IF(MACD<0,LLV(MACD,BC),0),NODRAW;
DRAWTEXT(綠轉(zhuǎn)紅 ,REF(最高紅柱子,1),”+REF(INTPART((紅柱面積)*10)/10,1)),COLORRED;
DRAWTEXT(紅轉(zhuǎn)綠 ,REF(最低綠柱子,1),”+REF(INTPART((綠柱面積)*10)/10,1)),COLORRED;
CDIFF:DIFF;CDEA:DEA;
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://www.chiang1015.com/ 上發(fā)表,為其獨(dú)立觀點(diǎn)。不代表本網(wǎng)立場(chǎng),不代表本網(wǎng)贊同其觀點(diǎn),亦不對(duì)其真實(shí)性負(fù)責(zé),投資決策請(qǐng)建立在獨(dú)立思考之上。