求高人编写一个通达信选股公式:求60天内跌幅最大的该天最高价,今日收盘价上穿该日最高价.

2024-12-02 23:14:57
推荐回答(3个)
回答1:

XG:cross(c,ref(h,barslast(hhv((c/ref(c,1)-1)*100,60))));

希望能帮到你!

回答2:

XG:cross(c,ref(h,barslast(hhv((c/ref(c,1)-1)*100,60))));

上式有好几处错误

应该:

XG:CROSS(C,REF(H,BARSLAST(LLV((C/REF(C,1)-1)*100,60)=(C/REF(C,1)-1)*100)));

回答3:

选股公式:

L1:= IF(C>=O,0,(O-C)/O);
L2:= L1>0 AND L1=HHV(L1,60);
D2:= BARSLAST(L2);
L3: CROSS(C,REF(H,D2));

主图公式:

L1: IF(C>=O,0,(O-C)/O),NODRAW;
L2: L1>0 AND L1=HHV(L1,60),NODRAW;
D2: BARSLAST(L2),NODRAW;
L3: CROSS(C,REF(H,D2)),NODRAW;
DRAWTEXT(L3,H,'L3'),COLORYELLOW;
DRAWTEXT(L2,H,'L2'),COLORYELLOW;
STICKLINE(REF(L2,D2),REF(H,D2),REF(H,D2),2,1),COLORWHITE;