编写要求:
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORGREEN; M20:MA(CLOSE,20),COLORWHITE; M60:MA(CLOSE,60),COLORLIBLUE; MA144:=MA(CLOSE,144); DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIFF,9); A1:=BARSLAST(REF(CROSS(DEA,DIFF),1)); A2:=BARSLAST(REF(CROSS(DIFF,DEA),1)); VAR1:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20; HONGJU:=IF(VAR1>0,VAR1,0); GAOPAO:=CROSS(DIFF,DEA) AND HONGJU>=40; DRAWICON(GAOPAO,HIGH*1.01,6); DRAWTEXT(GAOPAO,HIGH*1.02,'顶背'),COLORGREEN; LLVV:=LLV(LOW,5); DIXI:=CROSS(DEA,DIFF) AND REF(DEA,A1+1)>0 AND DEA<0; DRAWICON(DIXI,LOW*0.96,38); DRAWTEXT(DIXI,LOW*0.96,'波段低吸'),COLORYELLOW; 工作线:EMA(CLOSE,17),COLORYELLOW; 生命线:MA(CLOSE,56),COLORRED; M0:=MA(CLOSE,5); M10:=MA(CLOSE,12); M1:=MA(CLOSE,20); M30:=MA(CLOSE,30); M2:=MA(CLOSE,60); M3:=MA(CLOSE,240); M4:=MA(CLOSE,120); M41:=MA(CLOSE,41); TJ2:=MA(CLOSE,3)2 OR CLOSE/REF(CLOSE,1)>0.035 AND CLOSE>EMA(CLOSE,17)); STICKLINE(短线,HIGH,LOW,0.5,0),COLORFFFF00; STICKLINE(短线,OPEN,CLOSE,10,1),LINETHICK2,COLORFFFF00; CY:=BARSLAST(短线); MACD双底:=REF(LOW,A2+1)
公式在线网解答:
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);