注意安全: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;
公式模块:
YS1:=(HIGH+LOW+CLOSE*2)/4;
RK3:=EMA(YS1,10);
RK4:=STD(YS1,10);
RK5:=(YS1-RK3)*100/RK4;
RK6:=EMA(RK5,5);
涨:=EMA(RK6,10)+100/2-5;
跌:=EMA(涨,4);
CROSS(涨,跌) AND 跌