通达信趋势量能公式
STICKLINE(趋势<REF(趋势,1),20,20+趋势*0.18,1.5,0),COLOR00BB00;
STICKLINE(趋势<REF(趋势,1),20,20+趋势*0.18,1,0),COLOR00DD00;
STICKLINE(趋势<REF(趋势,1),20,20+趋势*0.18,0.5,0),COLOR00FF00;
DRAWTEXT(ISLASTBAR=1,IF(趋势>=0,25,25),STRCAT(' 势= ',STRCAT(CON2STR(趋势,2),' '))),COLORGREEN;
{指标部分:}
ZBSLPG:=22;
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)-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;
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;
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;
ZB10:=MA(C,5)>MA(C,10);
ZB11:=MA(C,5)>MA(C,20);
ZB12:=MA(C,10)>MA(C,20);
MAVPG:=(C*2+H+L)/4;
SKPG:=EMA(MAVPG,13)-EMA(MAVPG,34);
SDPG:=EMA(SKPG,5);
ZB13:=(2*(SKPG-SDPG))>((-2)*(SKPG-SDPG));
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);
G08PG:=EMA(C,34);
ZB17:=G08PG>REF(G08PG,1);
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;
BBIPG:=(MA(C,3)+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/ZBSLPG)NODRAW,COLORAAAAAA;
STICKLINE(指标>=REF(指标,1),0,指标*0.18,3,0),COLOR000088;
STICKLINE(指标>=REF(指标,1),0,指标*0.18,2.5,0),COLOR000099;
STICKLINE(指标>=REF(指标,1),0,指标*0.18,2,0),COLOR0000AA;
STICKLINE(指标>=REF(指标,1),0,指标*0.18,1.5,0),COLOR0000BB;
STICKLINE(指标>=REF(指标,1),0,指标*0.18,1,0),COLOR0000DD;
STICKLINE(指标>=REF(指标,1),0,指标*0.18,0.5,0),COLOR0000FF;
STICKLINE(指标<REF(指标,1),0,指标*0.18,3,0),COLOR008800;
STICKLINE(指标<REF(指标,1),0,指标*0.18,2.5,0),COLOR00AA00;
STICKLINE(指标<REF(指标,1),0,指标*0.18,2,0),COLOR00BB00;
STICKLINE(指标<REF(指标,1),0,指标*0.18,1.5,0),COLOR00DD00;
STICKLINE(指标<REF(指标,1),0,指标*0.18,1,0),COLOR00FF00;
DRAWTEXT(ISLASTBAR=1,IF(指标>=0,5,5),STRCAT(' 指= ',STRCAT(CON2STR(指标,2),' '))),COLORAAAAAA;
{资金部分:}
日期锁定:=DATE>=1100104;
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;
P201:=SUM(主力净买,1)>0;
P202:=SUM(主力净买,2)>0;
P203:=SUM(主力净买,3)>0;
P204:=SUM(主力净买,4)>0;
P205:=SUM(主力净买,5)>0;
SUM211:=SUM(主力净买,11);
SUM212:=SUM(主力净买,12);
SUM213:=SUM(主力净买,13);
SUM214:=SUM(主力净买,14);
SUM215:=SUM(主力净买,15);
SUM216:=SUM(主力净买,16);
SUM217:=SUM(主力净买,17);
SUM218:=SUM(主力净买,18);
SUM219:=SUM(主力净买,19);
SUM220:=SUM(主力净买,20);
P211:=SUM211>0 AND SUM211>REF(SUM211,1);
P212:=SUM212>0 AND SUM212>REF(SUM212,1);
P213:=SUM213>0 AND SUM213>REF(SUM213,1);
P214:=SUM214>0 AND SUM214>REF(SUM214,1);
P215:=SUM215>0 AND SUM215>REF(SUM215,1);
P216:=SUM216>0 AND SUM216>REF(SUM216,1);
P217:=SUM217>0 AND SUM217>REF(SUM217,1);
P218:=SUM218>0 AND SUM218>REF(SUM218,1);
P219:=SUM219>0 AND SUM219>REF(SUM219,1);
P220:=SUM220>0 AND SUM220>REF(SUM220,1);
MAZJ205:=MA(主力净买,5);
MAZJ210:=MA(主力净买,10);
MAZJ215:=MA(主力净买,15);
- 上一篇公式:超级资金幅图选股公式
- 下一篇公式:通达信太阳操盘原版复制