callstock(stklabel,vtclose,5,-1);
stkindi('','ma.ma1(21)',0,5,-1);
h 穿破 line2 时,按当时h价+3*mindiff委托
l 跌破 line2 时,按当时L价-3*mindiff委托
可以按下面写,会有问题吗?
long2:=cross(h,line2);
short2:=cross(line2,l);
if myhoiding=0 and long2 and h>line1 then buy(1,p,limitr,h+3*mindiff),ignorecheckprice;
if myhoiding=0 and short2 and l<line1 then buyshort(1,p,limitr,l-3*mindiff),ignorecheckprice;