皆有可能涨跌明细指标公式{主图 源码}介绍
皆有可能涨跌明细指标公式{主图 源码}
皆有可能涨跌明细指标公式{主图 源码}
思路是分别取得上涨。下跌时候的成交金额,这个金额相加不等于总金额,
源码
DRAWTEXTREL(20,30,STKLABEL),LINETHICK4,Colorffff00;
DRAWTEXTREL(120,30,STKNAME),LINETHICK4,Color00ffff;
a:=BUYVOL*c/100;b:=c*SELLVOL/100;
BUY0:=IF(a>=100 ,a,0);
特买:SUM(if(c>REF(c,1),BUY0,0),0),LINETHICK7,COLORred;
SEL0:=IF(b>=100 ,b,0);
特卖:SUM(if(c<REF(c,1),SEL0,0),0),LINETHICK7,COLORgreen;
BUY1:=IF( a<=100 and a>=50,a,0);
大买:SUM(if(c>REF(c,1),BUY1,0),0),LINETHICK5,COLORred;
SEL1:=IF( b<=100 and b>=50,b,0);
大卖:SUM(if(c<REF(c,1),SEL1,0),0),LINETHICK5,COLORgreen;
BUY2:=IF( a<=50 and a>=5,a,0);
中买:SUM(if(c>REF(c,1),BUY2,0),0),LINETHICK3,COLORred;
SEL2:=IF( b<=50 and b>=5 ,b,0);
中卖:SUM(if(c<REF(c,1),SEL2,0),0),LINETHICK3,COLORgreen;
BUY3:=IF (a<=5 ,B,0);
小买:SUM(if(c>REF(c,1),BUY3,0),0),LINETHICK1,COLORred;
SEL3:=IF( b<=5,b,0);
小卖:SUM(if(c<REF(c,1),SEL3,0),0),LINETHICK1,COLORgreen;
买:=特买+大买+中买+小买;
卖:=特卖+大卖+中卖+小卖;
上涨:=COUNT(c>REF(c,1),0);下跌:=COUNT(c<REF(c,1),0);平盘:=COUNT(c=REF(c,1),0);
DRAWTEXTABS(10 ,30 ,'上涨时间 : '+上涨 ),COLORMAGENTA,linethick3;
DRAWTEXTABS(10 ,50 ,'下跌时间 : '+下跌 ),COLORgreen,linethick3;
DRAWTEXTABS(10 ,70 ,'平盘时间 : '+平盘),COLORMAGENTA,linethick3;
DRAWTEXTABS(160 ,30 ,'金额 : ' +买+' 万'),COLORMAGENTA,linethick3;
DRAWTEXTABS(160 ,50 ,'金额 : ' +卖+' 万'),COLORgreen,linethick3;
也可以引入到分时
源码
特买:"涨跌明细.特买#tick",LINETHICK7,COLORred;
特卖:"涨跌明细.特卖#tick",LINETHICK7,COLORgreen;
大买:"涨跌明细.大买#tick",LINETHICK5,COLORred;
大卖:"涨跌明细.大卖#tick",LINETHICK5,COLORgreen;
中买:"涨跌明细.中买#tick",LINETHICK3,COLORred;
中卖:"涨跌明细.中卖#tick",LINETHICK3,COLORgreen;
小买:"涨跌明细.小买#tick",LINETHICK1,COLORred;
小卖:"涨跌明细.小卖#tick",LINETHICK1,COLORgreen;
买:=特买+大买+中买+小买;
卖:=特卖+大卖+中卖+小卖;
上涨:=COUNT(c>REF(c,1),0);下跌:=COUNT(c<REF(c,1),0);平盘:=COUNT(c=REF(c,1),0);
DRAWTEXTABS(10 ,30 ,'上涨时间 : '+上涨 ),COLORMAGENTA,linethick3;
DRAWTEXTABS(10 ,50 ,'下跌时间 : '+下跌 ),COLORgreen,linethick3;
DRAWTEXTABS(10 ,70 ,'平盘时间 : '+平盘),COLORMAGENTA,linethick3;
DRAWTEXTABS(160 ,30 ,'金额 : ' +买+' 万'),COLORMAGENTA,linethick3;
DRAWTEXTABS(160 ,50 ,'金额 : ' +卖+' 万'),COLORgreen,linethick3;
gd16973