DRAWGBK(CLOSE>0,COLORRGB(180,180,180),COLORRGB(89,1,1),1);
YC_0:=BARSCOUNT(CLOSE);
YC_2:=SYSPARAM(2);
YC_3:=SYSPARAM(3);
YC_4:=SYSPARAM(4);
YC_5:=SYSPARAM(5);
YC_NN0:=(YC_3 - YC_2);
YC_NN:=(YC_0 - YC_2);
YC_HH1:=((YC_4 - YC_5) / 22);
YC_HH2:=(YC_HH1 / 4);
YC_LL1:=LLV(LOW,YC_NN0);
YC_LL2:=YC_LL1[YC_3];
YC_Y0:=(YC_0 >= YC_2);
YC_VV0:=IF(((YC_Y0 = 1) AND (SYSPARAM(1) >= YC_0)),VOL,0);
YC_C1:=IF(BETWEEN(CLOSE,(YC_4 - (0 * YC_HH1)),(YC_4 - (1 * YC_HH1))),YC_VV0,0);
YC_C2:=IF(BETWEEN(CLOSE,(YC_4 - (1 * YC_HH1)),(YC_4 - (2 * YC_HH1))),YC_VV0,0);
YC_C3:=IF(BETWEEN(CLOSE,(YC_4 - (2 * YC_HH1)),(YC_4 - (3 * YC_HH1))),YC_VV0,0);
YC_C4:=IF(BETWEEN(CLOSE,(YC_4 - (3 * YC_HH1)),(YC_4 - (4 * YC_HH1))),YC_VV0,0);
YC_C5:=IF(BETWEEN(CLOSE,(YC_4 - (4 * YC_HH1)),(YC_4 - (5 * YC_HH1))),YC_VV0,0);
YC_C6:=IF(BETWEEN(CLOSE,(YC_4 - (5 * YC_HH1)),(YC_4 - (6 * YC_HH1))),YC_VV0,0);
YC_C7:=IF(BETWEEN(CLOSE,(YC_4 - (6 * YC_HH1)),(YC_4 - (7 * YC_HH1))),YC_VV0,0);
YC_C8:=IF(BETWEEN(CLOSE,(YC_4 - (7 * YC_HH1)),(YC_4 - (8 * YC_HH1))),YC_VV0,0);
YC_C9:=IF(BETWEEN(CLOSE,(YC_4 - (8 * YC_HH1)),(YC_4 - (9 * YC_HH1))),YC_VV0,0);
YC_C10:=IF(BETWEEN(CLOSE,(YC_4 - (9 * YC_HH1)),(YC_4 - (10 * YC_HH1))),YC_VV0,0);
YC_C11:=IF(BETWEEN(CLOSE,(YC_4 - (10 * YC_HH1)),(YC_4 - (11 * YC_HH1))),YC_VV0,0);
YC_C12:=IF(BETWEEN(CLOSE,(YC_4 - (11 * YC_HH1)),(YC_4 - (12 * YC_HH1))),YC_VV0,0);
YC_C13:=IF(BETWEEN(CLOSE,(YC_4 - (12 * YC_HH1)),(YC_4 - (13 * YC_HH1))),YC_VV0,0);
YC_C14:=IF(BETWEEN(CLOSE,(YC_4 - (13 * YC_HH1)),(YC_4 - (14 * YC_HH1))),YC_VV0,0);
YC_C15:=IF(BETWEEN(CLOSE,(YC_4 - (14 * YC_HH1)),(YC_4 - (15 * YC_HH1))),YC_VV0,0);
YC_C16:=IF(BETWEEN(CLOSE,(YC_4 - (15 * YC_HH1)),(YC_4 - (16 * YC_HH1))),YC_VV0,0);
YC_C17:=IF(BETWEEN(CLOSE,(YC_4 - (16 * YC_HH1)),(YC_4 - (17 * YC_HH1))),YC_VV0,0);
YC_C18:=IF(BETWEEN(CLOSE,(YC_4 - (17 * YC_HH1)),(YC_4 - (18 * YC_HH1))),YC_VV0,0);
YC_C19:=IF(BETWEEN(CLOSE,(YC_4 - (18 * YC_HH1)),(YC_4 - (19 * YC_HH1))),YC_VV0,0);
YC_C20:=IF(BETWEEN(CLOSE,(YC_4 - (19 * YC_HH1)),(YC_4 - (20 * YC_HH1))),YC_VV0,0);
YC_C21:=IF(BETWEEN(CLOSE,(YC_4 - (20 * YC_HH1)),(YC_4 - (21 * YC_HH1))),YC_VV0,0);
YC_C22:=IF(BETWEEN(CLOSE,(YC_4 - (19 * YC_HH1)),(YC_4 - (22 * YC_HH1))),YC_VV0,0);
YC_C23:=IF(BETWEEN(CLOSE,(YC_4 - (20 * YC_HH1)),(YC_4 - (23 * YC_HH1))),YC_VV0,0);
YC_Y1:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C1,YC_NN0),0),2));
YC_Y2:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C2,YC_NN0),0),2));
YC_Y3:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C3,YC_NN0),0),2));
YC_Y4:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C4,YC_NN0),0),2));
YC_Y5:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C5,YC_NN0),0),2));
YC_Y6:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C6,YC_NN0),0),2));
YC_Y7:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C7,YC_NN0),0),2));
YC_Y8:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C8,YC_NN0),0),2));
YC_Y9:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C9,YC_NN0),0),2));
YC_Y10:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C10,YC_NN0),0),2));
YC_Y11:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C11,YC_NN0),0),2));
YC_Y12:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C12,YC_NN0),0),2));
YC_Y13:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C13,YC_NN0),0),2));
YC_Y14:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C14,YC_NN0),0),2));
YC_Y15:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C15,YC_NN0),0),2));
YC_Y16:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C16,YC_NN0),0),2));
YC_Y17:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C17,YC_NN0),0),2));
YC_Y18:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C18,YC_NN0),0),2));
YC_Y19:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C19,YC_NN0),0),2));
YC_Y20:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C20,YC_NN0),0),2));
YC_Y21:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C21,YC_NN0),0),2));
YC_Y22:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C22,YC_NN0),0),2));
YC_Y23:=STRTONUM(NUMTOSTR(IF(ISLASTBAR,SUM(YC_C23,YC_NN0),0),2));
YC_AY0:=MAX(YC_Y1,MAX(YC_Y2,MAX(YC_Y3,MAX(YC_Y4,MAX(YC_Y5,MAX(YC_Y6,MAX(YC_Y7,MAX(YC_Y8,MAX(YC_Y9,MAX(YC_Y10,MAX(YC_Y11,MAX(YC_Y12,MAX(YC_Y13,MAX(YC_Y13,MAX(YC_Y14,MAX(YC_Y15,MAX(YC_Y16,MAX(YC_Y17,MAX(YC_Y18,MAX(YC_Y19,MAX(YC_Y20,MAX(YC_Y21,YC_Y22))))))))))))))))))))));
YC_X1:=(((YC_Y1 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X3:=(((YC_Y3 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X5:=(((YC_Y5 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X7:=(((YC_Y7 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X9:=(((YC_Y9 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X11:=(((YC_Y11 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X13:=(((YC_Y13 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X15:=(((YC_Y15 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X17:=(((YC_Y17 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X19:=(((YC_Y19 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X21:=(((YC_Y21 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
YC_X23:=(((YC_Y23 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0));
FILLRGN((((YC_Y1 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (0 * YC_HH1)),((YC_4 - (1 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y2 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (1 * YC_HH1)),((YC_4 - (2 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y3 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (2 * YC_HH1)),((YC_4 - (3 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y4 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (3 * YC_HH1)),((YC_4 - (4 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y5 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (4 * YC_HH1)),((YC_4 - (5 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y6 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (5 * YC_HH1)),((YC_4 - (6 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y7 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (6 * YC_HH1)),((YC_4 - (7 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y8 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (7 * YC_HH1)),((YC_4 - (8 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y9 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (8 * YC_HH1)),((YC_4 - (9 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y10 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (9 * YC_HH1)),((YC_4 - (10 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y11 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (10 * YC_HH1)),((YC_4 - (11 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y12 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (11 * YC_HH1)),((YC_4 - (12 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y13 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (12 * YC_HH1)),((YC_4 - (13 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y14 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (13 * YC_HH1)),((YC_4 - (14 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y15 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (14 * YC_HH1)),((YC_4 - (15 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y16 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (15 * YC_HH1)),((YC_4 - (16 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y17 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (16 * YC_HH1)),((YC_4 - (17 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y18 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (17 * YC_HH1)),((YC_4 - (18 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y19 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (18 * YC_HH1)),((YC_4 - (19 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y20 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (19 * YC_HH1)),((YC_4 - (20 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y21 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (20 * YC_HH1)),((YC_4 - (21 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y22 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (21 * YC_HH1)),((YC_4 - (22 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
FILLRGN((((YC_Y23 / YC_AY0) >= (YC_NN / YC_NN0)) AND (YC_NN >= 0)),(YC_4 - (22 * YC_HH1)),((YC_4 - (23 * YC_HH1)) + (YC_HH1 * 0.1))),colorFF9900;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,8,0),colorBC;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,5,0),colorFF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,3,0),color90FF;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,1,0),colorFFFF;
STICKLINE((CLOSE >= OPEN),HIGH,CLOSE,0.8,0),colorFFFF;
STICKLINE((CLOSE >= OPEN),OPEN,LOW,0.8,0),colorFFFF;
STICKLINE((CLOSE <= OPEN),CLOSE,OPEN,8,0),colorFF0000;
STICKLINE((CLOSE <= OPEN),CLOSE,OPEN,5,0),colorFF00A6;
STICKLINE((CLOSE <= OPEN),CLOSE,OPEN,3,0),colorFF00FF;
STICKLINE((CLOSE <= OPEN),CLOSE,OPEN,1,0),colorFFFFFF;
STICKLINE((CLOSE <= OPEN),HIGH,OPEN,0.8,0),colorFFFFFF;
STICKLINE((CLOSE <= OPEN),CLOSE,LOW,0.8,0),colorFFFFFF;
SSL:=CLOSE;
上限:=YC_4;
间距:=YC_HH1;
DRAWNUMBER(FILTER((REFX((YC_X1 < REF(YC_X1,1)),6) AND (YC_Y1 > 0)),10),(YC_4 - ((0.6 * 1) * YC_HH2)),(YC_4 - (0 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X3 < REF(YC_X3,1)),6) AND (YC_Y3 > 0)),10),(YC_4 - ((2.8 * 3) * YC_HH2)),(YC_4 - (2 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X5 < REF(YC_X5,1)),6) AND (YC_Y5 > 0)),10),(YC_4 - ((3.3 * 5) * YC_HH2)),(YC_4 - (4 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X7 < REF(YC_X7,1)),6) AND (YC_Y7 > 0)),10),(YC_4 - ((3.5 * 7) * YC_HH2)),(YC_4 - (6 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X9 < REF(YC_X9,1)),6) AND (YC_Y9 > 0)),10),(YC_4 - ((3.62 * 9) * YC_HH2)),(YC_4 - (8 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X11 < REF(YC_X11,1)),6) AND (YC_Y11 > 0)),10),(YC_4 - ((3.7 * 11) * YC_HH2)),(YC_4 - (10 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X13 < REF(YC_X13,1)),6) AND (YC_Y13 > 0)),10),(YC_4 - ((3.72 * 13) * YC_HH2)),(YC_4 - (12 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X15 < REF(YC_X15,1)),6) AND (YC_Y15 > 0)),10),(YC_4 - ((3.76 * 15) * YC_HH2)),(YC_4 - (14 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X17 < REF(YC_X17,1)),6) AND (YC_Y17 > 0)),10),(YC_4 - ((3.8 * 17) * YC_HH2)),(YC_4 - (16 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X19 < REF(YC_X19,1)),6) AND (YC_Y19 > 0)),10),(YC_4 - ((3.82 * 19) * YC_HH2)),(YC_4 - (18 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X21 < REF(YC_X21,1)),6) AND (YC_Y21 > 0)),10),(YC_4 - ((3.84 * 21) * YC_HH2)),(YC_4 - (20 * YC_HH1)),2),colorFFFF00;
DRAWNUMBER(FILTER((REFX((YC_X23 < REF(YC_X23,1)),6) AND (YC_Y23 > 0)),10),(YC_4 - ((3.86 * 23) * YC_HH2)),(YC_4 - (22 * YC_HH1)),2),colorFFFF00;
CHECK1:=CHECKUSER(1);
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,7,0),colorAA;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,6,0),colorBB;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,5,0),colorCC;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,4,0),colorDD;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3,0),colorEE;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2,0),colorFF;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1,0),colorFF;
STICKLINE(CLOSE>=OPEN,HIGH,LOW,0,0),colorFF;
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;
STICKLINE(CLOSE/REF(CLOSE,1)>1.04,(CLOSE+OPEN)/2,CLOSE,7,0),colorAAAA;
STICKLINE(CLOSE/REF(CLOSE,1)>1.04,(CLOSE+OPEN)/2,CLOSE,5,0),colorCCCC;
STICKLINE(CLOSE/REF(CLOSE,1)>1.04,(CLOSE+OPEN)/2,CLOSE,3,0),colorEEEE;
STICKLINE(CLOSE/REF(CLOSE,1)>1.04,(CLOSE+OPEN)/2,CLOSE,1,0),colorFFFF;
DH:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
STICKLINE(DH<=-4,(CLOSE+OPEN)/2,CLOSE,7,0),colorAA0000;
STICKLINE(DH<=-4,(CLOSE+OPEN)/2,CLOSE,5,0),colorCC0000;
STICKLINE(DH<=-4,(CLOSE+OPEN)/2,CLOSE,3,0),colorEE0000;
STICKLINE(DH<=-4,(CLOSE+OPEN)/2,CLOSE,1,0),colorFF0000;
ZG:=REF(HIGH,1);
ZD:=REF(LOW,1);
GG:HHV(ZG,25),colorFFB0FF;
DD:LLV(ZD,25),colorC1F81F;
<%
VH=FFL.VARDATA("GG")
VL=FFL.VARDATA("DD")
VN=FFL.VARDATA("25")
LAST=UBOUND(VH)
IF VN>LAST THEN VN=LAST+1
FOR I=LAST TO LAST-VN+1 STEP-1
VH(I)=VH(LAST)
VL(I)=VL(LAST)
NEXT
FFL.VARDATA("GG")=VH
FFL.VARDATA("DD")=VL
FFL.VARSTARTINDEX("GG")=LAST-VN+1
FFL.VARSTARTINDEX("DD")=LAST-VN+1
%>
DRAWTEXT(BARPOS=SYSPARAM(3),GG,' 【最高价:'+NUMTOSTR(GG,2)+'】'),ALIGN2,PXDN3,colorFFB0FF;
DRAWTEXT(BARPOS=SYSPARAM(3),DD,' 【最低价:'+NUMTOSTR(DD,2)+'】'),ALIGN2,PXDN3,colorFF00;
GGS:=BARSCOUNT(CLOSE);
YY:=BARPOS=SYSPARAM(1);
IF M=1 THEN BEGIN
FZ:=PEAKA(GG,25,1);
GZ:=TROUGHA(DD,25,1);
FZ1:=STRTONUM(NUMTOSTR(GGS-BARSSINCE(FZ),0));
GZ1:=STRTONUM(NUMTOSTR(GGS-BARSSINCE(GZ),0));
WF:=GGS<FZ1;
WFS:=COUNT(WF,0)>0;
WG:=GGS<GZ1;
WGS:=COUNT(WG,0)>0;
高:IF(WF=0 AND WFS=0 OR WF AND WFS,HHV(GG,0),FZ),LINETHICK0;
低:IF(WG=0 AND WGS=0 OR WG AND WGS,LLV(DD,0),GZ),LINETHICK0;
FX:=IF(WF=0 AND WFS=0 OR WF AND WFS,BARSCOUNT(GG)-1,PEAKBARSA(GG,25,1));
GX:=IF(WG=0 AND WGS=0 OR WG AND WGS,1,TROUGHBARSA(DD,25,1));
DRAWSL(FX>0 AND YY,REF(高,FX),0,MAX(FX,GX),1),colorFF00FF;
DRAWSL(FX>0 AND YY,REF(低,GX),0,MAX(GX,FX),1),colorFF00;
G1:(高-低)*0.03+高,LINETHICK0,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G1,'﹉'),ALIGN0,PXDN2,colorFF00;
DRAWNUMBER(YY,G1,G1,2),ALIGN0,SHIFT2,colorFF00FF;
G2:(高-低)*0.08+高,LINETHICK0,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G2,'﹉'),ALIGN0,PXDN2,colorFF00;
DRAWNUMBER(YY,G2,G2,2),ALIGN0,SHIFT2,colorFF00FF;
G3:(高-低)*0.125+高,LINETHICK0,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G3,'﹉'),ALIGN0,PXDN2,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G3,'112.5% '+NUMTOSTR(G3,2)),ALIGN0,PXDN2,colorFF00;
G4:(高-低)*0.236+高,LINETHICK0,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G4,'﹉'),ALIGN0,PXDN2,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G4,'123.6% '+NUMTOSTR(G4,2)),ALIGN0,PXDN2,colorFF00;
G5:(高-低)*0.333+高,LINETHICK0,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G5,'﹉'),ALIGN0,PXDN2,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G5,'133.3% '+NUMTOSTR(G5,2)),ALIGN0,PXDN2,colorFF00;
G6:(高-低)*0.28+高,LINETHICK0,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G6,'﹉'),ALIGN0,PXDN2,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G6,'128% '+NUMTOSTR(G6,2)),ALIGN0,PXDN2,colorFF00;
G7:(高-低)*0.191+高,LINETHICK0,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G7,'﹉'),ALIGN0,PXDN2,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G7,'119.1% '+NUMTOSTR(G7,2)),ALIGN0,PXDN2,colorFF00;
G8:(高-低)*0.382+高,LINETHICK0,colorFF00FF;
DRAWSL(FX>0 AND YY,REF(G8,GX),0,MAX(GX,FX),1),POINTDOT,colorFF00FF;
DRAWTEXT(FX>0 AND YY,G8,'138.2% '+NUMTOSTR(G8,2)),ALIGN0,PXDN2,colorFF00;
F1:(高-低)*0.236+低,LINETHICK0,colorFF00FF;
DRAWSL(FX>0 AND YY,REF(F1,GX),0,MAX(GX,FX),1),POINTDOT,colorFF00FF;
DRAWNUMBER(YY,F1,F1,2),ALIGN0,SHIFT2,colorFF00FF;
F2:(高-低)*0.382+低,LINETHICK0,colorFFFF;
DRAWSL(FX>0 AND YY,REF(F2,GX),0,MAX(GX,FX),1),POINTDOT,colorFFFF;
DRAWNUMBER(YY,F2,F2,2),ALIGN0,SHIFT2,colorFFFF;
F3:(高-低)*0.5+低,LINETHICK0,colorFFFFFF;
DRAWSL(FX>0 AND YY,REF(F3,GX),0,MAX(GX,FX),1),POINTDOT,colorFFFFFF;
DRAWNUMBER(YY,F3,F3,2),ALIGN0,SHIFT2,colorFFFFFF;
F4:(高-低)*0.618+低,LINETHICK0,colorFFFF;
DRAWSL(FX>0 AND YY,REF(F4,GX),0,MAX(GX,FX),1),POINTDOT,colorFFFF;
DRAWNUMBER(YY,F4,F4,2),ALIGN0,SHIFT2,colorFFFF;
F5:(高-低)*0.764+低,LINETHICK0,colorFF00FF;
DRAWSL(FX>0 AND YY,REF(F5,GX),0,MAX(GX,FX),1),POINTDOT,colorFF00FF;
DRAWNUMBER(YY,F5,F5,2),ALIGN0,SHIFT2,colorFF00FF;
F6:(高-低)*0.55+低,LINETHICK0,colorFFFFFF;
DRAWTEXT(FX>0 AND YY,F6,'﹉'),ALIGN0,PXDN2,colorFF00;
DRAWNUMBER(YY,F6,F6,2),ALIGN0,SHIFT2,colorFFFFFF;
F7:(高-低)*0.45+低,LINETHICK0,colorFFFFFF;
DRAWTEXT(FX>0 AND YY,F7,'﹉'),ALIGN0,PXDN2,colorFF00;
DRAWNUMBER(YY,F7,F7,2),ALIGN0,SHIFT2,colorFFFFFF;
F8:(高-低)*0.875+低,LINETHICK0,colorFFFFFF;
DRAWTEXT(FX>0 AND YY,F8,'*'),ALIGN0,PXUP10,colorFF00;
DRAWNUMBER(YY,F8,F8,2),ALIGN0,SHIFT2,colorFF00;
F9:(高-低)*0.125+低,LINETHICK0,colorFFFFFF;
DRAWTEXT(FX>0 AND YY,F9,'*'),ALIGN0,PXUP10,colorFF00;
DRAWNUMBER(YY,F9,F9,2),ALIGN0,SHIFT2,colorFF00;
F10:(高-低)*0.667+低,LINETHICK0,colorFFFFFF;
DRAWTEXT(FX>0 AND YY,F10,'*'),ALIGN0,PXUP10,colorFF00;
DRAWNUMBER(YY,F10,F10,2),ALIGN0,SHIFT2,colorFF00;
F11:(高-低)*0.333+低,LINETHICK0,colorFFFFFF;
DRAWTEXT(FX>0 AND YY,F11,'*'),ALIGN0,PXUP10,colorFF00;
DRAWNUMBER(YY,F11,F11,2),ALIGN0,SHIFT2,colorFF00;
END;
指导线:EMA((EMA(CLOSE,4)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2),LINEDOT,LINETHICK0,colorFFFF;
界:MA(CLOSE,21),LINETHICK0,colorFEBAF5;
上限:界+3*STD(CLOSE,20),LINETHICK0,colorFFFF;
卖:界+2*STD(CLOSE,20),LINETHICK0,colorFF00FF;
买:界-2*STD(CLOSE,20),LINETHICK0,colorF0FF00;
下限:界-2.9*STD(CLOSE,20),LINETHICK0,colorFF00;
DRAWICON(HIGH>=上限,HIGH,10),ALIGN0,PXUP15;
DRAWICON(CROSS(HIGH,上限),HIGH,12),ALIGN0;
DRAWTEXT(CROSS(HIGH,上限),HIGH,' ̄'),ALIGN0,colorFFFF;
DRAWICON(CROSS(上限,HIGH),HIGH,9),ALIGN0;
DRAWTEXT(CROSS(上限,HIGH),HIGH,' ̄'),ALIGN0,colorFFFF;
DRAWICON(CROSS(HIGH,卖),HIGH,7),ALIGN0;
DRAWTEXT(CROSS(HIGH,卖),HIGH,' ̄'),ALIGN0,colorFF00FF;
DRAWTEXT(CROSS(CLOSE,卖),HIGH,' ̄'),ALIGN0,colorFF0000;
DRAWICON(CROSS(CLOSE,卖),HIGH,5),ALIGN0;
DRAWTEXT(CROSS(下限,LOW),LOW,'限'),ALIGN0,colorFF00;
DRAWTEXT(CROSS(下限,LOW),LOW,' ̄'),ALIGN0,colorFF00;
DRAWTEXT(CROSS(买,LOW),LOW,'△'),ALIGN0,colorFFFF00;
DRAWTEXT(CROSS(买,LOW),LOW,' ̄'),ALIGN0,colorFFFF00;
DRAWTEXT(CROSS(买,CLOSE),LOW,'▲'),ALIGN0,colorFFFF00;
DRAWTEXT(CROSS(买,CLOSE),LOW,' ̄'),ALIGN0,colorFFFF00;
n:=45;
FH:=HIGH;
FL:=LOW;
SELL:=0*FH;
BUY:=SELL;
SIGNAL:=SELL;
BOXH:SELL,LINETHICK0;
BOXL:SELL,LINETHICK0;
VARIABLE:HC=0,LC=0,BT=FH[1],BB=FH[1];
FOR I=1 TO DATACOUNT DO BEGIN
IF HC>1 THEN BEGIN
IF LC>2 AND BT<=FH[I] THEN BEGIN
BUY[I]:=1;
FOR J=I-1 DOWNTO I-HC DO BEGIN
BOXH[J]:=FH[I-HC],LINETHICK0;
BOXL[J]:=FL[I-LC],LINETHICK0;
END;
HC:=0;
LC:=0;
END;
IF BT>FH[I] THEN BEGIN
IF LC>2 THEN BEGIN
IF BB>=FL[I] THEN BEGIN
SELL[I]:=1;
FOR J=I-1 DOWNTO I-HC DO BEGIN
BOXH[J]:=FH[I-HC],LINETHICK0;
BOXL[J]:=FL[I-LC],LINETHICK0;
END;
HC:=-1;
LC:=0;
END;ELSE BEGIN
BOXH[I]:=FH[I-HC],LINETHICK0;
BOXL[I]:=FL[I-LC],LINETHICK0;
END;
END;
HC:=HC+1;
IF LC>1 THEN BEGIN
IF BB<FL[I] THEN BEGIN
LC:=LC+1;
IF LC=3 THEN BEGIN
SIGNAL[I-HC+1]:=1;
FOR J=I DOWNTO I-HC+1 DO BEGIN
BOXH[J]:=FH[I-HC+1],LINETHICK0;
BOXL[J]:=FL[I-LC+1],LINETHICK0;
END;
END;
END;ELSE
LC:=0;
END;ELSE
IF LC=1 THEN BEGIN
IF BB<FL[I] THEN BEGIN
LC:=LC+1;
END;ELSE
LC:=0;
END;
IF LC=0 AND HC>1 THEN BEGIN
BB:=FL[I];
LC:=LC+1;
END;
END;ELSE BEGIN
HC:=0;
LC:=0;
END;
END;ELSE
IF HC=1 THEN BEGIN
IF BT>FH[I] THEN
HC:=HC+1;ELSE BEGIN
HC:=0;
LC:=0;
END;
END;
IF HC=0 THEN BEGIN
BT:=FH[I];
HC:=HC+1;
END;
END;
PARTLINE(BOXH AND BOXH=REF(BOXH,1),BOXH),POINTDOT,colorFFFF;
PARTLINE(BOXL AND BOXL=REF(BOXL,1),BOXL),POINTDOT,colorFFFF;
PARTLINE(BOXL AND BOXL=REF(BOXL,1),(BOXL+BOXH)/2),POINTDOT,colorFFFF;
STICKLINE((SIGNAL OR REFX(BUY OR SELL,1)) AND BOXH,BOXH,BOXL,0.1,0),POINTDOT,colorFFFF;
DRAWICON(BUY,LOW*0.98,4);
DRAWICON(SELL,HIGH*1.02,5);
BOXHL:=(BOXL+BOXH)/2;
HAC:=CLOSE;
VARIABLE:HA=1;
FOR I=2 TO DATACOUNT DO BEGIN
IF BOXH[I-1]=0 AND BOXH[I]>0 AND (BOXH[I]<>BOXH[I-1] OR BOXL[I]<>BOXL[I-1]) THEN
HAC[I]:=0;
IF BOXH[I-1]>0 AND BOXH[I]>0 AND (BOXH[I]<>BOXH[I-1] OR BOXL[I]<>BOXL[I-1]) THEN
HAC[I]:=0;
IF BOXH[I-1]>0 AND BOXH[I]>0 AND BOXH[I]=BOXH[I-1] AND BOXL[I]<>BOXL[I-1] THEN
HAC[I]:=0;
IF BOXH[I-1]>0 AND BOXH[I]>0 AND BOXH[I]=BOXH[I-1] AND BOXL[I]=BOXL[I-1] THEN
HAC[I]:=HA;
IF BOXH[I-1]>0 AND BOXH[I]>0 AND BOXH[I]=BOXH[I-1] AND BOXL[I]<>BOXL[I-1] THEN
HAC[I]:=HA;
IF BOXH[I-1]>0 AND BOXH[I]>0 AND BOXH[I]=BOXH[I-1] AND BOXH[I-2]=BOXH[I-1] THEN
HAC[I]:=HAC[I-1]+HA;
IF BOXH[I-1]>0 AND BOXH[I]=0 THEN
HAC[I]:=0;
IF BOXH[I-1]=0 AND BOXH[I]=0 THEN
HAC[I]:=0;
END;
NV:=HAC;
KK:=HAC[1];
LL:=HAC[1];
LLT:=HAC[1];
MM:=HAC[1];
MMT:=HAC[1];
FOR I=2 TO DATACOUNT DO BEGIN
IF HAC[I-1]=0 AND HAC[I]>0 THEN
KK:=I-1;
IF HAC[I-1]>0 AND HAC[I]>0 THEN
LLT:=I-1;
IF HAC[I-1]>0 AND HAC[I]>0 THEN
FOR J=KK TO LLT DO BEGIN
NV[J]:=HAC[I]+1;
END;
IF HAC[I-1]>0 AND HAC[I]=0 THEN
LL:=I-1;
IF HAC[I-1]>0 AND HAC[I]=0 THEN
FOR J=KK TO LL DO BEGIN
NV[J]:=HAC[I-1]+1;
END;
END;
XX:=NV;
BB25:=(BOXH-BOXL)/(NV-1)*IF(ISLASTBAR,HAC-1,HAC)*(TAN(-26.5659*3.14159/180))+BOXH;
PARTLINE(REF(BB25,1)<>0 AND BOXH=REF(BOXH,1) AND BB25>0 AND BB25>BOXL-BOXL*0.05,BB25),POINTDOT,LINETHICK1,colorFF00FF;
DRAWLINE(BB25>0 AND BB25=BOXH AND BARSCOUNT(CLOSE)>DATACOUNT-45,BB25,BB25>0 AND
BB25-BOXHL<1 AND BARSCOUNT(CLOSE)>DATACOUNT-45,BB25,1),colorFF00FF;
BB45:=(BOXH-BOXL)/(NV-1)*IF(ISLASTBAR,HAC-1,HAC)*(TAN(-45*3.14159/180))+BOXH;
PARTLINE(REF(BB45,1)<>0 AND BOXH=REF(BOXH,1) AND BB45>0 AND BB45>BOXL-BOXL*0.05,BB45),LINETHICK1,colorFF00FF;
DRAWLINE(BB45>0 AND BB45=BOXH AND BARSCOUNT(CLOSE)>DATACOUNT-45,BB45,BB45>0 AND
BB45=BOXL AND BARSCOUNT(CLOSE)>DATACOUNT-45,BB45,1),colorFF00FF;
BB66:=(BOXH-BOXL)/(NV-1)*IF(ISLASTBAR,HAC-1,HAC)*(TAN(-63.435*3.14159/180))+BOXH;
PARTLINE(REF(BB66,1)<>0 AND BOXH=REF(BOXH,1) AND BB66>0 AND BB66>BOXL-BOXL*0.025,BB66),POINTDOT,LINETHICK1,colorFF00FF;
XBB23:=(BOXH-BOXL)/(NV-1)*IF(ISLASTBAR,HAC-1,HAC)*(TAN(26.5659*3.14159/180))+BOXL;
PARTLINE(XBB23>0 AND XBB23>BOXL AND XBB23<BOXH+BOXH*0.05,XBB23),POINTDOT,LINETHICK1,colorFF00;
DRAWLINE(XBB23>0 AND XBB23=BOXL AND BARSCOUNT(CLOSE)>DATACOUNT-45,XBB23,XBB23>0
AND BOXHL-XBB23<1 AND BARSCOUNT(CLOSE)>DATACOUNT-45,XBB23,1),colorFF00;
XBB45:=(BOXH-BOXL)/(NV-1)*IF(ISLASTBAR,HAC-1,HAC)*(TAN(45*3.14159/180))+BOXL;
PARTLINE(XBB45>0 AND XBB45>BOXL AND XBB45<BOXH+BOXH*0.05,XBB45),LINETHICK1,colorFF00;
DRAWLINE(XBB45>0 AND XBB45=BOXL AND BARSCOUNT(CLOSE)>DATACOUNT-45,XBB45,XBB45>0
AND XBB45=BOXH AND BARSCOUNT(CLOSE)>DATACOUNT-45,XBB45,1),colorFF00;
XBB66:=(BOXH-BOXL)/(NV-1)*IF(ISLASTBAR,HAC-1,HAC)*(TAN(63.435*3.14159/180))+BOXL;
PARTLINE(XBB66>0 AND XBB66>BOXL AND XBB66<BOXH+BOXH*0.025,XBB66),POINTDOT,LINETHICK1,colorFF00;