资源描述:
《趋势跟踪通达信指标公式源码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、DRAWGBK(C>0,RGB(O/O,OO)ZRGB(O,OZO)ZOZ,竹:0);DRAWNUMBER(ISUSTBAR,CQ,COLORMAGENTA;SJTJ:=DATE<1590301;AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSEz30);长期趙势线:=DMA((2*CLOSE+LOW+HIGH)/4,AA);CC:=(CLOSE/长期趋势线);MAl:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);MAAA:=((MA1•长期趋
2、势线)/长期趋势线)/3;TMP:=MA1-MAAA*MA1;长期趙势上升:IF(TMP>长期趋势线,长期趙势线,DRAWNULL)丄INETHICK4,COLORRED;IF(TMP>长期趋势线,长期趋势线,DRAWNULL),COLORYELLOW,POINTDOT丄INETHICK4;长期趋势下降:IF(TMP<=长期趋势线,长期趋势线ZDRAWNULL),LINETHICK4,COLORGREEN;IF(TMP<=长期趋势线,长期趋势线,DRAWNULL),COLORBLUE,POINTDOT丄INETH
3、ICK4;HZS:=CROSS(TMPz长期趋势线);LZS:=CROSS(长期趋势线JMP);DRAWICON(HZS,长期趋势线-0.1,23);DRAWICON(LZS,长期趋势线+0.1,24);{DRAWICON(TMP<=长期趋势线ANDNOT(LZS),长期趋势线-0.1,14)};{DRAWICON(TMP>长期趋势线ANDNOT(HZS),长期趋势线+0.1,13)};MAH:=(H*18+REF(HZ1)*17+REF(HZ2)*16+REF(HZ3)*15+REF(H,4)*14+REF(H
4、Z5)*13+REF(H,6)*12+REF(HZ7)*ll+REF(Hz8)*10+REF(Hz9)*9+REF(Hz10)*84-REF(Hzll)*7+REF(H,12)*6+REF(H,13)*5+REF(Hz14)*4+REF(Hz15)*3+REF(Hz16)*2+REF(Hz17)*1)/171;MAL:=(L*18+REF(Lz1)*17+REF(Lz2)*16+REF(L,3)*154-REF(L,4)*14+REF(Lz5)*13+REF(L/6)*12+REF(L,7)*ll+REF(L,8
5、)*10+REF(L,9)*9+REF(L,10)*8+REF(L,ll)*7+REF(Lz12)*6+REF(L,13)*5+REF(L,14)*4+REF(L,15)*3+REF(Lz16)*2+REF(L,17)*1)/171;MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA20:=MA(CLOSE,20);MA60:=MA(CLOSE,60);DK:=SJTJAND(CLOSE>=MAHOR(C>MA5ANDC>MA10ANDC>MA20ANDC>MA60));KK:=SJTJ
6、AND(MAL>CLOSEOR(CCLOSE,OPEN,CLOSE);LT:=IF(OPENvCLOSE,OPEN,CLOSE);STICKLINE(W2>
7、0ANDHS,OPEN,CLOSE,2,0)ZCOLORRED;STICKLINE(W2>0ANDHSQPEN,H,0.0,0),COLORRED;STICKLINE(W2>0ANDHS,C,LQO,0),COLORRED;STICKLINE(W2<=0ANDHS,OPEN,CLOSE,2,1),COLORRED;STICKLINE(W2<=0ANDHS,OzLzO.OzO)zCOLORRED;STICKLINE(W2<=0ANDHS,CH0Q0),COLORRED;STICKLINE(W2>0ANDLS,OPE
8、N,CLOSE,2,0),COLORGREEN;STICKLINE(W2>0ANDLSQPEN,H,0.0,0),COLORGREEN;STICKLINE(W2>0ANDLS,CZLZ0.0,0)ZCOLORGREEN;STICKLINE(W2<=0ANDLSZOPENZCLOSEZ2,1),COLORGREEN;STICKLINE(W2<=0ANDLS,C,H,0.0,