以下是通达信双龙出海附图源码(无源码的请下载附件导入)
双龙出海
MA1:MA(C,5),COLORRED,LINETHICK2;
MA2:MA(C,10),COLORYELLOW,LINETHICK2;
MA3:MA(C,30),COLOR9933CC,LINETHICK2;
MA4:MA(C,60),COLORGREEN,LINETHICK1;
K1:=BACKSET(MA1<REF(MA1,1),2);
IF(K1,MA1,DRAWNULL),COLOR00CC33,LINETHICK2;
K2:=BACKSET(MA2<REF(MA2,1),2);
IF(K2,MA2,DRAWNULL),COLORFFCC66,LINETHICK2;
K3:=BACKSET(MA3<REF(MA3,1),2);
IF(K3,MA3,DRAWNULL),COLORBLUE,LINETHICK2;
阻力价:HHV(HIGH,19),LINETHICK1,NODRAW;
Y:=(MA(C,5)-MA(C,30))/MA(C,5)*100;
YY1:=C>MA(C,5) AND OPEN<MA(C,5);{蛟龙出海}
YY3:=C>MA(C,10) AND OPEN<MA(C,10);
YY5:=C>MA(C,30) AND OPEN<MA(C,30);
DRAWTEXT(YY1 AND YY5 AND YY3,LOW-0.5,'←蛟龙出海'),COLORRED;
VAR1:=HHV(HIGH,25);
VAR2:=LLV(LOW,25);
VAR3:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,20);
VAR4:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,5);
VAR5:=CROSS(VAR4,VAR3);
DRAWTEXT(CROSS(VAR3,VAR4) AND BARSLAST(VAR5)>3 ,HIGH+1,'短卖'),COLORGREEN;
DRAWTEXT(CROSS(VAR3,VAR4) AND BARSLAST(VAR5)<=3 ,HIGH+1,'止损'),COLORBLUE;
DRAWTEXT(CROSS(VAR4,VAR3) ,LOW-1,'短买'),COLORYELLOW;
DRAWICON(CROSS(VAR4,VAR3) ,LOW-0.5,9);
X3:DRAWICON(CROSS(MA1,MA2),MA2,1);
X4:DRAWICON(CROSS(MA1,MA3),MA3,1);
X5:DRAWICON(CROSS(MA2,MA3),MA3,1);
公式中的短买和双龙出海做成选股公式源码
MA1:=MA(C,5);
MA2:=MA(C,10);
MA3:=MA(C,30);
MA4:=MA(C,60);
K1:=BACKSET(MA1<REF(MA1,1),2);
Y:=(MA(C,5)-MA(C,30))/MA(C,5)*100;
YY1:=C>MA(C,5) AND OPEN<MA(C,5);{蛟龙出海}
YY3:=C>MA(C,10) AND OPEN<MA(C,10);
YY5:=C>MA(C,30) AND OPEN<MA(C,30);
YY1 AND YY5 AND YY3;
VAR1:=HHV(HIGH,25);
VAR2:=LLV(LOW,25);
VAR3:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,20);
VAR4:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,5);
VAR5:=CROSS(VAR4,VAR3);
CROSS(VAR4,VAR3);
70122111.jpg
|