股票公式:牵牛线(通达信)
牵牛线:MA(C,0);{十日线持股法} X
上:=MA(HIGH,10);
中:=MA((HIGH+LOW)/2,10),COLORWHITE,LINETHICK1;
下:=MA(LOW,10);
AA:=(中+上)/2;
SS:=(中+下)/2;
STICKLINE((H+C)/2>=AA,H,L,0,0),COLOR0066FF;
STICKLINE((H+C)/2>=AA,C,O,2,0),COLOR0066FF;
STICKLINE((C+L)/2<=SS,H,L,0,0),COLORF0F000;
STICKLINE((C+L)/2<=SS,C,O,2,1),COLORF0F000,;
STICKLINE(H<=上 AND C>=下,H,L,0,0),COLOR00FF99;
STICKLINE(H<=上 AND C>=下,C,O,2,1),COLOR00FF99;
持股线:IF(H>中,中,DRAWNULL),COLORRED,LINETHICK3;
持币线:IF(L<中,中,DRAWNULL),COLORBLUE,LINETHICK2;
压力:MA(REF(HHV(C,30),1),2),COLORBROWN;
支撑:MA(REF(LLV(C,30),1),2),COLORGRAY;
DA:=(EMA(C,1)+EMA(C,2)+EMA(C,3)+EMA(C,4))/4;
DB:=(EMA(C,10)+EMA(C,20)+EMA(C,40)+EMA(C,80))/4;
DRAWTEXT(CROSS(DA-DB,0),L*0.94,'←买★'),COLORYELLOW;
JH:=SMA(MAX(C-REF(C,1),0),5,1)/SMA(ABS(C-REF(C,1)),5,1)*100;
DRAWTEXT(CROSS(84,JH),H*1.02,'←卖★'),COLORWHITE;
涨停:=IF((C-REF(C,1))*100/ REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(涨停,O,C,3,0),COLORRED;
跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(跌停,O,C,3,0),COLORGREEN;