通达信优化五行量化指标公式
来源:Internet,编辑:股旁网,2018-01-25
{使用说明:1、五行量化指标(浅灰色实心空心方格):实心代表趋势走好,空心代表趋势走坏;2、操盘动力线指标(黄金线):短线灵敏指标,低位拐头向上可跟进,高位拐头向下要警惕,附有高低位买卖提示;3、海洋状态指标(彩带):彩带颜色代表短中期多空趋势,低位转红可跟进,高位变色宜减仓、清仓;}
DMADIF:=MA(C,10)-MA(C,50);
DMAAMA:=MA(DMADIF,10);
DMAX:=DMADIF>DMAAMA;
P01:=DMAX;
DMITR:=EXPMEMA(MAX(MAX(H-L,ABS(H-REF(C,1))),ABS(REF(C,1)-L)),14);
DMIHD:=H-REF(H,1);
DMILD:=REF(L,1)-L;
DMIDMP:=EXPMEMA(IFF(DMIHD>0 AND DMIHD>DMILD,DMIHD,0),14);
DMIDMM:=EXPMEMA(IFF(DMILD>0 AND DMILD>DMIHD,DMILD,0),14);
DMIPDI:=DMIDMP*100/DMITR;
DMIMDI:=DMIDMM*100/DMITR;
DMIX:=DMIPDI>DMIMDI;
P02:=DMIX;
DPODPO:=C-REF(MA(C,20),20/2+1);
DPOMADPO:=MA(DPODPO,6);
DPOX:=DPODPO>DPOMADPO;
P03:=DPOX;
EMVVOLUME:=MA(V,14)/V;
EMVMID:=100*(H+L-REF(H+L,1))/(H+L);
EMVEMV:=MA(EMVMID*EMVVOLUME*(H-L)/MA(H-L,14),14);
EMVMAEMV:=MA(EMVEMV,9);
EMVX:=EMVEMV>EMVMAEMV;
P04:=EMVX;
MACDDIF:=EMA(C,12)-EMA(C,26);
MACDDEA:=EMA(MACDDIF,9);
MACDX:=MACDDIF>MACDDEA;
P05:=MACDX;
TRIXTR:=EMA(EMA(EMA(C,12),12),12);
TRIXTRIX:=(TRIXTR-REF(TRIXTR,1))/REF(TRIXTR,1)*100;
TRIXMATRIX:=MA(TRIXTRIX,9);
TRIXX:=TRIXTRIX>TRIXMATRIX;
P06:=TRIXX;
WVADWVAD:=SUM((C-O)/(H-L)*V,24)/10000;
WVADMAWVAD:=MA(WVADWVAD,6);
WVADX:=WVADWVAD>WVADMAWVAD;
P07:=WVADX;
JSJS:=100*(C-REF(C,5))/(5*REF(C,5));
JSMAJS1:=MA(JSJS,5);
JSX:=JSJS>JSMAJS1;
P08:=JSX;
CYEMAL:=MA(C,5);
CYEMAS:=MA(MA(C,20),5);
CYECYEL:=(CYEMAL-REF(CYEMAL,1))/REF(CYEMAL,1)*100;
CYECYES:=(CYEMAS-REF(CYEMAS,1))/REF(CYEMAS,1)*100;
CYEX:=CYECYEL>CYECYES;
P09:=CYEX;
JLHBVAR1:=(C-LLV(L,60))/(HHV(H,60)-LLV(L,60))*80;
JLHBB:=SMA(JLHBVAR1,7,1);
JLHBVAR2:=SMA(JLHBB,5,1);
JLHBX:=JLHBB>JLHBVAR2;
P10:=JLHBX;
CYCJJJ:=IFF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));
CYCDDD:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01);
CYCJJJT:=IFF(CYCDDD,1,(CYCJJJ<(DYNAINFO(5)+0.01) && CYCJJJ>(DYNAINFO(6)-0.01)));
CYCCYC1:=IFF(CYCJJJT,0.01*EMA(AMOUNT,5)/EMA(VOL,5),EMA((HIGH+LOW+CLOSE)/3,5));
CYCCYC2:=IFF(CYCJJJT,0.01*EMA(AMOUNT,13)/EMA(VOL,13),EMA((HIGH+LOW+CLOSE)/3,13));
CYCX:=CYCCYC1>CYCCYC2;
P11:=CYCX;
BBIBBI:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
BBIX:=C>BBIBBI;
P12:=BBIX;
DDITR:=MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1)));
DDIDMZ:=IFF((H+L)<=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L-REF(L,1))));
DDIDMF:=IFF((H+L)>=(REF(H,1)+REF(L,1)),0,MAX(ABS(H-REF(H,1)),ABS(L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C,1)+C-L,C-L);
QLSTS:=IFF(REF(C,1)>L,REF(C,1)-L+H-C,H-C);
QLSVOL_:=(QLSTB-QLSTS)*V/(QLSTB+QLSTS)/100;
QLSVOL_0:=DMA(QLSVOL_,0.1);
QLSVOL_1:=DMA(QLSVOL_,0.05);
QLSSHORT:=QLSVOL_0-QLSVOL_1;
QLSMA1:=MA(QLSSHORT,10);
SHORTQLX:=QLSSHORT>QLSMA1;
P20:=SHORTQLX;
AMVAMV0:=V*(O+C)/2;
AMVAMV1:=SUM(AMVAMV0,5)/SUM(V,5);
AMVAMV2:=SUM(AMVAMV0,13)/SUM(V,13);
AMVX:=AMVAMV1>AMVAMV2;
P21:=AMVX;
MTMMTM:=C-REF(C,12);
MTMMAMTM:=MA(MTMMTM,6);
MTMX:=MTMMTM>MTMMAMTM;
P22:=MTMX;
ZJTJVAR1:=EMA(EMA(C,9),9);
ZJTJ控盘:=(ZJTJVAR1-REF(ZJTJVAR1,1))/REF(ZJTJVAR1,1)*1000;
YZKPX:=ZJTJ控盘>REF(ZJTJ控盘,1) AND ZJTJ控盘>0;
P23:=YZKPX;
趋势:(P01+P02+P03+P04+P05+P06+P07+P08+P09+P10+P11+P12+P13+P14+P15+P16+P17+P18+P19+P20+P21+P22+P23)*(100/23),NODRAW,COLORCYAN;
STICKLINE(趋势>=REF(趋势,1),81,100,4,0),COLORGRAY;
STICKLINE(趋势<REF(趋势,1),81,100,4,1),COLORGRAY;
TRENDA:=WINNER(C)*100;
CMQS1:=WMA(TRENDA,8);
CMQS2:=WMA(TRENDA,13);
CMQS3:=WMA(TRENDA,21);
CMQS4:=WMA(TRENDA,34);
CMQS5:=WMA(TRENDA,55);
CM01:=CMQS1>REF(CMQS1,1);
CM02:=CMQS2>REF(CMQS2,1);
CM03:=CMQS3>REF(CMQS3,1);
CM04:=CMQS4>REF(CMQS4,1);
CM05:=CMQS5>REF(CMQS5,1);
CM06:=TRENDA>CMQS1;
CM07:=TRENDA>CMQS2;
CM08:=TRENDA>CMQS3;
CM09:=TRENDA>CMQS4;
CM10:=TRENDA>CMQS5;
CM11:=CMQS1>CMQS2;
CM12:=CMQS1>CMQS3;
CM13:=CMQS1>CMQS4;
CM14:=CMQS1>CMQS5;
CM15:=CMQS2>CMQS3;
CM16:=CMQS2>CMQS4;
CM17:=CMQS2>CMQS5;
CM18:=CMQS3>CMQS4;
CM19:=CMQS3>CMQS5;
CM20:=CMQS4>CMQS5;
筹码:EMA(((CM01+CM02+CM03+CM04+CM05+CM06+CM07+CM08+CM09+CM10+
CM11+CM12+CM13+CM14+CM15+CM16+CM17+CM18+CM19+CM20)*(100/20)),2),NODRAW,COLORGREEN;
STICKLINE(筹码>=REF(筹码,1),61,80,4,0),COLORGRAY;
STICKLINE(筹码<REF(筹码,1),61,80,4,1),COLORGRAY;
JE:=VOL;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
主力流入:=(QJ0*(JJ-MIN(CLOSE,OPEN)));
主力流出:=(QJ0*(MIN(OPEN,CLOSE)-LOW));
主力净买:=(主力流入-主力流出)/10000;
PP01:=SUM(主力净买,1)>0;
PP02:=SUM(主力净买,2)>0;
PP03:=SUM(主力净买,3)>0;
PP04:=SUM(主力净买,4)>0;
PP05:=SUM(主力净买,5)>0;
SUM11:=SUM(主力净买,11);
SUM12:=SUM(主力净买,12);
SUM13:=SUM(主力净买,13);
SUM14:=SUM(主力净买,14);
SUM15:=SUM(主力净买,15);
SUM16:=SUM(主力净买,16);
SUM17:=SUM(主力净买,17);
SUM18:=SUM(主力净买,18);
SUM19:=SUM(主力净买,19);
SUM20:=SUM(主力净买,20);
PP11:=SUM11>0 AND SUM11>REF(SUM11,1);
PP12:=SUM12>0 AND SUM12>REF(SUM12,1);
PP13:=SUM13>0 AND SUM13>REF(SUM13,1);
PP14:=SUM14>0 AND SUM14>REF(SUM14,1);
PP15:=SUM15>0 AND SUM15>REF(SUM15,1);
PP16:=SUM16>0 AND SUM16>REF(SUM16,1);
PP17:=SUM17>0 AND SUM17>REF(SUM17,1);
PP18:=SUM18>0 AND SUM18>REF(SUM18,1);
PP19:=SUM19>0 AND SUM19>REF(SUM19,1);
PP20:=SUM20>0 AND SUM20>REF(SUM20,1);
MAZJ05:=MA(主力净买,5);
MAZJ10:=MA(主力净买,10);
MAZJ15:=MA(主力净买,15);
MAZJ20:=MA(主力净买,20);
MA01:=MAZJ05>MAZJ10;
MA02:=MAZJ05>MAZJ15;
MA03:=MAZJ05>MAZJ20;
MA04:=MAZJ10>MAZJ15;
MA05:=MAZJ10>MAZJ20;
MA06:=MAZJ15>MAZJ20;
基线1:=EMA(EMA(EMA(EMA(IFF(主力净买>=0,主力净买,0),20),2),2),2);
基线6:=基线1*6;
ZJDL10:=IFF(主力净买>基线6,10,IFF(主力净买<=基线6 AND 主力净买>0,10*主力净买/基线6,0));
短线资金:=SUM(主力净买,3);
短线资金10:=EMA(短线资金,10);
短线资金60:=EMA(短线资金,60);
短线资金20:=EMA(短线资金,20);
短线资金30:=EMA(短线资金,30);
CZD01:=短线资金>短线资金10;
CZD02:=短线资金20>短线资金30;
CZD03:=短线资金10>短线资金60;
总权1:=53;
资金:EMA(EMA(100*(PP01*2+PP02*2+PP03*5+PP04*2+PP05*2+PP11*1+PP12*1+PP13*1+PP14*1+PP15*1+PP16*1+PP17*1+PP18*1+PP19*1+PP20*1+
MA01*2+MA02*2+MA03*1+MA04*1+MA05*1+MA06*1+ZJDL10+CZD01*5+CZD02*4+CZD03*3)/总权1,2),2),NODRAW,COLORRED;
STICKLINE(资金>=REF(资金,1),41,60,4,0),COLORGRAY;
STICKLINE(资金<REF(资金,1),41,60,4,1),COLORGRAY;
LTSHPG:=100-100*(HHV(H,40)-C)/(HHV(H,40)-LLV(L,40));
ZB01:=LTSHPG>=50;
DIFPG:=EMA(C,12)-EMA(C,26);
DEAPG:=EMA(DIFPG,9);
ZB02:=DIFPG>DEAPG;
APG:=MA((-100)*(HHV(H,34)-C)/(HHV(H,34)-LL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+MA(C,6)+MA(C,12)+MA(C,24))/4;
ZB19:=C>BBIPG;
MIDSLB:=(3*C+L+O+H)/6;
E1:=EMA(10000*(WMA(MIDSLB,30)-REF(WMA(MIDSLB,30),1))/REF(WMA(MIDSLB,30),1),10);
E2:=EMA(E1,2);
E3:=EMA(E2,2);
E4:=EMA(E3,2);
E5:=EMA(E4,2);
E6:=EMA(E5,2);
E7:=EMA(E6,2);
ZB20:=E2>E3 AND E3>E4 AND E4>E5 AND E5>E6 AND E6>E7;
ZB21:=E2>REF(E2,1) AND E3>REF(E3,1) AND E4>REF(E4,1) AND E5>REF(E5,1) AND E6>REF(E6,1) AND E7>REF(E7,1);
TRPG1:=MAX(MAX((H-L),ABS(H-REF(C,1))),ABS(REF(C,1)-L));
ATRPG1:=EMA(TRPG1,14);
HDPG:=H-REF(H,1);
LDPG:=REF(L,1)-L;
PDMPG:=EMA(IFF(HDPG>0 AND HDPG>LDPG,HDPG,0),14);
MDMPG:=EMA(IFF(LDPG>0 AND LDPG>HDPG,LDPG,0),14);
PDIPG:=PDMPG/ATRPG1;
MDIPG:=MDMPG/ATRPG1;
XLPG:=(PDIPG-MDIPG)/(PDIPG+MDIPG);
ZB22:=XLPG>0;
指标:(ZB01+ZB02+ZB03+ZB04+ZB05+ZB06+ZB07+ZB08+ZB09+ZB10+
ZB11+ZB12+ZB13+ZB14+ZB15+ZB16+ZB17+ZB18+ZB19+ZB20+ZB21+ZB22)*(100/22),NODRAW,COLORLIRED;
STICKLINE(指标>=REF(指标,1),21,40,4,0),COLORGRAY;
STICKLINE(指标<REF(指标,1),21,40,4,1),COLORGRAY;
方向成交量:=IFF(CLOSE>=OPEN,VOL,VOL*(-1));
LHLNMID:=(3*CLOSE+OPEN+HIGH+LOW)/6;
LHLN短线:=WMA(LHLNMID,5);
LHLN中线:=WMA(LHLNMID,10);
LHLN多头:=LHLN短线>LHLN中线;
CP01:=SUM(方向成交量,1)>0;
CP02:=SUM(方向成交量,2)>0;
CP03:=SUM(方向成交量,3)>0;
CP04:=SUM(方向成交量,4)>0;
CP05:=SUM(方向成交量,5)>0;
CSUM11:=SUM(方向成交量,11);
CSUM12:=SUM(方向成交量,12);
CSUM13:=SUM(方向成交量,13);
CSUM14:=SUM(方向成交量,14);
CSUM15:=SUM(方向成交量,15);
CSUM16:=SUM(方向成交量,16);
CSUM17:=SUM(方向成交量,17);
CSUM18:=SUM(方向成交量,18);
CSUM19:=SUM(方向成交量,19);
CSUM20:=SUM(方向成交量,20);
CP11:=CSUM11>0 AND CSUM11>REF(CSUM11,1);
CP12:=CSUM12>0 AND CSUM12>REF(CSUM12,1);
CP13:=CSUM13>0 AND CSUM13>REF(CSUM13,1);
CP14:=CSUM14>0 AND CSUM14>REF(CSUM14,1);
CP15:=CSUM15>0 AND CSUM15>REF(CSUM15,1);
CP16:=CSUM16>0 AND CSUM16>REF(CSUM16,1);
CP17:=CSUM17>0 AND CSUM17>REF(CSUM17,1);
CP18:=CSUM18>0 AND CSUM18>REF(CSUM18,1);
CP19:=CSUM19>0 AND CSUM19>REF(CSUM19,1);
CP20:=CSUM20>0 AND CSUM20>REF(CSUM20,1);
CMAZJ05:=MA(方向成交量,5);
CMAZJ10:=MA(方向成交量,10);
CMAZJ15:=MA(方向成交量,15);
CMAZJ20:=MA(方向成交量,20);
CMA01:=CMAZJ05>CMAZJ10;
CMA02:=CMAZJ05>CMAZJ15;
CMA03:=CMAZJ05>CMAZJ20;
CMA04:=CMAZJ10>CMAZJ15;
CMA05:=CMAZJ10>CMAZJ20;
CMA06:=CMAZJ15>CMAZJ20;
基准1:=EMA(EMA(EMA(EMA(IFF(方向成交量>=0,方向成交量,0),20),2),2),2);
基准6:=基准1*6;
CZJDL10:=IFF(方向成交量>基准6,10,IFF(方向成交量<=基准6 AND 方向成交量>0,10*方向成交量/基准6,0));
短线总量:=SUM(方向成交量,3);
短线总量10:=EMA(短线总量,10);
短线总量20:=EMA(短线总量,20);
短线总量30:=EMA(短线总量,30);
短线总量60:=EMA(短线总量,60);
CCZD01:=短线总量>短线总量10;
CCZD02:=短线总量20>短线总量30;
CCZD03:=短线总量10>短线总量60;
总权:=53;
量化量能X:=EMA(EMA(100*(CP01*2+CP02*2+CP03*5+CP04*2+CP05*2+CP11*1+CP12*1+CP13*1+CP14*1+CP15*1+CP16*1+CP17*1+CP18*1+CP19*1+CP20*1+
CMA01*2+CMA02*2+CMA03*1+CMA04*1+CMA05*1+CMA06*1+CZJDL10+CCZD01*5+CCZD02*4+CCZD03*3)/总权,2),2),NODRAW,COLORLIRED;
量化量能XX:=IFF(LHLN多头,量化量能X*1.2,量化量能X);
量能:WMA(IFF(量化量能XX>=100,100,量化量能XX),3),NODRAW,COLORLIMAGENTA;
STICKLINE(量能>=REF(量能,1),0,20,4,0),COLORGRAY;
STICKLINE(量能<REF(量能,1),0,20,4,1),COLORGRAY;
DRAWTEXT_FIX(1,0,0.08,0,'趋势')COLORCYAN;
DRAWTEXT_FIX(1,0,0.27,0,'筹码')COLORGREEN;
DRAWTEXT_FIX(1,0,0.47,0,'资金')COLORRED;
DRAWTEXT_FIX(1,0,0.66,0,'指标')COLORLIRED;
DRAWTEXT_FIX(1,0,0.86,0,'量能')COLORLIMAGENTA;
{操盘动力线}
绝对底:=0;绝对顶:=38*2.632;底:=3*2.632;顶:=35*2.632;
VAR1:=LLV(LOW,10);
VAR2:=HHV(HIGH,25);
短期趋势线:EMA((CLOSE-VAR1)/(VAR2-VAR1)*4,4)*26.3,COLORYELLOW;
{DRAWBAND(趋势线,RGB(250,0,0),REF(趋势线,1),RGB(0,250,250));}
短多:=IF(短期趋势线>REF(短期趋势线,1),短期趋势线,DRAWNULL),COLORYELLOW;
短空:=IF(短期趋势线<=REF(短期趋势线,1),短期趋势线,DRAWNULL),COLORBLUE;
DRAWICON(CROSS(短期趋势线,底),5,1);
DRAWICON(CROSS(短期趋势线,绝对底),5,1);
DRAWICON(CROSS(顶,短期趋势线),98,2);
DRAWICON(CROSS(绝对顶,短期趋势线),98,2);
{海洋状态}
X1:=(2*C+H+L)/4;
X2:=LLV(L,34);
X3:=HHV(H,34);
QSX:=EMA((X1-X2)/(X3-X2)*100,13);
QSJX:=EMA((0.618*REF(QSX,1)+0.382*QSX),2);
DRAWBAND(QSX,RGB(255,0,0),QSJX,RGB(0,250,250));