股票论坛

 找回密码
 免费注册
搜索
热搜: 活动 交友 discuz
查看: 1996|回复: 0
打印 上一主题 下一主题

通达信五行量化指标公式

[复制链接]

巡抚

Rank: 5Rank: 5

听众
5
跳转到指定楼层
楼主
发表于 2016-6-4 13:53 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

日线锁定:=(PERIOD==4);
ZBSLPG:=22;
{//01.四海腾龙}
LTSHPG:=100-100*(HHV(H,40)-C)/(HHV(H,40)-LLV(L,40));
ZB01:=LTSHPG>=50;
{//02.MACD        }
DIFPG:=EMA(C,12)-EMA(C,26);
DEAPG:=EMA(DIFPG,9);
ZB02:=DIFPG>DEAPG;
{//03~05.趋势顶底}
APG:=MA((-100)*(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34)),19);
BPG:=(-100)*(HHV(H,14)-C)/(HHV(H,14)-LLV(L,14));
DPG:=EMA((-100)*(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34)),4);
QSDDLONG:=APG+100;
QSDDSHORT:=BPG+100;
QSDDMID:=DPG+100;
ZB03:=QSDDSHORT>QSDDMID;
ZB04:=QSDDSHORT>QSDDLONG;
ZB05:=QSDDMID>QSDDLONG;
{//06.KDJ}
RSVPG:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
KPG:=SMA(RSVPG,3,1);
DPG2:=SMA(KPG,3,1);       
ZB06:=KPG>DPG2;
{//07~09.RSI}
LCPG:=REF(CLOSE,1);
RPG1:=SMA(MAX(C-LCPG,0),6,1)/SMA(ABS(C-LCPG),6,1)*100;
RPG2:=SMA(MAX(C-LCPG,0),12,1)/SMA(ABS(C-LCPG),12,1)*100;
RPG3:=SMA(MAX(C-LCPG,0),24,1)/SMA(ABS(C-LCPG),24,1)*100;
ZB07:=RPG1>RPG2;
ZB08:=RPG1>RPG3;
ZB09:=RPG2>RPG3;
{//10~12.MA}
ZB10:=MA(C,5)>MA(C,10);
ZB11:=MA(C,5)>MA(C,20);
ZB12:=MA(C,10)>MA(C,20);
{//13.主力进出}
MAVPG:=(C*2+H+L)/4;
SKPG:=EMA(MAVPG,13)-EMA(MAVPG,34);
SDPG:=EMA(SKPG,5);
ZB13:=(2*(SKPG-SDPG))>((-2)*(SKPG-SDPG));
{//14~16.多空线}
MIDPGX:=(3*C+O+L+H)/6;
DKXPG1:=WMA(MIDPGX,5);
DKXPG2:=WMA(MIDPGX,10);
DKXPG3:=WMA(MIDPGX,20);
ZB14:=DKXPG1>REF(DKXPG1,1);
ZB15:=DKXPG2>REF(DKXPG2,1);
ZB16:=DKXPG3>REF(DKXPG3,1);
{//17.G08}
G08PG:=EMA(C,34);
ZB17:=G08PG>REF(G08PG,1);
{//18.B08}
B08PG:=(C-LLV(L,60))/(HHV(H,60)-LLV(L,60))*80;
BPG1:=SMA(B08PG,7,1);
BPG2:=SMA(BPG1,3,1);
ZB18:=BPG1>BPG2;
{//19.BBI}
BBIPG:=(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
ZB19:=C>BBIPG;       
{//20~21.速率表}
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);
{//22.趋势向量}
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/ZBSLPG)NODRAW,COLORRED;
▲35线:35,COLORGREEN;
▲50线:50,COLORYELLOW;
▲80线:80,COLORRED;
{//3D柱线形式}
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,3,0),COLORRED;
STICKLINE(量化指标<REF(量化指标,1),0,量化指标,3,0),COLORFFFF00;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,3,0),COLOR0000FF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,2.7.5,0),COLOR001BFF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,2.4,0),COLOR0035FF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,2.1,0),COLOR0050FF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,1.8,0),COLOR0062FF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,1.5,0),COLOR007AFF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,1.2,0),COLOR0089FF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,0.9,0),COLOR009CFF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,0.6,0),COLOR00C0FF;
STICKLINE(量化指标>=REF(量化指标,1),0,量化指标,0.3,0),COLOR00EAFF;

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|站点首页|手机版|小黑屋|帮助中心|桂ICP备14001964号

GMT+8, 2024-12-5 10:41 , Processed in 0.152690 second(s), 23 queries .

Powered by Discuz! X3.2

© 2004-2014 早晨网股票论坛欢迎您!..

快速回复 返回顶部 返回列表