做多做空公式
JJ :=(C*2+H+L)/4; SK := EMA(JJ,13) - EMA(JJ,21); SD := EMA(SK,3); SP := EMA(SK,10); 長(zhǎng)線1:IF(SD>=SP,SD,SP),LINETHICK1,COLORFF00FF; 長(zhǎng)線2:IF(SP-SD,SP,SD),LINETHICK1,COLORBLUE; IF(長(zhǎng)線1>長(zhǎng)線2,長(zhǎng)線1,0)*0.35,NODRAW; A1:=EMA(CLOSE,7)-EMA(CLOSE,21); B1:=EMA((0.668*REF(A1,1)+0.333*A1),1); 做多:IF(A1>=B1,A1,B1),LINETHICK1,COLORRED; 做空:IF(B1-A1,B1,A1),LINETHICK1,COLORGREEN; DRAWICON(CROSS((3*做多-2*長(zhǎng)線2),做多) AND CROSS(做多,長(zhǎng)線2),長(zhǎng)線2*0.90,1); DRAWTEXT(做多=做空,做多,'↓'),COLORGREEN; DRAWTEXT(做多>做空,做空,'↑'),COLORRED;
|