通达信:【高位画线+获利比例+多 信号】 主图+选股 指标公式
主图:
DIF:=EMA(CLOSE,12)-EMA(CLOSE,25);
DEA:=EMA(DIF,9);
JZX1:=CROSS(DIF,DEA);
JZX2:=CROSS(DEA,DIF);
前高:IF(CONST(SUMBARS(JZX1,2)-BARSLAST(JZX2))>2,
IF(CURRBARSCOUNT<=CONST(FINDHIGHBARS(DIF,BARSLAST(JZX2),
SUMBARS(JZX1,2)-BARSLAST(JZX2),1))+1,CONST(FINDHIGH(H,BARSLAST(JZX2),
SUMBARS(JZX1,2)-BARSLAST(JZX2),1)),DRAWNULL),DRAWNULL);
DRAWTEXT(ISLASTBAR,前高, STRCAT(STRCAT(STRCAT(‘–‘,’–前高’),’= ‘ ),
CON2STR(前高,2))),COLORGREEN;
JXL:REF(H,BARSLAST(JZX1));
NE:=IF(FINANCE(3)=3 OR FINANCE(3)=4,0.2,0.1);
ZT:=C+0.01>=ZTPRICE(REF(C,1),NE) AND C>=H,NODRAW,COLORMAGENTA;
ZTX:=COUNT(ZT,5)<=2;
XG:=C>=前高 AND ZTX,NODRAW,COLORMAGENTA;
DRAWICON(BARSLASTCOUNT(XG)=1,L,42);
市场成本:=DMA(AMOUNT/(100*VOL),VOL/CAPITAL);
最新获利:(C/市场成本-1)*100,NODRAW;
IF(CURRBARSCOUNT<=10,CONST(市场成本),DRAWNULL),COLORLIGRAY,DOTLINE;
选股:
DIF:=EMA(CLOSE,12)-EMA(CLOSE,25);
DEA:=EMA(DIF,9);
JZX1:=CROSS(DIF,DEA);
JZX2:=CROSS(DEA,DIF);
前高:=IF(CONST(SUMBARS(JZX1,2)-BARSLAST(JZX2))>2,
IF(CURRBARSCOUNT<=CONST(FINDHIGHBARS(DIF,BARSLAST(JZX2),
SUMBARS(JZX1,2)-BARSLAST(JZX2),1))+1,CONST(FINDHIGH(H,BARSLAST(JZX2),
SUMBARS(JZX1,2)-BARSLAST(JZX2),1)),DRAWNULL),DRAWNULL);
JXL:=REF(H,BARSLAST(JZX1));
NE:=IF(FINANCE(3)=3 OR FINANCE(3)=4,0.2,0.1);
ZT:=C+0.01>=ZTPRICE(REF(C,1),NE) AND C>=H;
ZTX:=COUNT(ZT,5)<=2;
XG:=C>=前高 AND ZTX;
多:BARSLASTCOUNT(XG)=1;