1、筹码压力拉升 {筹码压力拉升} 天顶线:DMA(COST(99.999),WINNER(COST(99.999))),COLORRED; 压力线:DMA(COST(95),WINNER(COST(99.999))),COLOR00BB00; 拉升线:DMA(COST(75),WINNER(COST(99.999))),COLOR6600FF; 平均成本:DMA(COST(50),WINNER(COST(99.999))),COLORYELLOW; 三分线:DMA(COST(33),WINNER(COST(99.999))),COLORMAGENTA; 建仓线:DMA(COST(20),WINNER(COST(99.999))),COLORGREEN; 底仓线:DMA(COST(10),WINNER(COST(99.999))),COLORWHITE; 无利线:DMA(COST(0.001),WINNER(COST(99.999))),COLORGREEN; HB:=COST(99.999); LB:=COST(0.001); 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; STICKLINE(ISLASTBAR,HB,HB*50 ,A1*DATE,0),COLORMAGENTA; STICKLINE(ISLASTBAR,B31 ,B31 ,A1*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B32 ,B32 ,A2*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B33 ,B33 ,A3*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B34 ,B34 ,A4*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B35 ,B35 ,A5*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B36 ,B36 ,A6*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B37 ,B37 ,A7*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B38 ,B38 ,A8*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B39 ,B39 ,A9*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B310 ,B310 ,A10*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B311 ,B311 ,A11*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B312 ,B312 ,A12*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B313 ,B313 ,A13*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B314 ,B314 ,A14*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B315 ,B315 ,A15*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B316 ,B316 ,A16*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B317 ,B317 ,A17*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B318 ,B318 ,A18*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B319 ,B319 ,A19*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B320 ,B320 ,A20*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B321 ,B321 ,A21*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B322 ,B322 ,A22*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B323 ,B323 ,A23*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B324 ,B324 ,A24*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B325 ,B325 ,A25*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B326 ,B326 ,A26*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B327 ,B327 ,A27*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B328 ,B328 ,A28*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B329 ,B329 ,A29*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B330 ,B330 ,A30*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B331 ,B331 ,A31*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B332 ,B332 ,A32*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B333 ,B333 ,A33*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B334 ,B334 ,A34*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B335 ,B335 ,A35*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B336 ,B336 ,A36*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B337 ,B337 ,A37*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B338 ,B338 ,A38*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B339 ,B339 ,A39*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B340 ,B340 ,A40*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B341 ,B341 ,A41*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B342 ,B342 ,A42*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B343 ,B343 ,A43*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B344 ,B344 ,A44*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B345 ,B345 ,A45*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B346 ,B346 ,A46*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B347 ,B347 ,A47*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B348 ,B348 ,A48*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,B349 ,B349 ,A49*50 ,0 ),COLORYELLOW; STICKLINE(ISLASTBAR,LB ,LB ,A50*DATE ,0 ),COLORGREEN; STICKLINE(C>=O,C,O,3,0),COLORMAGENTA; STICKLINE(C>=O,H,L,0,0),COLORMAGENTA; STICKLINE(C<=O,C,O,3,0),COLORLIGREEN; STICKLINE(C<=O,H,L,0,0),COLORLIGREEN; 2、相对空间位置 天顶线:CONST(COST(99.999)),LINETHICK3; 中轴线:CONST(COST(50)),LINETHICK3; 地底线:CONST(COST(0.001)),LINETHICK3; HHHH:=H=CONST(HHV(H,0)); LLLL:=L=CONST(LLV(L,0)); PP:=BARSLAST(HHHH)+1; TT:=BARSLAST(LLLL)+1; STICKLINE((PP=1),HHV(H,0),LLV(L,0),3,0),COLORBROWN; STICKLINE((TT=1),HHV(H,0),LLV(L,0),3,0),COLORGRAY; 获利盘001%:=REFDATE(CONST(COST(0.001)),DATE),LINETHICK6,COLORYELLOW; 获利盘01%:=REFDATE(CONST(COST(0.01)),DATE),LINETHICK6,COLORYELLOW; DRAWBAND(获利盘001%,RGB(250,150,250),获利盘01%,RGB(250,150,250)); 获利盘49%:=REFDATE(CONST(COST(49)),DATE),LINETHICK6,COLORYELLOW; 获利盘51%:=REFDATE(CONST(COST(51)),DATE),LINETHICK6,COLORYELLOW; DRAWBAND(获利盘49%,RGB(250,150,250),获利盘51%,RGB(250,150,250)); 获利盘99.9%:=REFDATE(CONST(COST(99.9)),DATE),LINETHICK6,COLORYELLOW; 获利盘99.99%:=REFDATE(CONST(COST(99.999)),DATE),LINETHICK6,COLORYELLOW; DRAWBAND(获利盘99.9%,RGB(250,150,250),获利盘99.99%,RGB(250,150,250)); 高点:=REFDATE(CONST(REF(HHV(H,0),0)),DATE),DOTLINE; 低点:=REFDATE(CONST(REF(LLV(L,0),0)),DATE),DOTLINE; GD:=CONST(FINDHIGH(H,0,高点*10,1)); DD:=CONST(FINDLOW(L,0,低点*10,1)); GT:=CONST(BARSLAST(GD=H))+1; DT:=CONST(BARSLAST(DD=L))+1; SH:=CONST(IF(GT=1,H,REF(H,GT-1))); SL:=CONST(IF(DT=1,L,REF(L,DT-1))); CC:=IF(DT>GT,DT,GT); CD:=INTPART(CC-(DT+GT)/2); CG:=IF(高点>CD,CD/2,高点); 下跌周期:BARSLAST(GD=H),COLORBROWN,NODRAW; 下跌幅度:IF(CURRBARSCOUNT<=GT,C/SH*100-100,DRAWNULL),NODRAW,COLORRED; 下跌均价:=IF(CURRBARSCOUNT<=GT,SUM(AMOUNT,GT)/SUM(V,GT)/100,DRAWNULL),NODRAW,COLORLIGRAY; 下跌换手:IF(CURRBARSCOUNT<=GT,SUM(HSL.HSL,GT),DRAWNULL),COLORGREEN,NODRAW; 上涨周期:IF(CURRBARSCOUNT<=DT,BARSLAST(DD=L),DRAWNULL),COLORBROWN,NODRAW; 上涨幅度:IF(CURRBARSCOUNT<=DT,C/SL*100-100,DRAWNULL),NODRAW,COLORRED; 上涨均价:=IF(CURRBARSCOUNT<=DT,SUM(AMOUNT,DT)/SUM(V,DT)/100,DRAWNULL),NODRAW,COLORLIGRAY; 上涨换手:IF(CURRBARSCOUNT<=DT,SUM(HSL.HSL,DT),DRAWNULL),COLORMAGENTA,NODRAW; 星期:=VARCAT(VARCAT('(',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五','')))))),')'); 日期:=VARCAT('-',VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VAR2STR(YEAR,0),'年'),VAR2STR(MONTH,0)),'月'),VAR2STR(DAY,0)),'日'),星期)); {幅度尺} STICKLINE(CURRBARSCOUNT=DT,SL*20,SL,0,-1),COLORRED; STICKLINE(CURRBARSCOUNT=GT,SH,SH-SH*0.9,0,-1),COLORGREEN; DRAWTEXT(CURRBARSCOUNT=DT ,(SL+SL*1.2)/2,日期),COLORMAGENTA; DRAWTEXT(CURRBARSCOUNT=GT ,GD*0.97,日期),COLORMAGENTA; {竖线表示统计起点位置} 上限:=CONST(HHV(H,0)); 下限:=CONST(LLV(L,0)); STICKLINE(CURRBARSCOUNT=DT,上限,下限,1,0),COLORMAGENTA; STICKLINE(CURRBARSCOUNT=GT,上限,下限,1,0),COLORLIGRAY; NN:=5; LL:=REF(L,1); HH:=REF(H,1); SQK:=L>HH; XQK:=H<LL; 向上跳空:IF(SQK=1,L-HH,DRAWNULL),COLORMAGENTA,NODRAW; 向下跳空:IF(XQK=1,H-LL,DRAWNULL),COLORBROWN,NODRAW; QK:=IF(L>REF(H,1),L-REF(H,1),IF(H<REF(L,1),REF(L,1)-H,DRAWNULL)); DRAWNUMBER(L>REF(H,1),L,QK); DRAWNUMBER(H<REF(L,1),H,QK); STICKLINE(SQK,L,HH,4*NN,1),COLORMAGENTA; STICKLINE(XQK,H,LL,4*NN,2),COLORBROWN; DRAWTEXT(SQK,L*0.96,' 上跳'),COLORMAGENTA; DRAWTEXT(XQK,H*1.04,' 下跳'),COLORBROWN; {画K线} DRAWKLINE(HIGH,OPEN,LOW,CLOSE); {拉升起点:=REFDATE(CONST(REF(LLV(L,0),0)),DATE)*1.0,DOTLINE;} 拉升起点:=REFDATE(CONST(COST(0.001)),DATE)*1.00,DOTLINE; 拉升10%:=拉升起点*1.1,DOTLINE; 拉升20%:=拉升10%*1.1,DOTLINE; 拉升30%:=拉升20%*1.1,DOTLINE; 拉升40%:=拉升30%*1.1,DOTLINE; 拉升50%:=拉升40%*1.1,DOTLINE; 拉升60%:=拉升50%*1.1,DOTLINE; 拉升70%:=拉升60%*1.1,DOTLINE; 拉升80%:=拉升70%*1.1,DOTLINE; 拉升90%:=拉升80%*1.1,DOTLINE; 拉升100%:=拉升90%*1.1,DOTLINE; 拉升110%:=拉升100%*1.1,DOTLINE; 拉升120%:=拉升110%*1.1,DOTLINE; 拉升130%:=拉升120%*1.1,DOTLINE; 拉升140%:=拉升130%*1.1,DOTLINE; 拉升150%:=拉升140%*1.1,DOTLINE; 拉升160%:=拉升150%*1.1,DOTLINE; 拉升170%:=拉升160%*1.1,DOTLINE; 拉升180%:=拉升170%*1.1,DOTLINE; 拉升190%:=拉升180%*1.1,DOTLINE; 拉升200%:=拉升190%*1.1,DOTLINE; 拉升210%:=拉升200%*1.1,DOTLINE; 拉升220%:=拉升210%*1.1,DOTLINE; 拉升230%:=拉升220%*1.1,DOTLINE; 拉升240%:=拉升230%*1.1,DOTLINE; 拉升250%:=拉升240%*1.1,DOTLINE; 拉升260%:=拉升250%*1.1,DOTLINE; DRAWTEXT(CURRBARSCOUNT=DT,拉升起点,'拉升起点'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升10%,'拉升10%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升20%,'拉升20%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升30%,'拉升30%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升40%,'拉升40%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升50%,'拉升50%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升60%,'拉升60%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升70%,'拉升70%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升80%,'拉升80%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升90%,'拉升90%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升100%,'拉升100%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升110%,'拉升110%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升120%,'拉升120%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升130%,'拉升130%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升140%,'拉升140%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升150%,'拉升150%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升160%,'拉升160%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升170%,'拉升170%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升180%,'拉升180%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升190%,'拉升190%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升200%,'拉升200%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升210%,'拉升210%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升220%,'拉升220%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升230%,'拉升230%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升240%,'拉升240%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=DT,拉升250%,'拉升250%'),COLORYELLOW; {回踩起点:=REFDATE(CONST(REF(HHV(H,0),0)),DATE)*1.0,DOTLINE;} 回踩起点:=REFDATE(CONST(COST(99.999)),DATE)*1.0,DOTLINE; 回踩10%:=回踩起点*0.90,DOTLINE; 回踩20%:=回踩10%*0.90,DOTLINE; 回踩30%:=回踩20%*0.90,DOTLINE; 回踩40%:=回踩30%*0.90,DOTLINE; 回踩50%:=回踩40%*0.90,DOTLINE; 回踩60%:=回踩50%*0.90,DOTLINE; 回踩70%:=回踩60%*0.90,DOTLINE; 回踩80%:=回踩70%*0.90,DOTLINE; 回踩90%:=回踩80%*0.90,DOTLINE; 回踩100%:=回踩90%*0.90,DOTLINE; 回踩110%:=回踩100%*0.90,DOTLINE; 回踩120%:=回踩110%*0.90,DOTLINE; 回踩130%:=回踩120%*0.90,DOTLINE; 回踩140%:=回踩130%*0.90,DOTLINE; 回踩150%:=回踩140%*0.90,DOTLINE; 回踩160%:=回踩150%*0.90,DOTLINE; 回踩170%:=回踩160%*0.90,DOTLINE; 回踩180%:=回踩170%*0.90,DOTLINE; 回踩190%:=回踩180%*0.90,DOTLINE; 回踩200%:=回踩190%*0.90,DOTLINE; 回踩210%:=回踩200%*0.90,DOTLINE; 回踩220%:=回踩210%*0.90,DOTLINE; 回踩230%:=回踩220%*0.90,DOTLINE; 回踩240%:=回踩230%*0.90,DOTLINE; 回踩250%:=回踩240%*0.90,DOTLINE; 回踩260%:=回踩250%*0.90,DOTLINE; DRAWTEXT(CURRBARSCOUNT=GT,回踩起点,'回踩起点'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩10%,'回踩10%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩20%,'回踩20%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩30%,'回踩30%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩40%,'回踩40%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩50%,'回踩50%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩60%,'回踩60%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩70%,'回踩70%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩80%,'回踩80%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩90%,'回踩90%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩100%,'回踩100%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩110%,'回踩110%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩120%,'回踩120%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩130%,'回踩130%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩140%,'回踩140%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩150%,'回踩150%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩160%,'回踩160%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩170%,'回踩170%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩180%,'回踩180%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩190%,'回踩190%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩200%,'回踩200%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩210%,'回踩210%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩220%,'回踩220%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩230%,'回踩230%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩240%,'回踩240%'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=GT,回踩250%,'回踩250%'),COLORYELLOW; DRAWTEXT(YEAR!=REF(YEAR,1),HIGH+0.3,VARCAT(VAR2STR(YEAR,0),' 年 ')),COLORWHITE; STICKLINE(YEAR!=REF(YEAR,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE; DRAWTEXT(MONTH!=REF(MONTH,1),LOW-0.2,VARCAT(VAR2STR(MONTH,0),' 月 ')),COLORWHITE; STICKLINE(MONTH!=REF(MONTH,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE; DRAWTEXT(WEEKOFYEAR!=REF(WEEKOFYEAR,1),LOW,VARCAT(VAR2STR(WEEKOFYEAR,0),' 周 ')),COLORWHITE; STICKLINE(WEEKOFYEAR!=REF(WEEKOFYEAR,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE; DRAWTEXT(DAY!=REF(DAY,1),LOW-0.2,VARCAT(VAR2STR(DAY,0),' 日 ')),COLORWHITE; STICKLINE(DAY!=REF(DAY,1)=1,CONST(HHV(H,0)),CONST(LLV(L,0)),0,-1),COLORWHITE; {画K线} DRAWKLINE(HIGH,OPEN,LOW,CLOSE); 3、MACD面积 MACD面积,可以直观看到MACD红绿柱面积数值以及黄白线数值的MACD优化公式。 无未来函数( 股民学院: http://www.58188.com ) 如图:红箭头处MACD力度明显背驰,但指数新高,上涨动力不足,很直观就可以看出来。 {周期放大开关:1为普通模式,0为放大模式} 周期放大:=1; 数显开关:=1; 倍数:= IF(PERIOD=11,1,{年} IF(PERIOD=10,4,{季} IF(PERIOD=9,6, {多日} IF(PERIOD=8,10,{多分钟} IF(PERIOD=7,12,{月} IF(PERIOD=6,5, {周} IF(PERIOD=5,5, {日} IF(PERIOD=4,4, {60F} IF(PERIOD=3,8, {30F} IF(PERIOD=2,4, {15F} IF(PERIOD=1,6, {5F} IF(PERIOD=0,5, {1F} 1)))))))))))); N1:=IF(周期放大,12,12*倍数); N2:=IF(周期放大,26,26*倍数); N3:=IF(周期放大,9,9*倍数); DIFF:EMA(CLOSE,N1) - EMA(CLOSE,N2),COLORWHITE,NODRAW; DEA:EMA(DIFF,N3),COLORYELLOW,NODRAW; MACD: (DIFF-DEA)*2,COLORSTICK,NODRAW; 红柱面积:IF(MACD>0,SUM(MACD,BARSLAST(MACD<0)),0),NODRAW,COLORRED; 绿柱面积:ABS(IF(MACD<0,SUM(MACD,BARSLAST(MACD>0)),0)),NODRAW,COLORLIGREEN; MACD面积:=IF(MACD>0,红柱面积,绿柱面积),NODRAW,COLORFFFF00; 位置:=MAX(HHV(DIFF,100),ABS(LLV(DIFF,100))); {柱变与交叉临界} 开盘价格:=O,COLORYELLOW,NODRAW; 收盘价格:=C,COLORYELLOW,NODRAW; 最高价格:=H,COLORYELLOW,NODRAW; 最低价格:=L,COLORYELLOW,NODRAW; 振幅:=(H-L)/REF(C,1)*100,COLORYELLOW,NODRAW; 柱变临界:REF((EMA(CLOSE,12)*1134-EMA(CLOSE,26)*910-DEA*702)/224,1),COLORLIMAGENTA,NODRAW; 交叉临界:351/28* (EMA(REF(DIFF,1),9)-11/13*EMA(REF(C,1),12)+25/27*EMA(REF(C,1),26)),COLORLIMAGENTA,NODRAW; 明日柱变临界: (EMA(CLOSE,12)*1134-EMA(CLOSE,26)*910-DEA*702)/224,COLORLIBLUE,NODRAW; 明日交叉临界:351/28*(EMA(DIFF,9)-11/13*EMA(C,12)+25/27*EMA(C,26)),COLORLIBLUE,NODRAW; {MACD重建-避免遮挡} STICKLINE(MACD>0,0,MACD,1,0),COLORRED; STICKLINE(MACD<0,0,MACD,1,0),COLORGREEN; STICKLINE(MACD>0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLORYELLOW; STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORWHITE; NOTEXTDIFF:EMA(CLOSE,N1) - EMA(CLOSE,N2),COLORWHITE; NOTEXTDEA:EMA(DIFF,N3),COLORYELLOW; {数显开关:1为打开,0为关闭} DRAWNUMBER(数显开关=1 AND LONGCROSS(DEA,DIFF,3),位置*0.8,REF(红柱面积,1)),COLORRED; DRAWNUMBER(数显开关=1 AND LONGCROSS(DIFF,DEA,3),0-位置*0.5,REF(绿柱面积,1)),COLORGREEN; NOTEXTLMH: DRAWNUMBER(数显开关=1 AND ISLASTBAR AND MACD>0,位置*0.8,红柱面积),COLORRED; NOTEXTLML: DRAWNUMBER(数显开关=1 AND ISLASTBAR AND MACD<0,0-位置*0.5,绿柱面积),COLORGREEN; |