以下是通达信彩虹之巅公式源码贴图
YS1:=(HIGH+LOW+CLOSE*2)/4;
RK3:=EMA(YS1,10);
RK4:=STD(YS1,10);
RK5:=(YS1-RK3)*100/RK4;
RK6:=EMA(RK5,5);
RK7:=EMA(RK6,10);
涨:EMA(RK6,10)+100/2-5,COLORRED;
跌:EMA(涨,4),COLORWHITE;
天晴了:IF(CROSS(涨,跌) AND 跌<-10,20,0),COLORCCCCFF;
雨季将来:IF(CROSS(跌,80),80,100),COLORFF3798;
彩虹1:EMA(跌,4),COLORFFFF50;
彩虹2:EMA(彩虹1,4);
彩虹3:=EMA(彩虹2,4),COLORYELLOW;
彩虹4:=EMA(彩虹3,4),COLORCC9900;
STICKLINE(涨<REF(涨,1),涨,MA(涨,3),5,0 ),COLOR00BB00;
STICKLINE(涨<REF(涨,1),涨,MA(涨,3),4,0 ),COLOR00CC00;
STICKLINE(涨> REF(涨,1),涨,EMA(涨,3),5,0) ,COLOR0066FF;
STICKLINE(涨> REF(涨,1),涨,EMA(涨,3),4,0) ,COLOR0088FF;
STICKLINE(涨> REF(涨,1),涨,EMA(涨,3),3,0) ,COLOR0099FF;
DRAWICON(天晴了>0,20,3);
DRAWTEXT(CROSS(涨,跌) AND 跌<20 AND 跌>-10,40,’日出’),COLORFFFFFF;
DRAWTEXT(天晴了>0,-20,’天晴’),COLORCCCCFF;
VAR11:=SUMBARS(VOL,FINANCE(7)*100);
{SUMBARS为引用函数,表示累加到指定周期数; FINANCE为财务数据函数,N为返回财务数值。}
VAR22:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
VAR3:=(CLOSE-VAR22)/VAR22*100;
VAR4:=HHV(VAR3,VAR11);
VAR5:=LLV(VAR3,VAR11);
VAR6:=(VAR3-VAR5)/(VAR4-VAR5)*100;
K:=SMA(VAR6,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
MA1:=MA(J,3),COLORGREEN;
STICKLINE(FILTER(J>MA1 AND J<=3,5)=1 AND 跌<0,涨,涨+20,6,0);
DRAWTEXT(FILTER(J>MA1 AND J<=3,5)=1 AND 跌<0,60,’注意’),COLORRED;
评论(0)