通达信金点主图源码
SJ:=IF(DATE<1500630,1,1);
ZTB:=IF(CURRBARSCOUNT=1 AND PERIOD=5,REF(C,1)*1.099,DRAWNULL),NODRAW;
涨停:ZTB,COLORYELLOW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,ZTB,REF(C,1)*SJ,-1,-1),COLORYELLOW;
DTB:=IF(CURRBARSCOUNT=1 AND PERIOD=5,REF(C,1)*0.9,DRAWNULL),NODRAW;
跌停:DTB,COLORLICYAN;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,DTB,REF(C,1),-1,-1),COLORLICYAN;
{MACD}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
{压力支撑}
HD:=FILTER(BACKSET(FILTER(REF(C,10)=HHV(C,2*10+1),10),10+1),10);
LD:=FILTER(BACKSET(FILTER(REF(C,10)=LLV(C,2*10+1),10),10+1),10);
前高:REF(C,BARSLAST(HD))*SJ,COLOR00FF00,POINTDOT;
前低:REF(C,BARSLAST(LD))*SJ,COLORFF00FF,POINTDOT;
{冷暖气带}
DRAWBAND(MA(CLOSE,60),RGB(100,0,0),MA(CLOSE,120),RGB(10,60,0));
DRAWBAND(MA(CLOSE,5),RGB(220,160,30),MA(CLOSE,10),RGB(60,70,90));
MA60:MA(C,60),COLORGREEN;
MA120:MA(C,120),COLORRED;
MA240:MA(CLOSE,240)*SJ,COLORLICYAN;
年线走高:IF(MA240>REF(MA240,1),MA240,DRAWNULL),COLORLIRED,LINETHICK1;
DRAWKLINE(H,O,L,C);
压力:XMA(2*H-L,15)*(1+0.0001)*(1+0.0001),COLORBLUE,LINETHICK2;
支撑:XMA(2*L-H,15)*(1-0.0001)*(1-0.0001),COLORWHITE,LINETHICK2;
{涨停板}
STICKLINE(C/REF(C,1)>=1.099,O,C,3,-2),COLORYELLOW;
A1:=H>MA(C,5) AND H>MA(C,10) AND H>MA(C,20) AND H>MA(C,30) AND H>MA(C,60)
AND H>MA(C,120);
A2:=L<MA(C,5) AND L<MA(C,10) AND L<MA(C,20) AND L<MA(C,30) AND L<MA(C,60)
AND L<MA(C,120);
STICKLINE(A1 AND A2,O,C,3,0),COLORYELLOW;
STICKLINE(前高,前高,前高,11,0),COLOR00FF00;
STICKLINE(前低,前低,前低,11,0),COLORFF00FF;
{MACD 显示}
STICKLINE(MACD<REF(MACD,1) AND DIF>0,O,C,1,0),COLORBLUE;
STICKLINE(MACD>REF(MACD,1) AND DIF>0,O,C,1,0),COLORRED;
STICKLINE(MACD<REF(MACD,1) AND DIF<0,O,C,1,0),COLORLIGREEN;
STICKLINE(MACD>REF(MACD,1) AND DIF<0,O,C,1,0),COLORLIMAGENTA;