runmode:0;
if close>=ref(askprice,1) then begin
mybuyvol:=vol;
mysellvol:=0;
end
if close<=ref(bidprice,1) then begin
mybuyvol:=0;
mysellvol:=vol;
end
if close<ref(askprice,1) and close>ref(bidprice,1) and close>=askprice then begin
mybuyvol:=vol;
mysellvol:=0;
end
if close<ref(askprice,1) and close>ref(bidprice,1) and close<=bidprice then begin
mybuyvol:=0;
mysellvol:=vol;
end
if close<ref(askprice,1) and close>ref(bidprice,1) and close<askprice and close>bidprice and close>=ref(close,1) then begin
mybuyvol:=vol;
mysellvol:=0;
end
if close<ref(askprice,1) and close>ref(bidprice,1) and close<askprice and close>bidprice and close<ref(close,1) then begin
mybuyvol:=0;
mysellvol:=vol;
end
aa:mybuyvol/2,linethick0;
bb:mysellvol/2,linethick0;
stickline(aa>0,0,aa,10,0,colorred);
stickline(bb>0,0,-bb,10,0,colorgreen);