{单根k线}
{大阳,大阴}
大阳:=O=L AND C=H AND O<>C;
大阴:=O=H AND C=L AND O<>C;
DRAWTEXT(大阳,LOW,'大阳线');
DRAWTEXT(大阴,LOW,'大阴线');
{高档流星,低档倒状铁锤,影线越长效力越大}
阳流星:=O=L AND C<H AND O<>C AND 2*(Abs(C-O))<=H-C;
阴流星:=C=L AND C<H AND O<>C AND 2*(ABS(C-O))<=H-O;
DRAWTEXT(阳流星,LOW,'阳流星');
DRAWTEXT(阴流星,LOW,'阴流星');
{高档上吊,低档铁锤,影线越长效力越大}
阳上吊:=C=H AND C>O AND C>L AND 2*(ABS(C-O))<=O-L;
阴上吊:=O=H AND O>C AND O>L AND 2*(ABS(C-O))<=C-L;
DRAWTEXT(阳上吊,LOW,'阳上吊');
DRAWTEXT(阴上吊,LOW,'阴上吊');
{纺锤,具有上吊和流星的特点}
{阳纺锤:=L<O AND O<C AND C<H;
阴纺锤:=L<C AND C<O AND O<H;
DRAWTEXT(阳纺锤,LOW,'阳纺锤');
DRAWTEXT(阴纺锤,LOW,'阴纺锤');};
{十字星}
十字星:=C=O AND L<C AND H>C;
DRAWTEXT(十字星,LOW,'十字星');
{==================================多头===================================}
{二根K线组合}
贯穿线:= REF(C,1)<REF(O,1) AND C>O AND C>=(REF(O,1)-REF(C,1))/2+REF(C,1) AND O<REF(C,1) AND C<REF(O,1) ;
DRAWTEXT(贯穿线,LOW*0.995,'贯穿线')COLORRED;
吞噬线:=C>O AND C>REF(MAX(O,C),1) AND O<REF(MIN(O,C),1);
DRAWTEXT(吞噬线,LOW*0.995,'阳吞噬')COLORRED;
颈入线:= REF(C,1)<REF(O,1) AND C>O AND C<=(REF(O,1)-REF(C,1))/2+REF(C,1) AND O<REF(C,1) AND C<REF(O,1) AND C>REF(C,1) ;
DRAWTEXT(颈入线,LOW*0.995,'颈入线')COLORYELLOW;
颈上线:= REF(C,1)<REF(O,1) AND C>O AND C<=(REF(O,1)-REF(C,1))/2+REF(C,1) AND O<REF(C,1) AND C<REF(O,1) AND C<=REF(C,1) AND C>REF(L,1) ;
DRAWTEXT(颈上线,LOW*0.995,'颈上线')COLORGREEN;
{低星形:=REF(MAX(C,O),1)-REF(MIN(C,O),1)>(MAX(C,O)-MIN(C,O))*2 AND MAX(C,O)<REF(MIN(C,O),1) ;
DRAWTEXT(低星形,LOW*0.995,'低星形')COLORRED;
高星形:=REF(MAX(C,O),1)-REF(MIN(C,O),1)>(MAX(C,O)-MIN(C,O))*2 AND MIN(C,O)>REF(MAX(C,O),1) ;
DRAWTEXT(高星形,LOW*0.995,'高星形')COLORGREEN;}
多孕线:= REF(C,1)<REF(O,1) AND MIN(C,O)>REF(MIN(C,O),1) AND MAX(C,O)<REF(MAX(C,O),1);
DRAWTEXT(多孕线,LOW*0.995,'多孕线')COLORYELLOW;
上升反拖线:=REF(C,1)>REF(MA(C,5),1)AND REF(C,1)>REF(MA(C,10),1) AND REF(C,1)>REF(O,1) AND O<REF(C,1) AND O>REF(O,1) AND C<REF(O,1);
DRAWTEXT(上升反拖线,LOW*0.995,'上升反拖线')COLORRED;
{三根K线组合}
外侧三阳:=REF(C,1)>REF(O,1) AND REF(C,1)>REF(MAX(O,C),2) AND REF(O,1)<REF(MIN(O,C),2) AND C>REF(C,1) AND C>O;
DRAWTEXT(外侧三阳,LOW*0.99,'外侧三阳')COLORMAGENTA;
晨星:=REF(MAX(C,O),2)-REF(MIN(C,O),2)>(REF(MAX(C,O),1)-REF(MIN(C,O),1))*2 AND REF(MAX(C,O),1)<REF(MIN(C,O),2) AND MAX(C,O)-MIN(C,O)>(REF(MAX(C,O),1)-REF(MIN(C,O),1))*2 AND MIN(C,O)>REF(MAX(C,O),1) AND C>O AND C>=(REF(MAX(C,O),2)-REF(MIN(C,O),2))/2+REF(MIN(C,O),2);
DRAWTEXT(晨星,LOW*0.99,'晨星')COLORMAGENTA;
内困三红:= REF(C,2)<REF(O,2) AND REF(MIN(C,O),1)>REF(MIN(C,O),2) AND REF(MAX(C,O),1)<REF(MAX(C,O),2)AND C>REF(MAX(C,O),1);
DRAWTEXT(内困三红,LOW*0.99,'内困三红')COLORMAGENTA;
{====================================空头=======================================}
{二根K线组合}
乌云盖顶:=REF(C,1)>REF(MA(C,5),1) AND REF(C,1)>REF(O,1) AND O>C AND O>REF(C,1) AND C<REF((C+O)/2,1) AND C>REF(O,1) ;
DRAWTEXT(乌云盖顶,H*1.02,'乌云盖顶')COLORLIGREEN;
阴吞噬:=REF(C,1)>REF(MA(C,5),1) AND REF(C,1)>REF(O,1) AND O>C AND O>REF(C,1) AND C<REF((C+O)/2,1) AND C<REF(O,1) ;
DRAWTEXT(阴吞噬,H*1.02,'阴吞噬')COLORLIGREEN;
空孕线:=REF(C>O,1) AND MIN(C,O)>REF(O,1) AND MAX(C,O)<REF(C,1) AND REF(C>MA(C,5),1);
DRAWTEXT(空孕线,H*1.02,'空孕线')COLORLIGREEN;
{三根K线组合}
最后包容线:=REF(C>MA(C,5),2) AND REF(C>O,2)AND REF(O>C,1)AND REF(O,1)>REF(C,2) AND REF(C,1)<REF(C,2) AND O<REF(C,1)AND C>REF(O,1) AND REF(C,1)>REF(O,2);
DRAWTEXT(最后包容线,H*1.03,'包容线')COLORCYAN;
夜星:=REF(C>MA(C,5),2) AND REF(C>O,2) AND REF(O,1)>REF(C,2) AND REF(C,1)>REF(C,2) AND O<REF(MIN(C,O),1) AND C<REF((C+O)/2,2);
DRAWTEXT(夜星,H*1.03,'夜星')COLORCYAN;
崩盘:=REF(C>MA(C,5),2) AND REF(C>O,2) AND REF(MAX(C,O),1)< REF(O,2) AND O<REF(MIN(C,O),1) AND C<O;
DRAWTEXT(崩盘,H*1.03,'崩盘')COLORCYAN;
双鸦:=REF(C>O,2) AND REF(O,1)>REF(C,2) AND REF(C,1)>REF(C,2) AND REF(C<O,1) AND O>REF(O,1) AND C<REF(C,1);
DRAWTEXT(双鸦,H*1.03,'双鸦')COLORCYAN;