{共用均线}
MA5:MA(CLOSE,5),COLORWHITE;IF(MA5
MA10:MA(CLOSE,10),COLORYELLOW;IF(MA10
{MA20:MA(CLOSE,20),COLOR3366FF;IF(MA20
MA30:MA(CLOSE,30),COLORMAGENTA;IF(MA30
MA60:MA(CLOSE,60),COLORGREEN;IF(MA60
MA180:MA(CLOSE,180),COLORFF9933;IF(MA180
{1.离进场线}
JRH:=HHV(C,2);
JRL:=LLV(C,2);
MA3:=MA(C,3);
YTSL:=(3*C+L+O+H)/6;
Z1D:=C>=REF(C,1);Z1X:=C<=REF(C,1);
Z2D:=C>=REF(C,2);Z2X:=C<=REF(C,2);
X1D2:=Z1X AND Z2D;D1X2:=Z1D AND Z2X;
R1:=Z1D AND Z2D;
R2:=REF(R1,1) AND X1D2;
R3:=REF(R2,1) AND D1X2;
R4:=REF(R3,1) AND X1D2;
R5:=REF(R4,1) AND D1X2;
R6:=REF(R5,1) AND X1D2;
R7:=REF(R6,1) AND D1X2;
R8:=REF(R7,1) AND X1D2;
R9:=REF(R8,1) AND D1X2;
RA:=REF(R9,1) AND X1D2;
RB:=REF(RA,1) AND D1X2;
RC:=REF(RB,1) AND X1D2;
RD:=Z1X AND Z2X;
RE:=REF(RD,1) AND D1X2;
RF:=REF(RE,1) AND X1D2;
R10:=REF(RF,1) AND D1X2;
R11:=REF(R10,1) AND X1D2;
R12:=REF(R11,1) AND D1X2;
R13:=REF(R12,1) AND X1D2;
R14:=REF(R13,1) AND D1X2;
R15:=REF(R14,1) AND X1D2;
R16:=REF(R15,1) AND D1X2;
R17:=REF(R16,1) AND X1D2;
R18:=REF(R17,1) AND D1X2;
R19:=((REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1)) AND R1);
R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);
红色持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,COLOR0000FF,NODRAW;
离场:=IF(红色持股,JRL,DRAWNULL);
明离场价:=离场,COLORFF99FF,NODRAW;
今离场价:REF(离场,1)COLORGREEN,NODRAW;
青色观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,COLORFFFF00,NODRAW;
进:=IF(青色观望,JRH,DRAWNULL);
明进场价:=进,COLOR33AACC,NODRAW;
今进场价:REF(明进场价,1),COLORRED,NODRAW;
短买:R19,COLORLIRED,NODRAW;
STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND (青色观望 OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;
{2.解盘}
QLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2,POINTDOT,COLORGREEN,LINETHICK4;
TT:=240/FROMOPEN;
比:=TT;
J12:=(HIGH - ((HIGH - LOW) / 3));
J23:=(LOW + ((HIGH - LOW) / 3));
AAA:=CONST(HHV(H,90));
BBB:=CONST(LLV(L,100));
DRAWKLINE(H,O,L,C);
T1{早晨之星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1)
< REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)),1,0));
T2{黄昏之星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) > 1.03 AND REF(OPEN,1)
> REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.02
AND CLOSE/OPEN<0.97 AND CLOSE
T3{长十字}:=CONST(IF((CLOSE=OPEN AND HIGH/LOW >1.03),1,0));
T4{垂死十字}:=CONST(IF((CLOSE=OPEN AND CLOSE=LOW AND CLOSE!=HIGH),1,0));
T5{早晨十字星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1)
< REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)),1,0));
T6{黄昏十字星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) > 1.05 AND REF(OPEN,1)
> REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND
CLOSE/OPEN<0.95 AND CLOSE
T7{射击之星}:=CONST(IF((MIN(OPEN,CLOSE)=LOW AND HIGH-LOW >
3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5)),1,0));
T8{倒转锤头}:=CONST(IF((MIN(OPEN,CLOSE)=LOW AND HIGH-LOW >
3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5)),1,0));
T9{锤头}:=CONST(IF((HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW >
3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE < MA(CLOSE,5)),1,0));
T10{吊颈}:=CONST(IF((HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW >
3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE>MA(CLOSE,5)),1,0));
T11{穿头破脚}:=CONST(IF(((REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.96
AND CLOSE
AND OPEN>REF(CLOSE,1))OR (REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.04
AND CLOSE>REF(OPEN,1) AND OPEN
T12{乌云盖顶}:=CONST(IF((REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.97
AND OPEN>REF(CLOSE,1) AND CLOSE
T13{曙光初现}:=CONST(IF((REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03
AND OPENREF(CLOSE,1)),1,0));
T14{身怀六甲}:=CONST(IF((ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04
AND ABS(CLOSE-OPEN)/CLOSE<0.005 AND
MAX(CLOSE,OPEN) < MAX(REF(CLOSE,1),REF(OPEN,1)) AND MIN(CLOSE,OPEN)
> MIN(REF(CLOSE,1),REF(OPEN,1))),1,0));
T15{十字胎}:=CONST(IF((ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04
AND CLOSE=OPEN AND
CLOSE < MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE > MIN(REF(CLOSE,1)