TJA:=IF(A<PT,PT-A,A-PT)*BT; TJB:=IF(TJA<LJ,SQRT(LJ*LJ-TJA*TJA),0)/BJ; XH:IF(DT<GT,PJ+TJB,PJ-TJB),COLORMAGENTA; SH:IF(DT<GT,PJ-TJB,PJ+TJB),COLORMAGENTA; XG1:=COUNT(CROSS(C,SH),T1+1)=1 AND CROSS(C,SH) AND A<DT; TB:=A=ROUND((GT+DT)/2); 選股公式: A:=CURRBARSCOUNT; HA:=IF(BETWEEN(DATE,1150601,1150630),H,-999); T:=HHVBARS(HA,0); TT:=BARSLAST(L=LLV(L,T+1)); T1:=BARSLAST(A=CONST(TT)+1); T2:=BARSLAST(A=CONST(T)+1); GT:=CONST(T2)+1; DT:=CONST(T1)+1; AA:=DRAWLINE(A=GT,H,A=DT,L,0); HH:=CONST(REF(L,BARSLAST(A=DT+1))); LL:=CONST(REF(H,BARSLAST(A=GT+1))); JJ:=HH-LL; TJ:=ABS(GT-DT); PT:=TJ/2+MIN(GT,DT); PJ:=(HH+LL)/2; LJ:=HH*LL; BT:=2*LJ/TJ; BJ:=LJ/JJ; TJA:=IF(A<PT,PT-A,A-PT)*BT; TJB:=IF(TJA<LJ,SQRT(LJ*LJ-TJA*TJA),0)/BJ; SH:=IF(DT<GT,PJ-TJB,PJ+TJB);
|