通达信趋势向导公式
KAVEN1:=IF(HIGH<REF(HIGH,2) AND REF(HIGH,1)<REF(HIGH,2),REF(HIGH,2),0);
KAVEN2:=IF(LOW>REF(LOW,2) AND REF(LOW,1)>REF(LOW,2),REF(LOW,2),0);
KAVEN3:=VALUEWHEN(KAVEN1>0,KAVEN1);
KAVEN4:=VALUEWHEN(KAVEN2>0,KAVEN2);
KAVEN5:=IF(CLOSE>KAVEN3,-3,IF(CLOSE<KAVEN4,1,0));
KAVEN6:=VALUEWHEN(KAVEN5<>0,KAVEN5);
KAVEN7:=IF(KAVEN6=1,KAVEN3,KAVEN4);
TJ:KAVEN7,COLORMAGENTA,PRECIS2;
KAVEN8:=VALUEWHEN(ISLASTBAR,KAVEN7);
KAVEN9:=IF(C>KAVEN7,-3,1);
KAVEN10:=OPEN-CLOSE;
KAVEN11:=IF(OPEN>CLOSE,OPEN,CLOSE);
KAVEN12:=IF(OPEN<CLOSE,OPEN,CLOSE);
MA5:MA(C,5),PRECIS2;
EMA60:EMA(C,60),PRECIS2;
STICKLINE(TJ<C ,O,C,4,0),COLORRED;
STICKLINE(TJ<C ,H,L,0,0),COLORRED;
STICKLINE(TJ>=C ,O,C,4,0),COLORGREEN;
STICKLINE(TJ>=C ,H,L,0,0),COLORGREEN;
DRAWTEXT(CROSS(C,TJ),LOW*0.998,'注▲意'),COLORRED;
DRAWTEXT(CROSS(TJ,C),H*1.002,'注▼意'),COLORGREEN;