以下是通达信98%准备的涨停指标公式(无源码的请下载附件导入)
超买:=IF((ISBUYORDER,AMOUNT>=(FINANCE(40)*0.05/100))AND(DCLOSE>=DOPEN),AMOUNT/10000,0);
超卖:=IF((AMOUNT>=(FINANCE(40)*0.05/100))AND(DCLOSE<=DOPEN),AMOUNT/10000,0);
大买:=IF(((ISBUYORDER,AMOUNT>=(FINANCE(40)*0.025/100))AND(ISBUYORDER,AMOUNT<(FINANCE(40)*0.05/100)))AND(DCLOSE>=DOPEN),AMOUNT/10000,0);
大卖:=IF(((AMOUNT>=(FINANCE(40)*0.025/100))AND(AMOUNT<(FINANCE(40)*0.05/100)))AND(DCLOSE<=DOPEN),AMOUNT/10000,0);
中买:=IF(((ISBUYORDER,AMOUNT>=(FINANCE(40)*0.005/100))AND(ISBUYORDER,AMOUNT<(FINANCE(40)*0.025/100)))AND(DCLOSE>=DOPEN),AMOUNT/10000,0);
中卖:=IF(((AMOUNT>=(FINANCE(40)*0.005/100))AND(AMOUNT<(FINANCE(40)*0.025/100)))AND(DCLOSE<=DOPEN),AMOUNT/10000,0);
散买:=IF((ISBUYORDER,AMOUNT<(FINANCE(40)*0.005/100))AND(DCLOSE>=DOPEN),AMOUNT/10000,0);
散卖:=IF((AMOUNT<(FINANCE(40)*0.005/100))AND(DCLOSE<=DOPEN),AMOUNT/10000,0);
Z:=(SUM(超买,0)-SUM(超卖,0))+(SUM(大买,0)-SUM(大卖,0))+(SUM(中买,0)-SUM(中卖,0))+(SUM(散买,0)-SUM(散卖,0));
★总净:Z,COLORSTICK;
★主净:(SUM(超买,0)-SUM(超卖,0))+(SUM(大买,0)-SUM(大卖,0)),LINETHICK8,COLORYELLOW;
★超净:SUM(超买,0)-SUM(超卖,0),COLORRED,LINETHICK2;
★大净:SUM(大买,0)-SUM(大卖,0),COLORMAGENTA,LINETHICK2;
★中净:SUM(中买,0)-SUM(中卖,0),COLORBLUE,LINETHICK1;
★散净:SUM(散买,0)-SUM(散卖,0),COLORGREEN,LINETHICK1;
DRAWTEXT(ISLASTBAR AND C,★主净,'★主力'),COLORYELLOW;
DRAWTEXT(ISLASTBAR AND C,★超净,'★机构'),COLORRED;
DRAWTEXT(ISLASTBAR AND C,★大净,'★大户'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR AND C,★中净,'★中户'),COLORBLUE;
DRAWTEXT(ISLASTBAR AND C,★散净,'★散户'),COLORGREEN;
多: (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100, COLORSTICK;
主力:EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,120)-0.0004,LINETHICK5,COLORMAGENTA;
散户:EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,200),LINETHICK5,COLORGREEN;
DRAWICON(CROSS(EXPMA(多,120)-0.0004,EXPMA(多,200)),EXPMA(多,200)*1,13);
DRAWICON(CROSS(EXPMA(多,200),EXPMA(多,120)-0.0004),EXPMA(多,200)*1,2);
Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05,0.95);
Q2:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))));
DRAWICON(CROSS((C/Q2),1.03),0.02,6);
STICKLINE(CROSS((C/Q2),1.03),0.02,0,4,0), , COLORYELLOW;
627577995.png
|