通达信纯量横向精化主图指标公式
2020/5/26 19:12:11
白色为总量:0,NODRAW;
灰色为净量:0,NODRAW;
TS:=120;
N:=99;
M:=3;
MT:=3;
M1:=5;
M2:=7;
M3:=21;
M4:=12;
M5:=50;
DA1:=IF(TS>TOTALBARSCOUNT,TOTALBARSCOUNT,TS);
DA:=IF(CURRBARSCOUNT>DA1,0,DA1);
HI:=REFDATE(HHV(H,DA),DATE);
LO:=REFDATE(LLV(L,DA),DATE);
C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/10);
LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA);
LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA);
LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA);
LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA);
LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA);
LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA);
LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA);
LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA);
LH9:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),V,0),DA);
LH10:=SUM(IF(C1>=LO AND C1<LO*GZ,V,0),DA);
L1:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0;
L2:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0;
L3:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0;
L4:=REFDATE(HHV(LH4,DA),DATE);
L5:=REFDATE(HHV(LH5,DA),DATE);
L6:=REFDATE(HHV(LH6,DA),DATE);
L7:=REFDATE(HHV(LH7,DA),DATE);
L8:=REFDATE(HHV(LH8,DA),DATE);
L9:=REFDATE(HHV(LH9,DA),DATE);
L10:=REFDATE(HHV(LH10,DA),DATE);
SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);
STICKLINE(CEILING(DA*L1/SS)*3>=CURRBARSCOUNT,HI*N/100,(HI/GZ),2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L2/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,1)*N/100,HI/POW(GZ,2),2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L3/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*N/100,HI/POW(GZ,3),2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L4/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,3)*N/100,HI/POW(GZ,4),2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L5/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,4)*N/100,HI/POW(GZ,5),2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L6/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*N/100,HI/POW(GZ,6),2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L7/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,6)*N/100,HI/POW(GZ,7),2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L8/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*N/100,2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L9/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*N/100,2,1),COLORWHITE,LINETHICK1;
STICKLINE(CEILING(DA*L10/SS)*3>=CURRBARSCOUNT,LO,LO*POW(GZ,1)*N/100,2,1),COLORWHITE,LINETHICK1;
BBB:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
杀盘:=IF(CLOSE>OPEN,BBB*(HIGH-LOW),IF(CLOSE<OPEN,BBB*((HIGH-OPEN)+
(CLOSE-LOW)),VOL/2)),COLORRED;
血盘:=IF(CLOSE>OPEN,0-BBB*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,
0-BBB*(HIGH-LOW),0-VOL/2)),COLORGREEN;
净盘:=(杀盘+血盘)>0;
LH11:=SUM(IF(C1>=(HI/GZ),净盘,0),DA);
LH12:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),净盘,0),DA);
LH13:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),净盘,0),DA);
LH14:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),净盘,0),DA);
LH15:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),净盘,0),DA);
LH16:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),净盘,0),DA);
LH17:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),净盘,0),DA);
LH18:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),净盘,0),DA);
LH19:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),净盘,0),DA);
LH110:=SUM(IF(C1>=LO AND C1<LO*GZ,净盘,0),DA);
L11:=REFDATE(HHV(LH11,DA),DATE),LINETHICK0;
L12:=REFDATE(HHV(LH12,DA),DATE),LINETHICK0;
L13:=REFDATE(HHV(LH13,DA),DATE),LINETHICK0;
L14:=REFDATE(HHV(LH14,DA),DATE);
L15:=REFDATE(HHV(LH15,DA),DATE);
L16:=REFDATE(HHV(LH16,DA),DATE);
L17:=REFDATE(HHV(LH17,DA),DATE);
L18:=REFDATE(HHV(LH18,DA),DATE);
L19:=REFDATE(HHV(LH19,DA),DATE);
L110:=REFDATE(HHV(LH110,DA),DATE);
SS1:=(L11+L12+L13+L14+L15+L16+L17+L18+L19+L110);
STICKLINE(CEILING(DA*L11/SS1)*3>=CURRBARSCOUNT,HI*N/100,(HI/GZ),4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L12/SS1)*3>=CURRBARSCOUNT,HI/POW(GZ,1)*N/100,HI/POW(GZ,2),4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L13/SS1)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*N/100,HI/POW(GZ,3),4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L14/SS1)*3>=CURRBARSCOUNT,HI/POW(GZ,3)*N/100,HI/POW(GZ,4),4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L15/SS1)*3>=CURRBARSCOUNT,HI/POW(GZ,4)*N/100,HI/POW(GZ,5),4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L16/SS1)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*N/100,HI/POW(GZ,6),4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L17/SS1)*3>=CURRBARSCOUNT,HI/POW(GZ,6)*N/100,HI/POW(GZ,7),4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L18/SS1)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*N/100,4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L19/SS1)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*N/100,4,0),COLORGRAY,LINETHICK1;
STICKLINE(CEILING(DA*L110/SS1)*3>=CURRBARSCOUNT,LO,LO*POW(GZ,1)*N/100,4,0),COLORGRAY,LINETHICK1;
DRAWKLINE(H,O,L,C);JJ:=(CLOSE+HIGH+LOW)/3;
投 股票网 www. tou18.cn
股市公式下载推荐