通达信历史涨幅指标(源码)

2013-11-04 19:24:00来源:本站整理浏览:1217

涨幅:=(C-REF(C,1))/REF(C,1)*100;
历史涨幅:SUM(涨幅,0),NODRAW;
一周涨幅:历史涨幅-REF(历史涨幅,5),NODRAW;
两周涨幅:历史涨幅-REF(历史涨幅,10),NODRAW;
一月涨幅:历史涨幅-REF(历史涨幅,20),NODRAW;
一季涨幅:历史涨幅-REF(历史涨幅,60),NODRAW;
半年涨幅:历史涨幅-REF(历史涨幅,120),NODRAW;
一年涨幅:历史涨幅-REF(历史涨幅,240),NODRAW;
A11:=(一月涨幅)-MA(一月涨幅,12),COLORWHITE;
A21:=(HHV(A11,20)+LLV(A11,20))/2;
A31:=(A11+A21)/2;
A41:MA((A11+A21+A31)/3,15);
M12:=MA(A11,2);
M15:MA(A11,5),COLORYELLOW;
DRAWBAND(A41,RGB(100,50,205),M15,RGB(0,50,100));
A1:=(历史涨幅)-MA(历史涨幅,12),COLORWHITE;
A2:=(HHV(A1,20)+LLV(A1,20))/2;
A3:=(A1+A2)/2;
A4:MA((A1+A2+A3)/3,15);
M2:=MA(A1,2);
M5:MA(A1,5),COLORYELLOW;
DRAWBAND(A4,RGB(60,0,205),M5,RGB(48,0,50));
上影线:=(H-C)/REF(C,1);
下影线:=(O-L)/REF(C,1);
DRAWKLINE(M2*(1+上影线),REF(M2,1)*(1+(O-REF(C,1))/REF(C,1)),REF(M2,1)*(1-下影线),M2);
DRAWTEXT(LONGCROSS(M2,M5,4),REF(M2,1),'↖上拐'),COLORGREEN;
DRAWICON(CROSS(M5,A4),A4,25);
DRAWTEXT(CROSS(M5,A4),A4,'↖日金叉'),COLORGREEN;
DRAWICON(CROSS(M15,A41),A41,26);
DRAWTEXT(CROSS(M15,A41),A41,'↖月金叉'),COLORGREEN;
TT:=CROSS(M15,A41) AND CROSS(M5,A4) AND M2*(1+上影线)>0;
DRAWTEXT(TT,-20,'启爆'),COLORGREEN;
0;
TY:=REF(M2,1)*(1+(O-REF(C,1))/REF(C,1));
AG1:=REF(TY,10)=HHV(TY,2*10+1);
BG1:=FILTER(AG1,10);
C1:=BACKSET(BG1,10+1); {这里有人说是未来,这只是用画线辅助判断}
HD:=FILTER(C1,10);
AG2:=REF(TY,10)=LLV(TY,2*10+1);
BG2:=FILTER(AG2,10);
C2:=BACKSET(BG2,10+1); {这里有人说是未来,这只是用画线辅助判断}
LD:=FILTER(C2,10);
前高位:REF(REF(M2,1)*(1+(O-REF(C,1))/REF(C,1)),BARSLAST(HD)),COLOR00FF00,POINTDOT;
STICKLINE(REF(M2,1)*(1+(O-REF(C,1))/REF(C,1)),前高位,前高位,2,0),COLORYELLOW;

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式