好用的牽牛線指標
牽牛線:MA(C,14);
生命線:MA(C,34),CROSSDOT;
雷達線:MA(C,54);
TC1:=IF(H=HHV(H,10*UR),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,10*LR),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低點定位}
HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高點定位}
HTL:=DRAWLINE(HP,H,LP,L,0);{由高到低}
LTH:=DRAWLINE(LP,L,HP,H,0);{由低到高}
HLC:=IF(TC2>BC2,HTL,LTH);
DRAWBAND(HLC,RGB(49,230,109),HLC,RGB(49,230,109));{高低點連線}
STICKLINE(IF(BC2>TC2,HP,LP),LOWER,UPPER,0,0),COLOR6DE631;
MAR:=ABS(UPPER-LOWER);{幅度}
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用時}
COA:=IF(TC2<BC2,TC2,BC2);{弧線中心定位}
BASE:=IF(BC2<TC2,LOWER,UPPER);{基線}
DRAWBAND(BASE,RGB(49,230,109),BASE,RGB(49,230,109));
HF:=CUAVD;{橫向}
VF:=MAR/100;{縱向}
DFC:=IF(CURRBARSCOUNT<COA,COA-CURRBARSCOUNT,CURRBARSCOUNT-COA)*HF;{與中心距離}
AC1:=IF(DFC<5,SQRT(POW(5,2)-POW(DFC,2)),0)*VF;
ARC1:=IF(TC2>BC2,BASE+AC1,BASE-AC1);
DRAWBAND(ARC1,RGB(119,119,187),ARC1,RGB(119,119,187));
AC2:=IF(DFC<2*5,SQRT(POW(2*5,2)-POW(DFC,2)),0)*VF;
ARC2:=IF(TC2>BC2,BASE+AC2,BASE-AC2);
DRAWBAND(ARC2,RGB(119,119,187),ARC2,RGB(119,119,187));
AC3:=IF(DFC<3*5,SQRT(POW(3*5,2)-POW(DFC,2)),0)*VF;
ARC3:=IF(TC2>BC2,BASE+AC3,BASE-AC3);
DRAWBAND(ARC3,RGB(119,119,187),ARC3,RGB(119,119,187));
AC4:=IF(DFC<4*5,SQRT(POW(4*5,2)-POW(DFC,2)),0)*VF;
ARC4:=IF(TC2>BC2,BASE+AC4,BASE-AC4);
DRAWBAND(ARC4,RGB(119,119,187),ARC4,RGB(119,119,187));
(南方財富網SOUTHMONEY.COM)