[PEL] 复制代码
O15:=CALLSTOCK('',vtopen,3,0);
H15:=CALLSTOCK('',vthigh,3,0);
L15:=CALLSTOCK('',vtlow,3,0);
C15:=CALLSTOCK('',vtCLOSE,3,0);
SJ:=1;
HH:=HHV(H15,1)/10*SJ+HHV(H15,20)/10+HHV(H15,20)/10+HHV(H15,4)/10+HHV(H15,4)/10+HHV(H15,80)/10+HHV(H15,8)/10+HHV(H15,13)/10+HHV(H15,80)/10+HHV(H15,80)/10;
LL:=LLV(L15,1)/10*SJ+LLV(L15,20)/10+LLV(L15,20)/10+LLV(L15,4)/10+LLV(L15,4)/10+LLV(L15,80)/10+LLV(L15,8)/10+LLV(L15,13)/10+LLV(L15,80)/10+LLV(L15,80)/10;
H1:=IF(HH<REF(HH,1)&&LL<REF(LL,1)&&REF(O15,1)>C15&&O15>C15&&(HHV(O15,0)-C15)>0,REF(HH,2),0);
L1:=IF(LL>REF(LL,1)&&HH>REF(HH,1)&&REF(O15,1)<C15&&O15<C15&&(C15-LLV(O15,0))>0,REF(LL,2),0);
H2:=VALUEWHEN(H1>0,H1);
L2:=VALUEWHEN(L1>0,L1);
K1:=IF(C15>H2,-3,IF(C15<L2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
TMP:=K2,LINETHICK2;
ZK:=CROSS(TMP,0);
ZD:=CROSS(0,TMP);
VAR1:=ZD;
VBR1:=ZK ;
IF HOLDING>0 AND VBR1 THEN BEGIN
SELL(1,SS*1,MARKETR);
END
IF HOLDING=0 AND VAR1 THEN BEGIN
BUY(1,SS*1,MARKETR);
END