K線(xiàn)圖疊加MACD指標公式
2019-05-05 11:33 綜投網(wǎng)
STICKLINE(C>=O,C,O,3,0),COLOR000045;
STICKLINE(C>=O,C,O,2.5,0),COLOR000065;
STICKLINE(C>=O,C,O,2,0),COLOR000085;
STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;
STICKLINE(C>=O,C,O,1,0),COLOR0000C5;
STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;
STICKLINE(C>=O,H,L,0,0),COLOR0000F5;
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
STICKLINE(C
DDIF:EMA(CLOSE,12)-EMA(CLOSE,26),NODRAW;
DDEA:EMA(DDIF,9),NODRAW;
DMACD:(DDIF-DDEA)*2,NODRAW;
上市天數:=BARSCOUNT(C); N:=IF(上市天數<90,上市天數-1,90);
基點(diǎn):=CONST(LLV(L,N)); 基:=CONST(HHV(H,N))-基點(diǎn);
分:=CONST(LLV(DDIF,N)); 百:=CONST(HHV(DDIF,N))-分;
CC比:=(DDIF-分)/百; XCX:=CC比*基+基點(diǎn);
DIF:=XCX; NOTEXTDDIF:DIF,COLORWHITE;
DEA:=EMA(DIF,9); NOTEXTDDEA:DEA,COLORYELLOW;
基準零線(xiàn):=(0-分)/百*基+基點(diǎn); NOTEXT基準零線(xiàn):基準零線(xiàn),POINTDOT,COLORLIRED;
MACD:=(DIF-DEA)*2;
STICKLINE(MACD>=0,基準零線(xiàn),基準零線(xiàn)+MACD,0,0),COLORLIRED;
STICKLINE(MACD<0,基準零線(xiàn),基準零線(xiàn)+MACD,0,0),COLORLICYAN;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底部結構:=REF(C,A1+1)>C AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
DRAWLINE(A1=0,REF(DEA,1),底部結構,REF(DEA,A1+1),0),COLORMAGENTA,LINETHICK1;
STICKLINE(底部結構,DEA,REF(DEA,A1+1),0,0),COLORMAGENTA,LINETHICK1;
DRAWTEXT(底部結構>0,REF(DEA,A1+1),'底背離'),COLORMAGENTA;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
頂部結構:=REF(C,A2+1)
DRAWLINE(A2=0,REF(DEA,1),頂部結構,REF(DEA,A2+1),0),COLORGREEN,LINETHICK1;
STICKLINE(頂部結構,DEA,REF(DEA,A2+1),0,0),COLORGREEN,LINETHICK1;
DRAWTEXT(頂部結構>0,REF(DEA,A2+1),'頂背離'),COLORGREEN;
市盈率1:=DYNAINFO(39);
營(yíng)業(yè)收入:=FINANCE(20)/10000;
銷(xiāo)售毛利率:=((FINANCE(20)-FINANCE(21))/FINANCE(20)*100);
凈利潤:=FINANCE(30)/10000;
凈利潤比率:=(FINANCE(30)/FINANCE(20)*100);
主營(yíng)利潤率1:=(FINANCE(23)/FINANCE(20)*100);
優(yōu)質(zhì)資產(chǎn)率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));{理論上越大越好但不同行業(yè)有不同標準};
現金負債比:=(FINANCE(25)/FINANCE(15));{缺長(cháng)期負債或負債總額,理論上越大越好但不同行業(yè)有不同標準};
凈利同增率:=FINANCE(43);
DRAWTEXT_FIX(1,0.42,0.10,1,'市盈率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.42,0.15,1,'收入 萬(wàn)元:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.42,0.20,1,'銷(xiāo)售毛利率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.42,0.25,1,'凈利 萬(wàn)元:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.42,0.30,1,'凈利潤率 :'),COLORYELLOW;
DRAWTEXT_FIX(1,0.42,0.35,1,'主營(yíng)利潤率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.42,0.40,1,'優(yōu)質(zhì)資產(chǎn)率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.42,0.45,1,'現金負債比:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.47,0.10,1,市盈率1),COLORWHITE;
DRAWNUMBER_FIX(1,0.47,0.15,1,營(yíng)業(yè)收入),COLORWHITE;
DRAWNUMBER_FIX(1,0.47,0.20,1,銷(xiāo)售毛利率),COLORWHITE;
DRAWNUMBER_FIX(1,0.47,0.25,1,凈利潤),COLORWHITE;
DRAWNUMBER_FIX(1,0.47,0.30,1,凈利潤比率),COLORWHITE;
DRAWNUMBER_FIX(1,0.47,0.35,1,主營(yíng)利潤率1),COLORWHITE;
DRAWNUMBER_FIX(1,0.47,0.40,1,優(yōu)質(zhì)資產(chǎn)率),COLORWHITE;
DRAWNUMBER_FIX(1,0.47,0.45,1,現金負債比),COLORWHITE;
市凈率:=CONST(DYNAINFO(7) / FINANCE(34));
營(yíng)收同比增:=FINANCE(44);
每股凈資產(chǎn):=FINANCE(34);
每股收益季:=CONST(FINANCE(33)/(5-FINANCE(37)));
每股現金流:=CONST((FINANCE(25)/FINANCE(1)));
每股未分配:=CONST(FINANCE(32));
每股公積金:=CONST(FINANCE(18));
DRAWTEXT_FIX(1,0.54,0.10,1,'市凈率 :'),COLORYELLOW;
DRAWTEXT_FIX(1,0.54,0.15,1,'收入同比增 :'),COLORYELLOW;
DRAWTEXT_FIX(1,0.54,0.20,1,'每股凈資產(chǎn):'),COLORYELLOW;
DRAWTEXT_FIX(1,0.54,0.25,1,'凈利同比增:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.54,0.30,1,'每股收益季:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.54,0.35,1,'每股現金流:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.54,0.40,1,'每股未分配:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.54,0.45,1,'每股公積金:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.57,0.10,1,市凈率),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.15,1,營(yíng)收同比增),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.20,1,每股凈資產(chǎn)),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.25,1,凈利同增率),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.30,1,每股收益季),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.35,1,每股現金流),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.40,1,每股未分配),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.45,1,每股公積金),COLORWHITE;
CONST(C),COLORCYAN,DOTLINE;