gspt1:=REF(CLOSE,3)/REF(CLOSE,4)>1.09;
gspt2:=CLOSE/REF(CLOSE,1)>=1.031 AND BETWEEN(OPEN/REF(OPEN,3),1.1,0.91) AND LOW<REF(CLOSE,3) AND REF(CLOSE,1)/REF(CLOSE,2)<0.965 AND REF(CLOSE,1)<REF(OPEN,1) AND NOT(REF(HIGH,2)/REF(CLOSE,3)>1.09 AND REF(HIGH,2)/MAX(REF(CLOSE,2),REF(OPEN,2))>1.07) AND NOT(REF(CLOSE,2)<REF(OPEN,2) AND REF(OPEN,2)/REF(CLOSE,3)>1.09);
gspt3:=gspt1 AND gspt2;
gspt4:=REF(CLOSE,4)/REF(CLOSE,5)>1.09 AND REF(CLOSE,4)=REF(HIGH,4);
gspt5:=CLOSE/REF(CLOSE,1)>=1.031 AND BETWEEN(OPEN/REF(OPEN,4),1.1,0.91) AND LOW<REF(CLOSE,4) AND REF(CLOSE,1)/REF(CLOSE,2)<0.96 AND REF(CLOSE,1)<REF(OPEN,1);
gspt6:=NOT(REF(OPEN,3)/REF(CLOSE,3)>1.07 AND REF(OPEN,3)>REF(CLOSE,4) AND REF(CLOSE,3)<REF(LOW,4));
gspt7:=gspt4 AND gspt5 AND gspt6;
gspt8:=REF(CLOSE,5)/REF(CLOSE,6)>1.09 AND REF(CLOSE,5)=REF(HIGH,5);
gspt9:=CLOSE/REF(CLOSE,1)>=1.031 AND BETWEEN(OPEN/REF(OPEN,5),1.1,0.91) AND LOW<REF(CLOSE,5) AND REF(CLOSE,1)/REF(CLOSE,2)<0.96 AND REF(CLOSE,1)<REF(OPEN,1) AND NOT(REF(HIGH,4)/REF(CLOSE,5)>1.05 AND REF(HIGH,4)/MAX(REF(CLOSE,4),REF(OPEN,4))>1.07) AND NOT(REF(LOW,4)/REF(CLOSE,5)>1.02 AND REF(CLOSE,4)<REF(OPEN,4) AND MA(CLOSE,10)/OPEN>1.03 AND REF(OPEN,1)<REF(MA(CLOSE,10),1)) AND NOT(REF(OPEN,3)/REF(CLOSE,3)>1.07 AND REF(OPEN,3)>REF(CLOSE,4) AND REF(CLOSE,3)<REF(LOW,4) AND REF(CLOSE,4)/REF(CLOSE,5)>1.09);
gspt10:=gspt8 AND gspt9;
gspt11:=REF(CLOSE,3)/REF(CLOSE,4)>1.09;
gspt12:=CLOSE/REF(CLOSE,1)>=1.031 AND BETWEEN(OPEN/REF(OPEN,3),1.1,0.91) AND LOW<REF(CLOSE,3) AND EVERY(MA(CLOSE,5)>MA(CLOSE,10),4) AND BETWEEN(REF(OPEN,1)/REF(MA(CLOSE,5),1),1.01,0.99);
gspt13:=gspt11 AND gspt12;
gspt14:=gspt3 OR gspt7 OR gspt10 OR gspt13;
gspt15:=REF(CLOSE,4)/REF(CLOSE,5)>1.09 AND REF(CLOSE,4)=REF(HIGH,4);
gspt16:=CLOSE/REF(CLOSE,1)>=1.031 AND REF(CLOSE,1)<REF(CLOSE,4) AND BETWEEN(REF(CLOSE,1)/REF(CLOSE,2),1.015,0.985) AND OPEN<REF(CLOSE,4) AND OPEN<MA(CLOSE,5) AND EVERY(REF(MA(CLOSE,5),1)>REF(MA(CLOSE,10),1),2);
gspt17:=REF(HIGH,1)>REF(CLOSE,1);
gspt18:=NOT(REF(CLOSE,1)>REF(OPEN,1) AND REF(CLOSE,1)/REF(OPEN,1)>1.03);
gspt19:=gspt15 AND gspt16 AND gspt17 AND gspt18;
gspt20:=REF(CLOSE,3)/REF(CLOSE,4)>1.09 AND REF(CLOSE,3)=REF(HIGH,3);
gspt21:=CLOSE/REF(CLOSE,1)>=1.031 AND REF(CLOSE,1)<REF(CLOSE,3) AND (REF(CLOSE,1)/REF(CLOSE,2)<0.96 AND REF(CLOSE,1)<REF(OPEN,1) AND REF(OPEN,1)/REF(CLOSE,1)<1.01) AND OPEN<REF(CLOSE,3) AND OPEN<MA(CLOSE,5) AND EVERY(REF(MA(CLOSE,5),1)>REF(MA(CLOSE,10),1),2);
gspt22:=REF(HIGH,1)>REF(CLOSE,1);
gspt23:=gspt20 AND gspt21 AND gspt22;
gspt24:=REF(CLOSE,3)/REF(CLOSE,4)>1.09 AND REF(CLOSE,3)=REF(HIGH,3);
gspt25:=CLOSE/REF(CLOSE,1)>=1.031 AND REF(CLOSE,1)<REF(CLOSE,3) AND (REF(CLOSE,1)<REF(OPEN,1) AND REF(OPEN,1)/REF(CLOSE,1)<1.01) AND OPEN<REF(CLOSE,3) AND OPEN<MA(CLOSE,5) AND EVERY(REF(MA(CLOSE,5),1)>REF(MA(CLOSE,10),1),3);
gspt26:=REF(HIGH,1)>REF(CLOSE,1);
gspt27:=gspt24 AND gspt25 AND gspt26{2};
gspt28:=NOT(REF(CLOSE,4)/REF(CLOSE,5)>1.095 AND REF(CLOSE,3)/REF(CLOSE,4)<0.92 AND REF(OPEN,3)>REF(CLOSE,4) AND REF(CLOSE,3)<REF(OPEN,4));
gspt29:=gspt19 OR gspt23 OR gspt27 AND gspt28;
gspt30:=IF(NAMELIKE(2),0,1) AND IF(NAMELIKE(3),0,1);
gspt31:=IF(CODELIKE(1),0,1);
天下第一龙回头:gspt14 OR gspt29 AND gspt30 AND gspt31,COLORRED,LINETHICK2;