趋势突破选股公式
N:=10;
M:=2.5;
CXHZB:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
UP:=(H+L)/2+MA(CXHZB,N)*M;
DN:=(H+L)/2-MA(CXHZB,N)*M;
A1:=REF(UP,BARSLAST(UP<=REF(UP,1)));
A2:=LLV(UP,N*1.5);{更多指标关注微信公众号:程序化指标}
LL:=IF(A2=REF(A2,1) AND A1<REF(A1,1),A1,IF(A1=A2,A1,A2));
B1:=BARSLAST(CROSS(0.5,UP=LL))+1;
B2:=CROSS(COUNT((CROSS(C,LL) OR CROSS(C,REF(LL,2))) AND UP>LL,B1),0.5);
AA:=BARSLAST(B2);
BB:=BARSLAST(CROSS(HHV(DN,AA+1),C));
趋势突破:CROSS(BB,AA)*100;
赞 (0)