以下是通达信CDP指标公式副图源码
通达信CDP指标公式副图源码:
个股:((ma(HIGH,1)/MA(REF(LOW,13),13))*100),LINETHICK2,colorFFFF;
个股风险:MA(FORCAst(个股趋势,13),8),colorFF;
趋势:((MA(INDEXC,1)/MA(REF(INDEXO,13),34))*100),LINETHICK2,colorFF00FF;
大盘风险:MA(FORCAST(大盘趋势,13),5),colorFF00;
cdp1:=(((REF(HIGH,1)+REF(LOW,1))+(2*REF(CLOSE,1)))/4);
CDP:=(((HIGH+LOW)+(2*CLOSE))/4);
最高:=(CDP+(HIGH-LOW));
近高:=((CDP*2)-LOW);
最低:=(CDP-(HIGH-LOW));
近低:=((CDP*2)-HIGH);
EXPLAINEX((INDEXC REF(INDEXC,1)),'大盘上涨',(INDEXC-REF(INDEXC,1)),3,0),colorFF;
EXPLAINEX((INDEXC =REF(INDEXC,1)),'大盘下跌',(INDEXC-REF(INDEXC,1)),3,0),colorFF00;
EXPLAINEX((CLOSE 0),'预测明日最高价',(CDP+(HIGH-LOW)),2,0);
EXPLAINEX((CLOSE 0),'预测明日近高价',((CDP*2)-LOW),2,0);
EXPLAINEX((CLOSE 0),'预测明日最低价',(CDP-(HIGH-LOW)),2,0);
EXPLAINEX((CLOSE 0),'预测明日近低价',((CDP*2)-HIGH),2,0);
EXPLAINEX((CLOSE 0),'昨预测最高价',REF(最高,1),2,0);
EXPLAINEX((CLOSE 0),'今日最高价',HIGH,2,0),colorFFFF;
EXPLAINEX((CLOSE 0),'昨预测近高价',REF(近高,1),2,0);
EXPLAINEX((CLOSE 0),'昨预测最低价',REF(最低,1),2,0);
EXPLAINEX((CLOSE 0),'今日最低价',LOW,2,0),colorFFFF;
EXPLAINEX((CLOSE 0),'昨预测近低价',REF(近低,1),2,0);
A1:=SAR(20,2,4);
EXPLAIN(((HIGH/REF(近高,1)) =1.015),'许是强股关注'),colorFF;
强股出现:IF(((CLOSE/REF(近高,1)) =1.01),110,100);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
A:=H-L;
A1:=(HIGH+LOW+CLOSE)/3;
A2:=2*A1-LOW;
AH:A1+A+(A2-A1);
NH:A2;
CDP:A1;
NL:2*CDP-HIGH;
AL:CDP-A-(CDP-NL);
VAR1:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR2:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR3:=(100-ma(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DIR1:=Abs(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
ER1:=DIR1/VIR1;
CS1:=ER1*(0.8-2/8)+2/8;
CQ1:=CS1*CS1;
AMA1:EMA(DMA(CLOSE,CQ1),2),COLORWHITE;
DIR2:=ABS(CLOSE-REF(CLOSE,10));
VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);
ER2:=DIR2/VIR2;
CS2:=ER2*(0.8-2/24)+2/24;
CQ2:=CS2*CS2;
AMA2:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;
AMA3:IF(AMA2/REF(AMA2,1) 0.997,AMA2,DRAWNULL),COLORYELLOW,LINETHICK2;
AMA4:IF(AMA2/REF(AMA2,1) 1.001,AMA2,DRAWNULL),COLORRED,LINETHICK2;
stICKLINE((VAR2 MA(VAR3,6)),CLOSE,OPEN,3,1),COLOR008000;
STICKLINE((VAR2 MA(VAR3,6)),OPEN,CLOSE,3,1),COLORRED;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),(OPEN*0.998),(CLOSE*1.0001),2.3,0),COLOR008000;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),(CLOSE*0.998),(OPEN*1.002),2.3,0),COLORRED;
STICKLINE(((OPEN CLOSE)AND(VAR2 MA(VAR3,6))),CLOSE,OPEN,2.3,0),COLOR008000;
DRAWICON(crOSS(VAR2,MA(VAR3,6)),(LOW-(LOW*0.04)),7);
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH+(HIGH*0.03)),8);
PT:=REF(H,1)-REF(L,1);
cdp:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;
AH:=CDP+PT;
AL:=CDP-PT;
NH:=CDP*2-REF(L,1);
NL:=CDP*2-REF(H,1);
强:IF(AH REF(C,1)*1.1,REF(C,1)*1.1,AH)NODRAW;
阻:IF(NH 强,(强-CDP)*0.618+CDP,NH)NODRAW,COLORCYAN;
M:=IF(AL REF(C,1)/1.1,REF(C,1)/1.1,AL);
撑:IF(NL M,CDP-(CDP-M)*0.618,NL)NODRAW;
底:IF(AL REF(C,1)/1.1,REF(C,1)/1.1,AL)NODRAW;
通达信CDP指标公式副图截图