/----- マクロ本体(Dnoによるループ) --------------
/Kind: 1:Buy、2:Sell、3:Tenbai、4:Kaimodoshi
if 条件 then writeMark(Dno,1~4,nowE);
/------------------- ユーザー関数 -----------------------
/種別毎のマーク
/Kind: 1:Buy、2:Sell、3:Tenbai、4:Kaimodoshi
function writeMark(Dno,kind,p);
var x,y;
begin
x:=GetX(Dno);
y:=ChartH*0.75;
case kind of
/UserBuy
1: begin
RectAngleD(red,1,x-2,y-4,x+2,y+4);
lineD(red,1,x,y+4,x,y+10);
end;
/UserSell
2: begin
RectAngleD(green,1,x-2,y-4,x+2,y+4);
lineD(green,1,x,y+4,x,y+10);
end;
/UserTenbai
3: begin
fillRectD(green,1,x-2,y-4,x+2,y+4);
lineD(green,1,x,y+4,x,y+10);
if p<>0 then
writefig(x,y-20,tostr(p/1000));
end;
/UserKaimodoshi
4: begin
fillRectD(red,1,x-2,y-4,x+2,y+4);
lineD(red,1,x,y+4,x,y+10);
if p<>0 then
writefig(x,y-20,tostr(p/1000));
end;
end
end;