编写要求:
RSV:= (CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100; FASTK:=SMA(RSV,3,1); K:SMA(FASTK,3,1)COLORRED,LINETHICK2; D:SMA(K,5,1)COLORGREEN,LINETHICK2; A1:=LLV(LOW,999999); A2:=HHV(HIGH,999999); A3:=100/(A2-A1); VAR1:=HHV(HIGH,9)-LLV(LOW,9); VAR2:=HHV(HIGH,9)-CLOSE; VAR3:=CLOSE-LLV(LOW,9); VAR4:=VAR2/VAR1*100-70; VAR6:=(2*CLOSE+HIGH+LOW)/4; VAR7:=SMA(VAR3/VAR1*100,3,1); VAR8:=LLV(LOW,34); VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1); VAR10:=IF(VAR9>100,VAR9-100,0); VAR11:=HHV(HIGH,34); VAR12:=EMA((VAR6-VAR8)/(VAR11-VAR8)*100,13); VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2); VAR14:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF (INDEXC,1))/INDEXC,8,1)*100-25; VAR15:=MA(VAR14,3); VAR16:=REF(VAR15,1); STICKLINE(VAR12-VAR13>0,VAR12,VAR13,8,0),COLORRED,LINETHICK2; STICKLINE(VAR12-VAR13<0,VAR12,VAR13,8,0),COLORGREEN,LINETHICK2; 生命线:EMA(VAR13,5); STICKLINE(CROSS(VAR13,VAR12) AND VAR12>60,80,100,8,0),COLOR00FF00; 绿灯亮卖:CROSS(VAR13,VAR12) AND VAR12>60,COLOR00FF00; STICKLINE(CROSS(VAR12,VAR13) AND VAR12>VAR13 AND VAR12<18,20,0,8,0),COLORRED,LINETHICK2; 红灯亮买:CROSS(VAR12,VAR13) AND VAR12>VAR13 AND VAR12<18,COLORRED; 即,出现红灯时选股买入,谢谢
公式在线网解答:
VAR6:=(2*CLOSE+HIGH+LOW)/4;
VAR8:=LLV(LOW,34);
VAR11:=HHV(HIGH,34);
VAR12:=EMA((VAR6-VAR8)/(VAR11-VAR8)*100,13);
VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2);
CROSS(VAR12,VAR13) AND VAR12>VAR13 AND VAR12<18;