【通达信】东方不败(大盘指数、涨家数、跌家数)-指标公式源码大盘指数:INDEXC,NODRAW,COLORLIMAGENTA;大盘指数涨跌:(大盘指数-REF(大盘指数,1)),NODRAW;涨家数:INDEXADV,NODRAW,COLORLIMAGENTA;跌家数:INDEXDEC,NODRAW,COLORGREEN;C3:=REF(C,1);涨停:=IF((C-C3)*100/C3=(10-0.01*100/C3),1,0);STICKLINE(涨停,OPEN,CLOSE,2.5,0),COLORYELLOW;跌停:=IF((C3-C)*100/C3=(10-0.01*100/C3),1,0);STICKLINE(跌停,OPEN,CLOSE,2.5,0),COLORBLUE;中轴线:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,LINETHICK2,COLORYELLOW;安全线:MA(CLOSE,30),LINETHICK2,COLORRED;VAR1:=CLOSEREF(CLOSE,1)ANDCLOSEREF(CLOSE,2);VAR2:=REF(VAR1,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR3:=REF(VAR2,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR4:=REF(VAR3,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR5:=REF(VAR4,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR6:=REF(VAR5,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR7:=REF(VAR6,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR8:=REF(VAR7,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR9:=REF(VAR8,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VARA:=REF(VAR9,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VARB:=REF(VARA,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VARC:=REF(VARB,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VARD:=CLOSEREF(CLOSE,1)ANDCLOSEREF(CLOSE,2);VARE:=REF(VARD,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VARF:=REF(VARE,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR10:=REF(VARF,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR11:=REF(VAR10,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR12:=REF(VAR11,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR13:=REF(VAR12,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR14:=REF(VAR13,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR15:=REF(VAR14,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR16:=REF(VAR15,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR17:=REF(VAR16,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR18:=REF(VAR17,1)ANDCLOSE=REF(CLOSE,1)ANDCLOSE=REF(CLOSE,2);VAR19:=REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1)ANDVAR1;DRAWICON(VAR19,L*0.98,1);【通达信】东方不败(大盘指数、涨家数、跌家数)-指标公式效果图(文档来源:若水财经社区)