非常好用一款波段趋势指标,对于做波段还是非常有用的,特分享给大家:
文华版超级趋势指标源代码:(亲测WH6可用):这款超级趋势指标加载到文华6上面的效果如下图所示:
源代码如下:
N:=10;
M:=1.5;
TR1:=MAX(MAX((HIGH-LOW),ABS(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
ATR:=MA(TR1,10);
MEDIAN:= (HIGH + LOW) / 2;
X:=20;
HH:=MEDIAN + ATR * M;
LL:=MEDIAN - ATR * M;
W:=BARSLAST((HH>=HHV(HH,N)))-BARSLAST((LLV(LL,N)>=LL));
BBX:=LLV(HH,BARSLAST(W<0));
SSX:=HHV(LL,BARSLAST(W>0));
WW:=IF(W>0,BBX,IF(W<0,SSX,C));
WWW:IF(W<0,WW,NULL),COLORMAGENTA,LINETHICK2;
WWW1:IF(W>0,WW,NULL),COLORBLUE,LINETHICK2;
STICKLINE1(0>W,H,L,0,0),COLORRED;
STICKLINE1(0>W AND C>O,O,C,3,0),COLORRED;
STICKLINE1(0>W AND C<O,O,C,3,0),COLORRED;
STICKLINE1(0<W,H,L,0,0),COLOR00AA00;
STICKLINE1(0<W AND C>O,O,C,3,0),COLOR00AA00;
STICKLINE1(0<W AND C<O,O,C,3,0),COLOR00AA00;