新规新K线,精准直观清晰(通达信公式 主图 源码 测试图)
2022-02-18原创 编 辑:翔博软件
{新规新K线}
{优化下,TDX涨跌K线,精准直观清晰 且不打乱其他周期结构的混乱性}
{-----------------涨跌K线}
买线:=EMA(C,4);
卖线:=EMA(SLOPE(C,21)*10+C,34);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(买线>=卖线,LOW,HIGH,0,0),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,3,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0,0),COLORCYAN;
STICKLINE(买线<卖线,CLOSE,OPEN,3,1),COLORCYAN;
STICKLINE(OPEN>CLOSE,CLOSE,OPEN,3,0),COLORCYAN;
{BU:=CROSS(买线,卖线);DRAWICON(BU,L-0.003,13);}
ZTB:=IF(INBLOCK('科创板'),1.2,IF(INBLOCK('创业板') AND DATE>1200823,1.2 ,IF(INBLOCK('ST板块'),1.05,1.1)));
DTB:=IF(INBLOCK('科创板'),0.8,IF(INBLOCK('创业板') AND DATE>1200823,0.8 ,IF(INBLOCK('ST板块'),0.95,0.9)));
STICKLINE(REF(C,1)*ZTB-C<0.0049,O,C,2.88,0),COLORRED;{涨停板}
STICKLINE(C>REF(C,1)*1.101,C,REF(C,1)*1.1,2.88,0),COLOR000088{区分10%和20%涨停};
STICKLINE(C-REF(C,1)*DTB<0.0051,O,C,2.88,0),COLORGREEN;{跌停板}
DRAWTEXT(L-REF(C,1)*DTB<0.0051 AND C>L AND PERIOD=5,L-0.05,' 撬板'),COLORCC00CC;
DRAWTEXT(REF(C,1)*ZTB-H<0.0049 AND H>C AND PERIOD=5,H-0.02,' 炸板'),COLOR00CC00;
DRAWTEXT(REF(C,1)*ZTB-C<0.0049 AND L-REF(C,1)*DTB<0.0051 AND PERIOD=5,L-0.05,'天堂板'),COLORCC00CC;
{优化下,TDX涨跌K线,精准直观清晰 且不打乱其他周期结构的混乱性}
{-----------------涨跌K线}
买线:=EMA(C,4);
卖线:=EMA(SLOPE(C,21)*10+C,34);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(买线>=卖线,LOW,HIGH,0,0),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,3,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0,0),COLORCYAN;
STICKLINE(买线<卖线,CLOSE,OPEN,3,1),COLORCYAN;
STICKLINE(OPEN>CLOSE,CLOSE,OPEN,3,0),COLORCYAN;
{BU:=CROSS(买线,卖线);DRAWICON(BU,L-0.003,13);}
ZTB:=IF(INBLOCK('科创板'),1.2,IF(INBLOCK('创业板') AND DATE>1200823,1.2 ,IF(INBLOCK('ST板块'),1.05,1.1)));
DTB:=IF(INBLOCK('科创板'),0.8,IF(INBLOCK('创业板') AND DATE>1200823,0.8 ,IF(INBLOCK('ST板块'),0.95,0.9)));
STICKLINE(REF(C,1)*ZTB-C<0.0049,O,C,2.88,0),COLORRED;{涨停板}
STICKLINE(C>REF(C,1)*1.101,C,REF(C,1)*1.1,2.88,0),COLOR000088{区分10%和20%涨停};
STICKLINE(C-REF(C,1)*DTB<0.0051,O,C,2.88,0),COLORGREEN;{跌停板}
DRAWTEXT(L-REF(C,1)*DTB<0.0051 AND C>L AND PERIOD=5,L-0.05,' 撬板'),COLORCC00CC;
DRAWTEXT(REF(C,1)*ZTB-H<0.0049 AND H>C AND PERIOD=5,H-0.02,' 炸板'),COLOR00CC00;
DRAWTEXT(REF(C,1)*ZTB-C<0.0049 AND L-REF(C,1)*DTB<0.0051 AND PERIOD=5,L-0.05,'天堂板'),COLORCC00CC;
DRAWTEXT(REF(C,1)*ZTB-H<0.0049 AND C-REF(C,1)*DTB<0.0051 AND PERIOD=5,H-0.02,'地狱板'),COLOR00CC00;