A3:=SETTLE;
是什么 解释一下。还有BK,BP,Sk,SP.
这两个BKPRICE和SKPRICE 不知是什么,
你若会定义,自己定义就可以了,还有因为这个原因没有检测。
//n1:=OPENMINUTES(TIME);
n1:=barslast(DATE<>REF(DATE,1))+1;
dm:=4-INTPART(LOG(C));
A3:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),dm);
if REF(L,1)<REF(A3,1) AND L>A3 AND TIME>0903 AND TIME<1455 then
BUY(1 ,1 ,market );//bk
if H>=BKPRICE+950 OR L<=BKPRICE-30 OR TIME=1458 then
SELL(1 ,1 ,market );//sp
if REF(H,1)>REF(A3,1) AND H<A3 AND TIME>0903 AND TIME<1455 then
BUYSHORT( 1 ,1 ,market );//SK;
if L<=SKPRICE-950 OR H>=SKPRICE+30 OR TIME=1458 then
SELLSHORT( 1 ,1 ,market );//BP
cond:=day<>ref(day,1);
n:=barslast(cond)+1;
A3 :sum(amount,n)/sum(vol,n)/multiplier;//分时均线
if REF(L,1)<REF(A3,1) AND L>A3 AND TIME>090300 AND TIME<145500 then begin
sellshort(holding<0,0,thisclose);
buy (holding=0,1,thisclose);
end
if REF(H,1)>REF(A3,1) AND H<A3 AND TIME>090300 AND TIME<145500 then begin
sell(holding>0,0,thisclose);
buyshort(holding=0,0,thisclose);
end
if H>=enterprice+950*mindiff OR L<=enterprice-30*mindiff or time<145800 then begin
sell(holding>0,1,thisclose);
end
if L<=enterprice-950*mindiff OR H>=enterprice+30*mindiff or time<145800 then begin
sellshort(holding<0,0,thisclose);
end
分时均线来自于版主leevolvo的帖子http://www.weistock.com/bbs/dispbbs.asp?boardid=4&Id=6285
其他的改写了下。
应该是buyshort(holding=0,1,thisclose);
手误