通达信线性趋势主图+底部主升浪副图指标 源码
经好股网测试,副图使用到REFDATE未来函数,抄底信号会漂移,信号谨慎参考!
底部主升浪副图源码
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),13,1)/SMA(MAX(LOW-VAR2,0),13,1)*100;
VAR4:=EMA(IF(CLOSE*1.2,VAR3*13,VAR3/13),13);
VAR5:=LLV(LOW,34);
VAR6:=HHV(VAR4,34);
VAR7:=IF(LLV(LOW,56),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
AA:=VAR8>REF(VAR8,1);
DJ:=REF(LLV(L,100),3);
ZD:=REFDATE(DJ,DATE);
XG:=L=ZD;
XGA:=AA AND XG;
XG1:=XGA>REF(XGA,1);
DX:=XG1>REF(XG1,1);
DRAWTEXT(FILTER(DX=1,5),36,' 超'),COLORYELLOW;
DRAWTEXT(FILTER(DX=1,5),31,' 底'),COLORYELLOW;
STICKLINE(DX,40,25,1,0),COLORYELLOW;
STICKLINE(DX,25,10,2,0),COLOR00FF00;
STICKLINE(DX,10,0,2,0),COLORBLUE;
STICKLINE(DX,25,15,0.5,0),COLORRED;
STICKLINE(DX,15,6,1,0),COLOR00FF00;
STICKLINE(DX,6,0,2,0),COLORBLUE;
线性趋势主图源码
M1:=3;M2:=6;M3:=12;M4:=24;
熊市区:MA((2*L+C)/3,20),COLORCYAN,NODRAW;
牛市区:MA((H+2*C)/3,20),COLORRED,NODRAW;
STICKLINE(熊市区,熊市区,L,0,-1),COLORLICYAN;
STICKLINE(C>牛市区,熊市区,L,0,-1),COLOR0090FF;
STICKLINE(C>熊市区 AND C<牛市区,L,熊市区,0,-1),COLORWHITE;
DRAWBAND(熊市区,RGB(60,60,60),牛市区,RGB(60,60,60));
STICKLINE(C>熊市区 AND C<牛市区,牛市区,熊市区,2,0),COLORWHITE;
STICKLINE(C>熊市区 AND C>=O,O,C,3,1),COLORRED;
STICKLINE(C>熊市区 AND C>=O,H,C,0,0),COLORRED;
STICKLINE(C>熊市区 AND C<O,O,C,2.5,0),COLORCYAN;
STICKLINE(C>熊市区 AND C<O,O,C,1.8,0),COLORRED;
买入:=CROSS(C,牛市区);
STICKLINE(C>熊市区 AND C<O,O,H,0,1),COLORRED;
STICKLINE(C>熊市区 AND C<O,C,L,0,1),COLORRED;
卖出:=CROSS(熊市区,C);
STICKLINE(C<牛市区 AND C<熊市区 AND C>O,O,C,2.5,1),COLORGREEN;
STICKLINE(C<牛市区 AND C<熊市区 AND C<=O,C,O,3,0),COLORGREEN;
STICKLINE(C<牛市区 AND C<熊市区 AND C<=O,H,L,0,0),COLORGREEN;
STICKLINE(C<牛市区 AND C<熊市区 AND C>O,C,H,0,1),COLORGREEN;
STICKLINE(C<熊市区,牛市区,熊市区,2,0),COLORBLUE;
STICKLINE(C<牛市区 AND C<熊市区 AND C>O,O,L,0,1),COLORGREEN;
STICKLINE(C>牛市区,熊市区,牛市区,2,0),COLOR0090FF;
DRAWICON(买入,L*0.98,7);
DRAWICON(卖出,H*1.03,8);