|| 这是什么意思?
||是或者的意思吧?改成or了。
你代码中用的时间是北京时间,在软件里工具-》选项-》视图里勾选北京本地时间,重启金字塔生效。
n:=1;
if C>VALUEWHEN(DATE<>REF(DATE,1),OPEN) and TIME<091000 then buy(holding=0,1,market);
if C<VALUEWHEN(DATE<>REF(DATE,1),OPEN) and TIME<091000 then buyshort(holding=0,1,market);
AA:=HHV(H,enterbars+1);
BB:=LLV(L,enterbars+1);
if (C<enterPRICE*(1-N/1000) or
(AA-enterPRICE>enterprice*N/1000 and C<=enterprice+(AA-enterprice)*N/100))
and enterprice>0 or TIME>=145500 then sell(HOLDING>0,holding,market);
if (C>enterPRICE*(1+N/1000) or (enterprice-BB>enterprice*N/1000 and C>=enterprice+(enterprice-BB)*N/100))
and enterprice>0 or TIME>=145500 then sellshort(HOLDING<0,holding,market);