以下是通达信很不错的涨幅公式源码和截图
通达信很不错的涨幅公式源码:
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=REF(LLV(CLOSE,480),1);
VAR6:=REF(HHV(CLOSE,480),1);
VAR7:=100*(CLOSE-VAR5)/(VAR6-VAR5);
VAR8:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100;
VAR9:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100;
VARA:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100;
VARB:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100;
VARC:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4;
VARD:=IF(VARC 23.16,VARC,0);
VARE:=VARC
VAR10:=VAR4 0ANDVAR7
VAR12:=(HIGH+LOW+CLOSE*2)/4;
VAR13:=EMA(VAR12,21);
VAR14:=STD(VAR12,21);
VAR15:=((VAR12-VAR13)/VAR14*100+200)/4;
VAR16:=(EMA(VAR15,89)-25)*1.56;
VAR17:=EMA(VAR16,5)*1.22;
VAR18:=EMA(VAR17,3);
VAR19:=3*VAR17-2*VAR18;
VAR1A:=IF(CROSS(VAR19,VAR17)ANDCROSS(VAR19,VAR18)ANDCROSS(VAR17,VAR18),1,0);VAR1B:=IF(CROSS(VAR17,VAR19)ANDCROSS(VAR18,VAR19)ANDCROSS(VAR18,VAR17),1,0);
买点:IF(FILTER(VAR8=0ANDVAREANDVAR10ANDVAR1A,5)=1,10,0),COLORRED;
卖点:IF(FILTER(VAR8=100ANDVARDANDVAR1B,5)=1,10,0),COLORGREEN;
VAR1C:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),13)/4;
VAR1D:=EMA(CLOSE,2)-EMA(CLOSE,89);
VAR1E:=EMA(VAR1D,30);
VAR1F:=2*(VAR1D-VAR1E)*10;
VAR20:=POW(VAR1F,3)*0.1+POW(VAR1F,2);
VAR25:=IF(VAR1F 0.015,VAR20,0)/45;
庄拉线:VAR25,COLORYELLOW;
VAR26:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR27:=EMA(VAR26,100);
VAR28:=2*(VAR26-VAR27);
VAR29:=POW(VAR28,3)*0.1+POW(VAR28,1);
线:IF(VAR28 0.1,VAR29,0)*5,COLORRED;
量价线:(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*100,COLORWHITE;
VAR2E:=IF(FILTER(量价线 0AND量价线 3,5)=1,12,0);
涨幅前兆:IF(FILTER(庄拉线 0AND庄拉线 0.5ANDVAR2EANDVAR1C 3,10)=1,10,0),COLORWHITE;
利器:IF(FILTER(VAR2E 0ANDVAR1C 2AND庄拉线 0AND庄拉线 1AND黑马线 0AND黑马线 1.5ANDVAR2E 0,5)=1,10,0),COLORFFFFFF;
DRAWICON(买点 0,10,1);
DRAWICON(卖点 0,10,2);
DRAWICON(涨幅前兆 0,10,1);
DRAWICON(选股利器 0,10,1);
N:=20;
M:=32;
P1:=80;
P2:=100;
VAR1:=(C+H+O+L)/4;
卖出:XMA(VAR1,N)*(1+P1/1000),COLORGREEN,LINETHICK2;
买入:XMA(VAR1,M)*(1-P2/1000),COLORMAGENTA,LINETHICK2;
幅度:100*(卖出-买入)/买入,NODRAW;
MA1:=MA(VAR1,3);
STICKLINE(卖出 LOWAND卖出 HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),3,0),COLORGREEN;
STICKLINE(卖出 MIN(C,O)AND卖出 MAX(C,O),卖出,MAX(OPEN,CLOSE),3,0),COLORGREEN;
STICKLINE(卖出 LOWAND卖出 HIGH,卖出,HIGH,0,0),COLORGREEN;
STICKLINE(卖出 LOW,OPEN,CLOSE,3,0),COLORGREEN;
STICKLINE(卖出 LOW,HIGH,LOW,0,0),COLORGREEN;
STICKLINE(买入 LOWAND买入 HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),3,0),COLORMAGENTA;
STICKLINE(买入 MIN(C,O)AND买入 MAX(C,O),买入,MIN(OPEN,CLOSE),3,0),COLORMAGENTA;
STICKLINE(买入 LOWAND买入 HIGH,买入,LOW,0,0),COLORMAGENTA;
STICKLINE(买入 HIGH,OPEN,CLOSE,3,0),COLORMAGENTA;
STICKLINE(买入 HIGH,HIGH,LOW,0,0),COLORMAGENTA;
DRAWTEXT(CROSS(LOW,买入),LOW*0.95,'B'),COLORRED,LINETHICK2;
DRAWTEXT(CROSS(卖出,HIGH),HIGH*1.02,'S'),COLORGREEN;
NA:=BArslAst(YEAR!=REF(YEAR,1));
NQT:=BacKSET(NA=0,2);
NT:=BARSLAST(crOSS(NQT=1,0.5));
NC:=REF(REF(C,NT),1);
年涨幅:(C-NC)/NC*100NODRAW;
年涨天:SUM(年涨幅 0,NA+1)NODRAW;
年跌天:SUM(年涨幅 0,NA+1)NODRAW;
年平天:SUM(年涨幅=0,NA+1)NODRAW;
平盘距今:BARSLAST(年涨幅=0)NODRAW;
今年交易日:CONST(NA)+1NODRAW;
平盘日期:REF(DATE,平盘距今)-1000000NODRAW;
STICKLINE(平盘距今=0,C,O,2,0),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=CONST(平盘距今)+1,H,ISLASTBAR,REF(H,平盘距今),0),COLORYELLOW;
{
选股公式:
NA:=BARSLAST(YEAR!=REF(YEAR,1));
NQT:=BACKSET(NA=0,2);
NT:=BARSLAST(CROSS(NQT=1,0.5));
NC:=REF(REF(C,NT),1);
年涨幅:=(C-NC)/NC*100;
PT:=BARSLAST(年涨幅=0);
CROSS(C,REF(H,PT));
}
通达信很不错的涨幅公式截图