公式源码:
XA_1:=ZIG(2,5);
XA_2:=XA_1>REF(XA_1,1) AND REF(XA_1,2)>REF(XA_1,1);
XA_3:=IF(XA_2,REF(LOW,1),0);
支撑位:IF(XA_3=0,REF(LOW,BARSLAST(XA_2)+1),REF(LOW,1));
XA_4:=ZIG(1,5);
XA_5:=XA_4<REF(XA_4,1) AND REF(XA_4,2)<REF(XA_4,1);
XA_6:=IF(XA_5,REF(HIGH,1),0);
压力位:IF(XA_6=0,REF(HIGH,BARSLAST(XA_5)+1),REF(HIGH,1));
XA_7:=ZIG(3,5);
XA_8:=XA_7<REF(XA_7,1) AND REF(XA_7,2)<REF(XA_7,1);
XA_9:=IF(XA_8,REF(CLOSE,1),0);
止盈位:IF(XA_9=0,REF(CLOSE,BARSLAST(XA_8)+1),REF(CLOSE,1));
XA_10:=XA_7>REF(XA_7,1) AND REF(XA_7,2)>REF(XA_7,1);
XA_11:=IF(XA_10,REF(CLOSE,1),0);
止损位:IF(XA_11=0,REF(CLOSE,BARSLAST(XA_10)+1),REF(CLOSE,1));