以下是通达信做多做空公式
通达信做多做空公式
JJ :=(C*2+H+L)/4;
SK := EMA(JJ,13) - EMA(JJ,21);
SD := EMA(SK,3);
SP := EMA(SK,10);
长线1:IF(SD>=SP,SD,SP),LINETHICK1,COLORFF00FF;
长线2:IF(SP-SD,SP,SD),LINETHICK1,COLORBLUE;
IF(长线1>长线2,长线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*长线2),做多) AND CROSS(做多,长线2),长线2*0.90,1);
DRAWTEXT(做多=做空,做多,'↓'),COLORGREEN;
DRAWTEXT(做多>做空,做空,'↑'),COLORRED;