新建一个副图指标,复制粘贴源码,先看一下效果图
DRAWTEXT_FIX(1,0.01,0.01,0,'通达信中DRAWICON的图标,方便大家折腾指标'),COLORMAGENTA;
A:=CURRBARSCOUNT;
A1:=8;A2:=6;A3:=4;A4:=2;A5:=0;
STICKLINE(1,-2,-2,6,0),COLORWHITE;
STICKLINE(1,10,10,6,0),COLORWHITE;
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);