WX:=MA(CLOSE,0);
C1:=REF(CLOSE,1);
C2:=HHV(C1,2);
C3:=LLV(C1,1);
ET:=HHV(C1,2);
ET1:=REF(ET,1);
XB:=LLV(C1,1);
XB1:=REF(XB,1);
M:=BARSLAST(((CLOSE < XB) AND (C1 >= XB1)));
M11:=REF(M,1);
N9:=BARSLAST(((CLOSE > ET) AND (C1 <= ET1)));
N1:=REF(N9,1);
M21:=(BARSLAST((((M - N9) > 0) AND (M11 <= N1))) + 1);
N2:=(BARSLAST((((N9 - M) > 0) AND (N1 <= M11))) + 1);
ET2:=HHV(ET,M21);
XB2:=LLV(XB,N2);
A:=IF((((M - N9) > 0) AND (M11 <= N1)),1,IF((((N9 - M) > 0) AND (N1 <= M11)),0,2));
H1:=IF(((M - N9) > 0),CLOSE,ET2);
H2:=IF((A = 1),CLOSE,C2);
H3:=IF(((M - N9) < 0),CLOSE,XB2);
H4:=IF((A = 1),CLOSE,XB2);
H5:=IF((((M - N9) > 0) OR (A = 1)),CLOSE,H3);
H6:=REF(H5,1);
H8:=(H5 > H6);
H9:=(((H4 = REF(H4,1)) AND (REF(H4,1) < REF(H4,2))) AND (H5 > REF(H5,2)));
H10:=(((H2 = REF(H2,1)) AND (H4 = REF(H4,1))) AND (H5 = REF(H5,2)));
W:=((H8 OR H9) OR H10);
T9:=((H5 < H6) AND (H5 < REF(H5,2)));
T10:=((H4 = REF(H4,1)) AND (H5 < REF(H5,2)));
T11:=((H3 > REF(H3,1)) AND (H5 < REF(H5,1)));
T12:=((H5 = REF(H5,1)) AND (H3 = H4));
T13:=((H2 = REF(H2,1)) AND (H2 = H5));
TW:=((((T9 OR T10) OR T11) OR T12) OR T13);
BBP:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);
STICKLINE((ISLASTBAR AND W),(H5 * 1.025),(H5 * 0.99),0.5,0),SHIFT1,colorRED;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,8,0),SHIFT1,COLORFFBBFF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,8,0),SHIFT1,COLORFF00FF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,7,0),SHIFT1,COLORFF22FF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,6,0),SHIFT1,COLORFF44FF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,5,0),SHIFT1,COLORFF66FF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,4,0),SHIFT1,COLORFF88FF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,3,0),SHIFT1,COLORFF99FF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,2,0),SHIFT1,COLORFFAAFF;
STICKLINE((ISLASTBAR AND W),(H5 * 1.02),H5,1,0),SHIFT1,COLORFFBBFF;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.96),((H5 + H3) / 2.05),0.5,0),SHIFT1,colorCYAN;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),8,0),SHIFT1,COLOR00FF00;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),8,0),SHIFT1,COLOR008800;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),7,0),SHIFT1,COLOR009900;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),6,0),SHIFT1,COLOR00AA00;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),5,0),SHIFT1,COLOR00BB00;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),4,0),SHIFT1,COLOR00CC00;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),3,0),SHIFT1,COLOR00DD00;
sTICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),2,0),SHIFT1,COLOR00EE00;
STICKLINE((ISLASTBAR AND TW),((H5 + H4) / 1.99),((H5 + H3) / 2.03),1,0),SHIFT1,COLOR00FF00;
DRAWTEXT((ISLASTBAR AND (BBP >= 96.5)),(H5 * 1.022),'明见\n短高\n龙头\n除外'),SHIFT1,coloryellow;
DRAWTEXT((ISLASTBAR AND (BBP < 1)),((H5 + H4) / 1.96),'明见\n短低\n跌停\n除外'),SHIFT1,colorblue;
DRAWTEXT(((ISLASTBAR AND W) AND (BBP < 96.5)),(H5 * 1.022),'明日\n看涨'),SHIFT1,colorgreen;
DRAWTEXT(((ISLASTBAR AND TW) AND (BBP > 1)),((H5 + H4) / 2),'明日\n看跌'),SHIFT1,colormagenta;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,7,0),color00AA;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,6,0),color00BB;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,5,0),color00CC;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,4,0),color00DD;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3,0),color00EE;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2,0),color00FF;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1,0),color00FF;
STICKLINE(CLOSE>=OPEN,HIGH,LOW,0,0),color00FF;
STICKLINE(CLOSE<=OPEN,CLOSE,OPEN,7,0),colorAAAA00;
STICKLINE(CLOSE<=OPEN,CLOSE,OPEN,6,0),colorBBBB00;
STICKLINE(CLOSE<=OPEN,CLOSE,OPEN,5,0),colorCCCC00;
STICKLINE(CLOSE<=OPEN,CLOSE,OPEN,4,0),colorDDDD00;
STICKLINE(CLOSE<=OPEN,CLOSE,OPEN,3,0),colorEEEE00;
STICKLINE(CLOSE<=OPEN,CLOSE,OPEN,2,0),colorFFFF00;
STICKLINE(CLOSE<=OPEN,CLOSE,OPEN,1,0),colorFFFF00;
STICKLINE(CLOSE<=OPEN,HIGH,LOW,0,0),colorFFFF00;
|