**指标使用说明:**指标名称(DRAWICON图标,幅图显示),需要查看图标的时候,要选择上市天数>=92天的股票,才能正常的显示全部的图标,否则是无法显示的,以下的写法也是指标编写的另一种思想,比用定点文字去写代码看着更加简洁干净。CURRBARSCOUNT函数和自定义坐标位置的结合使用,在这里运用的非常巧妙。虽然通达信内置的有图标显示,但是要把鼠标移动才能显示图标对应的编号,且不能显示所有的,所以才写了以下代码,方便即用即看。
{龙虎榜小红牛系统,官方微信公众号:GXZFP888}
DRAWGBK(OPEN>0,RGB(8,88,188),RGB(0,0,0),0,'02',0);
DRAWTEXT_FIX(1,0.1,0.1,0,'通达信DRAWICON函数图标显示,方便大家折腾指标'),COLORYELLOW;
A:=CURRBARSCOUNT;
A1:=8;A2:=6;A3:=4;A4:=2;A5:=0;
STICKLINE(1,-2,-2,6,0),COLORYELLOW;
STICKLINE(1,10,10,6,0),COLORYELLOW;
{查看图标的时候,要选择上市天数>=92天的股票,才能正常的显示全部的图标}
DRAWTEXT(A=92,A1,' ←1');DRAWICON(A=92,A1,1);
DRAWTEXT(A=84,A1,' ←2');DRAWICON(A=84,A1,2);
DRAWTEXT(A=76,A1,' ←3');DRAWICON(A=76,A1,3);
DRAWTEXT(A=68,A1,' ←4');DRAWICON(A=68,A1,4);
DRAWTEXT(A=60,A1,' ←5');DRAWICON(A=60,A1,5);
DRAWTEXT(A=52,A1,' ←6');DRAWICON(A=52,A1,6);
DRAWTEXT(A=44,A1,' ←7');DRAWICON(A=44,A1,7);
DRAWTEXT(A=36,A1,' ←8');DRAWICON(A=36,A1,8);
DRAWTEXT(A=28,A1,' ←9');DRAWICON(A=28,A1,9);
DRAWTEXT(A=20,A1,' ←10');DRAWICON(A=20,A1,10);
DRAWTEXT(A=92,A2,' ←11');DRAWICON(A=92,A2,11);
DRAWTEXT(A=84,A2,' ←12');DRAWICON(A=84,A2,12);
DRAWTEXT(A=76,A2,' ←13');DRAWICON(A=76,A2,13);
DRAWTEXT(A=68,A2,' ←14');DRAWICON(A=68,A2,14);
DRAWTEXT(A=60,A2,' ←15');DRAWICON(A=60,A2,15);
DRAWTEXT(A=52,A2,' ←16');DRAWICON(A=52,A2,16);
DRAWTEXT(A=44,A2,' ←17');DRAWICON(A=44,A2,17);
DRAWTEXT(A=36,A2,' ←18');DRAWICON(A=36,A2,18);
DRAWTEXT(A=28,A2,' ←19');DRAWICON(A=28,A2,19);
DRAWTEXT(A=20,A2,' ←20');DRAWICON(A=20,A2,20);
DRAWTEXT(A=92,A3,' ←21');DRAWICON(A=92,A3,21);
DRAWTEXT(A=84,A3,' ←22');DRAWICON(A=84,A3,22);
DRAWTEXT(A=76,A3,' ←23');DRAWICON(A=76,A3,23);
DRAWTEXT(A=68,A3,' ←24');DRAWICON(A=68,A3,24);
DRAWTEXT(A=60,A3,' ←25');DRAWICON(A=60,A3,25);
DRAWTEXT(A=52,A3,' ←26');DRAWICON(A=52,A3,26);
DRAWTEXT(A=44,A3,' ←27');DRAWICON(A=44,A3,27);
DRAWTEXT(A=36,A3,' ←28');DRAWICON(A=36,A3,28);
DRAWTEXT(A=28,A3,' ←29');DRAWICON(A=28,A3,29);
DRAWTEXT(A=20,A3,' ←30');DRAWICON(A=20,A3,30);
DRAWTEXT(A=92,A4,' ←31');DRAWICON(A=92,A4,31);
DRAWTEXT(A=84,A4,' ←32');DRAWICON(A=84,A4,32);
DRAWTEXT(A=76,A4,' ←33');DRAWICON(A=76,A4,33);
DRAWTEXT(A=68,A4,' ←34');DRAWICON(A=68,A4,34);
DRAWTEXT(A=60,A4,' ←35');DRAWICON(A=60,A4,35);
DRAWTEXT(A=52,A4,' ←36');DRAWICON(A=52,A4,36);
DRAWTEXT(A=44,A4,' ←37');DRAWICON(A=44,A4,37);
DRAWTEXT(A=36,A4,' ←38');DRAWICON(A=36,A4,38);
DRAWTEXT(A=28,A4,' ←39');DRAWICON(A=28,A4,39);
DRAWTEXT(A=20,A4,' ←40');DRAWICON(A=20,A4,40);
DRAWTEXT(A=92, A5,' ←41');DRAWICON(A=92, A5,41);
DRAWTEXT(A=84, A5,' ←42');DRAWICON(A=84, A5,42);
DRAWTEXT(A=76, A5,' ←43');DRAWICON(A=76, A5,43);
DRAWTEXT(A=68, A5,' ←44');DRAWICON(A=68, A5,44);
DRAWTEXT(A=60, A5,' ←45');DRAWICON(A=60, A5,45);
DRAWTEXT(A=52, A5,' ←46');DRAWICON(A=52, A5,46);