分形指标,这是从文华财经软件转换而来的。
{分形指标,文华版本}
KU1:=IF(HIGH=HHV(HIGH,3),1,0);
KD1:=IF( LOW=LLV( LOW,3),1,0);
A:REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,NODRAW;
B:REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,NODRAW;
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2), REF(LOW,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));
{ [LOCAL]1[/LOCAL]}
上分形:IF(HIGH>=MA(CLOSE,2),UL,REF(UL,BARSLAST(HIGH>MA(CLOSE,2)))),NODRAW;
下分形:IF( LOW<=MA(CLOSE,2),DL,REF(DL,BARSLAST(LOW<=MA(CLOSE,2)))),NODRAW;
STICKLINE(REFX(A,2),REFX(上分形,2),REFX(上分形,2),5,1),COLORMAGENTA;
STICKLINE(REFX(B,2),REFX(下分形,2),REFX(下分形,2),5,1),COLORYELLOW;
STICKLINE(REFX(A,1),REFX(上分形,1),REFX(上分形,1),5,1),COLORMAGENTA;
STICKLINE(REFX(B,1),REFX(下分形,1),REFX(下分形,1),5,1),COLORYELLOW;
STICKLINE(BARSLAST(ABS(上分形-REF(上分形,1)))<BARSLAST(CLOSE>上分形 AND REF(CLOSE,1)<REF(上分形,1)),上分形,上分形,5,1),COLORMAGENTA;
STICKLINE(BARSLAST(ABS(下分形-REF(下分形,1)))<BARSLAST(CLOSE<下分形 AND REF(CLOSE,1)>REF(下分形,1)),下分形,下分形,5,1),COLORYELLOW;{原文链接:HTTP://WWW.55188.COM/THREAD-7980120-1-1.HTML};
20211217103330301.png
|