HB:=COST(99.9);
LB:=COST(0.1);
B3:=(HB-LB)/50;
B31:=HB-B3;
B32:=HB-2*B3;
B33:=HB-3*B3;
B34:=HB-4*B3;
B35:=HB-5*B3;
B36:=HB-6*B3;
B37:=HB-7*B3;
B38:=HB-8*B3;
B39:=HB-9*B3;
B310:=HB-10*B3;
B311:=HB-11*B3;
B312:=HB-12*B3;
B313:=HB-13*B3;
B314:=HB-14*B3;
B315:=HB-15*B3;
B316:=HB-16*B3;
B317:=HB-17*B3;
B318:=HB-18*B3;
B319:=HB-19*B3;
B320:=HB-20*B3;
B321:=HB-21*B3;
B322:=HB-22*B3;
B323:=HB-23*B3;
B324:=HB-24*B3;
B325:=HB-25*B3;
B326:=HB-26*B3;
B327:=HB-27*B3;
B328:=HB-28*B3;
B329:=HB-29*B3;
B330:=HB-30*B3;
B331:=HB-31*B3;
B332:=HB-32*B3;
B333:=HB-33*B3;
B334:=HB-34*B3;
B335:=HB-35*B3;
B336:=HB-36*B3;
B337:=HB-37*B3;
B338:=HB-38*B3;
B339:=HB-39*B3;
B340:=HB-40*B3;
B341:=HB-41*B3;
B342:=HB-42*B3;
B343:=HB-43*B3;
B344:=HB-44*B3;
B345:=HB-45*B3;
B346:=HB-46*B3;
B347:=HB-47*B3;
B348:=HB-48*B3;
B349:=HB-49*B3;
A1:=WINNER(HB)*100-WINNER(B31)*100;
A2:=WINNER(B31)*100-WINNER(B32)*100;
A3:=WINNER(B32)*100-WINNER(B33)*100;
A4:=WINNER(B33)*100-WINNER(B34)*100;
A5:=WINNER(B34)*100-WINNER(B35)*100;
A6:=WINNER(B35)*100-WINNER(B36)*100;
A7:=WINNER(B36)*100-WINNER(B37)*100;
A8:=WINNER(B37)*100-WINNER(B38)*100;
A9:=WINNER(B38)*100-WINNER(B39)*100;
A10:=WINNER(B39)*100-WINNER(B310)*100;
A11:=WINNER(B310)*100-WINNER(B311)*100;
A12:=WINNER(B311)*100-WINNER(B312)*100;
A13:=WINNER(B312)*100-WINNER(B313)*100;
A14:=WINNER(B313)*100-WINNER(B314)*100;
A15:=WINNER(B314)*100-WINNER(B315)*100;
A16:=WINNER(B315)*100-WINNER(B316)*100;
A17:=WINNER(B316)*100-WINNER(B317)*100;
A18:=WINNER(B317)*100-WINNER(B318)*100;
A19:=WINNER(B318)*100-WINNER(B319)*100;
A20:=WINNER(B319)*100-WINNER(B320)*100;
A21:=WINNER(B320)*100-WINNER(B321)*100;
A22:=WINNER(B321)*100-WINNER(B322)*100;
A23:=WINNER(B322)*100-WINNER(B323)*100;
A24:=WINNER(B323)*100-WINNER(B324)*100;
A25:=WINNER(B324)*100-WINNER(B325)*100;
A26:=WINNER(B325)*100-WINNER(B326)*100;
A27:=WINNER(B326)*100-WINNER(B327)*100;
A28:=WINNER(B327)*100-WINNER(B328)*100;
A29:=WINNER(B328)*100-WINNER(B329)*100;
A30:=WINNER(B329)*100-WINNER(B330)*100;
A31:=WINNER(B330)*100-WINNER(B331)*100;
A32:=WINNER(B331)*100-WINNER(B332)*100;
A33:=WINNER(B332)*100-WINNER(B333)*100;
A34:=WINNER(B333)*100-WINNER(B334)*100;
A35:=WINNER(B334)*100-WINNER(B335)*100;
A36:=WINNER(B335)*100-WINNER(B336)*100;
A37:=WINNER(B336)*100-WINNER(B337)*100;
A38:=WINNER(B337)*100-WINNER(B338)*100;
A39:=WINNER(B338)*100-WINNER(B339)*100;
A40:=WINNER(B339)*100-WINNER(B340)*100;
A41:=WINNER(B340)*100-WINNER(B341)*100;
A42:=WINNER(B341)*100-WINNER(B342)*100;
A43:=WINNER(B342)*100-WINNER(B343)*100;
A44:=WINNER(B343)*100-WINNER(B344)*100;
A45:=WINNER(B344)*100-WINNER(B345)*100;
A46:=WINNER(B345)*100-WINNER(B346)*100;
A47:=WINNER(B346)*100-WINNER(B347)*100;
A48:=WINNER(B347)*100-WINNER(B348)*100;
A49:=WINNER(B348)*100-WINNER(B349)*100;
A50:=WINNER(B349)*100-WINNER(LB)*100;
ZX2:=MIN(A1,MIN(A2,MIN(A3,MIN(A4,MIN(A5,MIN(A6,MIN(A7,MIN(A8,MIN(A9,MIN(A10,MIN(A11,MIN(A12,MIN(A13,MIN(A14,MIN(A15,MIN(A16,MIN(A17,MIN(A18,MIN(A19,MIN(A20,MIN(A21,MIN(A22,MIN(A23,MIN(A24,MIN(A25,MIN(A26,MIN(A27,MIN(A28,MIN(A29,MIN(A30,MIN(A31,MIN(A32,MIN(A33,MIN(A34,MIN(A35,MIN(A36,MIN(A37,MIN(A38,MIN(A39,MIN(A40,MIN(A41,MIN(A42,MIN(A43,MIN(A44,MIN(A45,MIN(A46,MIN(A47,MIN(A48,MIN(A49,A50)))))))))))))))))))))))))))))))))))))))))))))))));
筹码最低处:=COST(ZX2),COLORMAGENTA;
ZX1:=MAX(A1*15,MAX(A2*15,MAX(A3*15,MAX(A4*15,MAX(A5*15,MAX(A6*15,MAX(A7*15,MAX(A8*15,MAX(A9*15,MAX(A10*15,MAX(A11*15,MAX(A12*15,MAX(A13*15,MAX(A14*15,MAX(A15*15,MAX(A16*15,MAX(A17*15,MAX(A18*15,MAX(A19*15,MAX(A20*15,MAX(A21*15,MAX(A22*15,MAX(A23*15,MAX(A24*15,MAX(A25*15,MAX(A26*15,MAX(A27*15,MAX(A28*15,MAX(A29*15,MAX(A30*15,MAX(A31*15,MAX(A32*15,MAX(A33*15,MAX(A34*15,MAX(A35*15,MAX(A36*15,MAX(A37*15,MAX(A38*15,MAX(A39*15,MAX(A40*15,MAX(A41*15,MAX(A42*15,MAX(A43*15,MAX(A44*15,MAX(A45*15,MAX(A46*15,MAX(A47*15,MAX(A48*15,MAX(A49*15,A50*15)))))))))))))))))))))))))))))))))))))))))))))))));
筹码最集中处:=COST(ZX1/15),COLORRED,LINETHICK2;
短线收盘:=(C-筹码最低处)/(筹码最集中处-筹码最低处)*100000,LINETHICK2,COLORRED;
短线开盘:=(O-筹码最低处)/(筹码最集中处-筹码最低处)*100000,LINETHICK2,COLORRED;
短线高盘:=(H-筹码最低处)/(筹码最集中处-筹码最低处)*100000,LINETHICK2,COLORRED;
短线低盘:=(L-筹码最低处)/(筹码最集中处-筹码最低处)*100000,LINETHICK0,COLORRED;
bsB:=EMA((CLOSE+HIGH+LOW)/3,3);
BSM:=EMA(SLOPE((CLOSE+HIGH+LOW)/3,24)*20+(CLOSE+HIGH+LOW)/3,48),POINTDOT,COLORYELLOW;
STICKLINE(BSB>=BSM,短线低盘,短线高盘,0.0,0),COLORRED;
STICKLINE(BSB>=BSM,短线收盘,短线开盘,3,1),COLORRED;
STICKLINE(BSB<=BSM,短线低盘,短线高盘,0.0,0),COLORGREEN;
STICKLINE(BSB<=BSM,短线收盘,短线开盘,3,1),COLORGREEN;
做空:500000,COLORWHITE,LINETHICK1;
做多:300000,COLORWHITE,LINETHICK1;
空损:100000,COLORMAGENTA,LINETHICK2;
多损:0,COLORMAGENTA,LINETHICK2;
DRAWTEXT(ISLASTBAR,500000,'顶'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,300000,'卖'),COLORGREEN;
DRAWTEXT(ISLASTBAR,100000,'买'),COLORRED;
DRAWTEXT(ISLASTBAR,0,'底'),COLORMAGENTA;
多头定位:=筹码最集中处>LOW AND 筹码最集中处<HIGH,筹码最集中处,COLORGREEN;
BN:=5;
BVAR1:=4*SMA((CLOSE-LLV(LOW,BN))/(HHV(HIGH,BN)-LLV(LOW,BN))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,BN))/(HHV(HIGH,BN)-LLV(LOW,BN))*100,5,1),3.2,1);
BVAR2:=8,COLORGREEN,LINETHICK0;
杀庄:=BVAR1<=8;
PDTC:=((2)*(CLOSE) + HIGH + LOW + OPEN)/(5);
cciDTC:=((PDTC - MA(PDTC,14))*(100))/((1.5)*(AVEDEV(PDTC,14)));
rsi1DTC:=((SMA(MAX(CLOSE - REF(CLOSE,1),0),6,1))/(SMA(ABS(CLOSE - REF(CLOSE,1)),6,1)))*(100);
黄底:=(CCIDTC < (-100));
蓝底:=(RSI1DTC < 25);
VAR1MMQZ:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;
红底:=VAR1MMQZ<-9 AND VAR1MMQZ> REF(VAR1MMQZ,1);
底:=黄底 OR 蓝底 OR 红底;
抄底:=200000000000*MAX (杀庄,底)*DMA(EMA(C,60),SUM(V,60)/CAPITAL)/EXP(2*HIGH-LOW/3),COLORRED,LINETHICK2;
买点:=REF(抄底,1)>抄底 AND 抄底=0;
VARAA:=AMOUNT/(100*vol);
cyc13:=MA(VARAA,13);
CYC34:=MA(VARAA,34);
CYCMAX:=DMA(C,VOL/CAPITAL);
CYS13:=(C-CYC13)/CYC13*100;
cys34:=(C-CYC34)/CYC34*100;
CYSMAX:=(C-CYCMAX)/CYCMAX*100;
YY:筹码最集中处/REF(筹码最集中处,2),NODRAW;
UU:=YY<1.02 AND YY>0.98;
DRAWTEXT(买点 AND L<筹码最集中处 ,短线低盘,'↖买底'),COLORMAGENTA;