好用的牵牛线指标
牵牛线: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));
AC5:=IF(DFC<5*5,SQRT(POW(5*5,2)-POW(DFC,2)),0)*VF;
ARC5:=IF(TC2>BC2,BASE+AC5,BASE-AC5);
DRAWBAND(ARC5,RGB(119,119,187),ARC5,RGB(119,119,187));
AC6:=IF(DFC<6*5,SQRT(POW(6*5,2)-POW(DFC,2)),0)*VF;
ARC6:=IF(TC2>BC2,BASE+AC6,BASE-AC6);
DRAWBAND(ARC6,RGB(119,119,187),ARC6,RGB(119,119,187));
AC7:=IF(DFC<7*5,SQRT(POW(7*5,2)-POW(DFC,2)),0)*VF;
ARC7:=IF(TC2>BC2,BASE+AC7,BASE-AC7);
DRAWBAND(ARC7,RGB(119,119,187),ARC7,RGB(119,119,187));
AC8:=IF(DFC<8*5,SQRT(POW(8*5,2)-POW(DFC,2)),0)*VF;
ARC8:=IF(TC2>BC2,BASE+AC8,BASE-AC8);
DRAWBAND(ARC8,RGB(119,119,187),ARC8,RGB(119,119,187));
AC9:=IF(DFC<9*5,SQRT(POW(9*5,2)-POW(DFC,2)),0)*VF;
ARC9:=IF(TC2>BC2,BASE+AC9,BASE-AC9);
DRAWBAND(ARC9,RGB(119,119,187),ARC9,RGB(119,119,187));
AC10:=IF(DFC<10*5,SQRT(POW(10*5,2)-POW(DFC,2)),0)*VF;
ARC10:=IF(TC2>BC2,BASE+AC10,BASE-AC10);
DRAWBAND(ARC10,RGB(119,119,187),ARC10,RGB(119,119,187));
AC11:=IF(DFC<11*5,SQRT(POW(11*5,2)-POW(DFC,2)),0)*VF;
ARC11:=IF(TC2>BC2,BASE+AC11,BASE-AC11);
DRAWBAND(ARC11,RGB(119,119,187),ARC11,RGB(119,119,187));
AC12:=IF(DFC<12*5,SQRT(POW(12*5,2)-POW(DFC,2)),0)*VF;
ARC12:=IF(TC2>BC2,BASE+AC12,BASE-AC12);
DRAWBAND(ARC12,RGB(119,119,187),ARC12,RGB(119,119,187));
AC13:=IF(DFC<13*5,SQRT(POW(13*5,2)-POW(DFC,2)),0)*VF;
ARC13:=IF(TC2>BC2,BASE+AC13,BASE-AC13);
DRAWBAND(ARC13,RGB(119,119,187),ARC13,RGB(119,119,187));
AC14:=IF(DFC<14*5,SQRT(POW(14*5,2)-POW(DFC,2)),0)*VF;
ARC14:=IF(TC2>BC2,BASE+AC14,BASE-AC14);
DRAWBAND(ARC14,RGB(119,119,187),ARC14,RGB(119,119,187));
AC15:=IF(DFC<15*5,SQRT(POW(15*5,2)-POW(DFC,2)),0)*VF;
ARC15:=IF(TC2>BC2,BASE+AC15,BASE-AC15);
DRAWBAND(ARC15,RGB(119,119,187),ARC15,RGB(119,119,187));
AC16:=IF(DFC<16*5,SQRT(POW(16*5,2)-POW(DFC,2)),0)*VF;
ARC16:=IF(TC2>BC2,BASE+AC16,BASE-AC16);
DRAWBAND(ARC16,RGB(119,119,187),ARC16,RGB(119,119,187));
AC17:=IF(DFC<17*5,SQRT(POW(17*5,2)-POW(DFC,2)),0)*VF;
ARC17:=IF(TC2>BC2,BASE+AC17,BASE-AC17);
DRAWBAND(ARC17,RGB(119,119,187),ARC17,RGB(119,119,187)); |