HGWT1:=MA(C,1);
HGWT2:=SMA(SMA(SMA(HGWT1,2,1),2,1),2,1);
HGWT3:=MA(HGWT2,3);
HGWT4:=(2*CLOSE+HIGH+LOW)/4;
HGWT5:=MA(HGWT4,7);
HGWT6:=HGWT5-MA(HGWT4,7/2)<0;
HGWT7:=HGWT5-MA(HGWT4,7/2)>0;
HGWT8:=BARSLAST(HGWT6);
HGWT9:=0-BARSLAST(HGWT7);
HGWT10:=IF(HGWT6<=0,HGWT8,HGWT9);
HGWT11:=(CLOSE*2+HIGH+LOW)/4;
HGWT12:=EMA(HGWT11,13)-EMA(HGWT11,34);
HGWT13:=((CLOSE>REF(CLOSE,1)) AND (CLOSE>REF(CLOSE,2)));
HGWT14:=((REF(HGWT13,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT15:=((REF(HGWT14,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT16:=((REF(HGWT15,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT17:=((REF(HGWT16,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT18:=((REF(HGWT17,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT19:=((REF(HGWT18,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT20:=((REF(HGWT19,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT21:=((REF(HGWT20,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT22:=((REF(HGWT21,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT23:=((REF(HGWT22,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT24:=((REF(HGWT23,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT25:=((CLOSE<REF(CLOSE,1)) AND (CLOSE<REF(CLOSE,2)));
HGWT26:=((REF(HGWT25,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT27:=((REF(HGWT26,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT28:=((REF(HGWT27,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT29:=((REF(HGWT28,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT30:=((REF(HGWT29,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT31:=((REF(HGWT30,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT32:=((REF(HGWT31,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT33:=((REF(HGWT32,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT34:=((REF(HGWT33,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT35:=((REF(HGWT34,1) AND (CLOSE<=REF(CLOSE,1))) AND (CLOSE>=REF(CLOSE,2)));
HGWT36:=((REF(HGWT35,1) AND (CLOSE>=REF(CLOSE,1))) AND (CLOSE<=REF(CLOSE,2)));
HGWT37:=(REF((((((((((((HGWT25 OR HGWT26) OR HGWT27) OR HGWT28) OR HGWT29) OR HGWT30) OR HGWT31) OR HGWT32) OR HGWT33) OR HGWT34) OR HGWT35) OR HGWT36),1) AND HGWT13);
HGWT38:=(REF((((((((((((HGWT13 OR HGWT14) OR HGWT15) OR HGWT16) OR HGWT17) OR HGWT18) OR HGWT19) OR HGWT20)OR HGWT21) OR HGWT22) OR HGWT23) OR HGWT24),1) AND HGWT25);
HGWT39:=MA(CLOSE,75);
HGWT40:=EMA(HGWT39,3);
HGWT41:=(HIGH+LOW)/5;
HGWT42:=(MA(HGWT41,4))-(MA(HGWT41,34));
HGWT43:=CROSS(HGWT42,0);
HGWT44:=CROSS(0,HGWT42);
HGWT45:=BARSLAST(HGWT43);
HGWT46:=BARSLAST(HGWT44);
HGWT47:=REF(HGWT43,1);
HGWT48:=REF(HGWT44,1);
HGWT49:=BARSLAST(HGWT47);
HGWT50:=BARSLAST(HGWT48);
HGWT51:=IF((HGWT49<HGWT50),(REF((HHV(HIGH,2)),HGWT49)),(REF((LLV(LOW,2)),HGWT50)));
HGWT52:=(((REF(CLOSE,1))<=(REF(HGWT51,1))) AND (CLOSE>HGWT51)) AND (HGWT45<HGWT46);
HGWT53:=(((REF(CLOSE,1))>=(REF(HGWT51,1))) AND (CLOSE<HGWT51)) AND (HGWT46<HGWT45);
HGWT54:=HGWT52 AND ((COUNT(HGWT52,HGWT45))=1);
HGWT55:=HGWT53 AND ((COUNT(HGWT53,HGWT46))=1);
HGWT56:=HGWT54 AND ((REF(BARSLAST(HGWT55),1))<(REF(BARSLAST(HGWT54),1)));
HGWT58:=AMOUNT/(VOL);
HGWT59:=MA(HGWT58,13);
HGWT60:=(C-HGWT59)/HGWT59*100;
HGWT61:=MA(CLOSE,22);
HGWT62:=HGWT61+2*STD(C,22);
HGWT63:=HGWT61-2*STD(C,22);
HGWT68:=(C-HGWT63)/(HGWT62-HGWT63);
HGWT69:=(REF(HGWT60,1)<-15 AND REF(HGWT68,1)<0 AND HGWT60>REF(HGWT60,1));
梨花剑买入:IF(LLV(MA(HGWT2,8),3)<HGWT2,LLV(MA(HGWT2,8),3),HGWT2),LINETHICK2;
梨花剑卖出:HHV(MA(HGWT2,1),13),COLORYELLOW,LINETHICK2;
IF(HGWT2>HGWT3,HGWT2,DRAWNULL),COLORRED,LINETHICK4;
IF(HGWT2<HGWT3,HGWT2,DRAWNULL),COLORGREEN,LINETHICK4;
STICKLINE(梨花剑卖出>HGWT2 AND HGWT2>HGWT3,梨花剑卖出,HGWT2,0,1),COLORLIBLUE;
STICKLINE(梨花剑卖出>HGWT3 AND HGWT2<HGWT3,梨花剑卖出,HGWT3,0,1),COLORBLUE;
STICKLINE((C>=O),OPEN,LOW,0,0),COLOR0726CA;
STICKLINE((C>=O),CLOSE,HIGH,0,0),COLOR0726CA;
STICKLINE((C<O),CLOSE,LOW,0,0),COLORDE9100;
STICKLINE((C<O),OPEN,HIGH,0,0),COLORDE9100;
STICKLINE((C<O),CLOSE,OPEN,4,0),COLORFF5B00;
STICKLINE((C<O),CLOSE,OPEN,3.4,0),COLORFF6C00;
STICKLINE((C<O),CLOSE,OPEN,2.8,0),COLORFF7B00;
STICKLINE((C<O),CLOSE,OPEN,2.2,0),COLORFF9C00;
STICKLINE((C<O),CLOSE,OPEN,1.6,0),COLORFFBE00;
STICKLINE((C<O),CLOSE,OPEN,1,0),COLORFFCC00;
STICKLINE((C<O),CLOSE,OPEN,0.3,0),COLORFFFF00;
STICKLINE((C>O),CLOSE,OPEN,4,0),COLOR070084;
STICKLINE((C>O),CLOSE,OPEN,3.4,0),COLOR0000A3;
STICKLINE((C>O),CLOSE,OPEN,2.8,0),COLOR0000B7;
STICKLINE((C>O),CLOSE,OPEN,2.2,0),COLOR0000CD;
STICKLINE((C>O),CLOSE,OPEN,1.6,0),COLOR0000E9;
STICKLINE((C>O),CLOSE,OPEN,1,0),COLOR0754E9;
STICKLINE((C>O),CLOSE,OPEN,0.5,0),COLOR076EF3;
STICKLINE((C>O),CLOSE,OPEN,0.2,0),COLOR077BF3;
STICKLINE(HGWT37,O,O+(C-O)/3,4,0),COLOR1029FF;
STICKLINE(HGWT37,O,O+(C-O)/3,3.4,0),COLOR1040FF;
STICKLINE(HGWT37,O,O+(C-O)/3,2.8,0),COLOR1083FF;
STICKLINE(HGWT37,O,O+(C-O)/3,2.2,0),COLOR10ABFF;
STICKLINE(HGWT37,O,O+(C-O)/3,1.6,0),COLOR10D0FF;
STICKLINE(HGWT37,O,O+(C-O)/3,1,0),COLOR10FFFF;
STICKLINE(HGWT37,O,O+(C-O)/3,0.3,0),COLOR00FFFF;
STICKLINE(HGWT38,O,O+(C-O)/3,4.3,0),COLOR009900;
STICKLINE(HGWT38,O,O+(C-O)/3,3.2,0),COLOR00AA00;
STICKLINE(HGWT38,O,O+(C-O)/3,2.4,0),COLOR00BB00;
STICKLINE(HGWT38,O,O+(C-O)/3,1.7,0),COLOR00CC00;
STICKLINE(HGWT38,O,O+(C-O)/3,1.1,0),COLOR00DD00;
STICKLINE(HGWT38,O,O+(C-O)/3,0.5,0),COLOR00EE00;
STICKLINE(HGWT38,O,O+(C-O)/3,0.2,0),COLOR00FF00;
DRAWTEXT(HGWT56,HGWT3*0.99,'←梨花剑'),COLORYELLOW;
STICKLINE(HGWT69,LOW*0.93,LOW*0.95,6,0)COLORRED;
STICKLINE(HGWT69>0,C,O,4,0),COLORRED;
STICKLINE(HGWT69>0,C,O,3.4,0),COLOR1029FF;
STICKLINE(HGWT69>0,C,O,2.8,0),COLOR1040FF;
STICKLINE(HGWT69>0,C,O,2.2,0),COLOR1083FF;
STICKLINE(HGWT69>0,C,O,1.6,0),COLOR10ABFF;
STICKLINE(HGWT69>0,C,O,1,0),COLOR10D0FF;
STICKLINE(HGWT69>0,C,O,0.3,0),COLOR10FFFF;
DRAWTEXT(HGWT69>0,LOW*0.98,'$'),COLORFF00FF;
DRAWTEXT(HGWT69>0,LOW*0.92,'探头'),COLORFF00FF;