你好
有老师在么,怎么我按视频写的公式不能用啊,谁能告诉我啊谢谢了
h30:=ref(hhv(h,30),1);
l30:=ref(llv(l,30),1);
h20:=ref(hhv(h,20),1);
l20:=ref(llv(l,20),1);
//多头进场条件
LONG:=h>h30 and time>093000 and time<145200;
if long then
begin
sellshort(holding<0,holding,limiTR,h30);
buy(holding<0,1,limitR,h30);
end
//多头止损线
partline (holding>0,L30,coloryellow);
longs:=l<l20 and holding>0;
if longs then
begin
sell(1,0,limit,l20);
end
//空头进场条件
SHORT:=L<L30 and time>093000 and time<145200;
if short then
begin
sell(holding>0,0,limitR ,l30);
buySHORT(holding<0,1,limitR,l30);
end
//空头止损线
partline(holding<0,h30,colorred);
SHORT:=(h>h20 and holding<0);
if SHORT then
begin
sellshort(1,0,limitR,h20);
end
sell(time>145500 and holding>0,0,thisclose);
sell(time>145500 and holding<0,0,thisclose);
资产:ASSET,NOAXIS;
可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;