通达信财神买入公式源码
K:"KDJ.K"(21,13,3),COLORRED;
D:"KDJ.D"(21,13,3),COLORRED;
J:="KDJ.J"(21,13,3),COLORGREEN;
DRAWBAND(K,RGB(255,50,0),D,RGB(0,255,50));
IF(K<20,D,DRAWNULL),COLORFF00FF,LINETHICK3;
IF(D>80,D,DRAWNULL),COLORFFFF00,LINETHICK3;
DRAWICON(K>80 AND D>80 AND CROSS(D,K),D,14);
买入:=CROSS(J,D )AND CROSS(J,K)AND K <20 AND D<20 AND J<20;
DRAWICON(买入=1,D,4);
DRAWICON(CROSS(J,K) AND CROSS(K,D),K,1);
DRAWICON(CROSS(D,K) AND CROSS(K,J),D,2);
DRAWTEXT(ISLASTBAR AND K>REF(K,1),K,'↑上行'),COLORRED;
DRAWTEXT(ISLASTBAR AND K<REF(K,1),K,'↓下行'),COLORGREEN;
{IF(K<20,K,DRAWNULL)COLORGREEN,LINETHICK3;
IF(K>80,K,DRAWNULL)COLORMAGENTA,LINETHICK3;
IF(K<80 AND K>20,K,DRAWNULL),COLORRED,LINETHICK3;}
DRAWTEXT(CROSS(K,D) AND K<20,20,'起动'),LINETHICK2,COLOR0099FF;
DRAWTEXT(CROSS(K,30) AND D<K,40,'上扬 '),LINETHICK2,COLOR00CCFF;
DRAWTEXT(CROSS(K,65) AND D<K,60,'冲顶 '),LINETHICK2,COLOR9933FF;
DRAWTEXT(CROSS(K,75) AND D<K,70,'小心被套'),LINETHICK2,COLOR009900;
DRAWTEXT(CROSS(D,K) AND D>75,80,'头部'),COLORYELLOW;
DRAWTEXT((CONST(IF(ISLASTBAR AND K>REF(K,1),1,0))) AND CURRBARSCOUNT=60,50,'↑趋势上行,'),COLORYELLOW;
DRAWTEXT((CONST(IF(ISLASTBAR AND K<REF(K,1),1,0))) AND CURRBARSCOUNT=60,50,'↓趋势下行,'),COLORGREEN;
DRAWTEXT((CONST(IF(ISLASTBAR AND K>75 AND D>75,1,0))) AND CURRBARSCOUNT=53,50,'注意高抛'),COLORCYAN;
DRAWTEXT((CONST(IF(ISLASTBAR AND K<25 AND D<25,1,0))) AND CURRBARSCOUNT=53,50,'注意低吸'),COLORWHITE;