[PEL] 复制代码
//开高低收 分别用下面几个一一对照替换下就行了
O15:CALLSTOCK('',vtopen,3,0);
H15:CALLSTOCK('',vthigh,3,0);
L15:CALLSTOCK('',vtlow,3,0);
C15:CALLSTOCK('',vtCLOSE,3,0);
HH1:=HHV(H15,4);
LL1:=LLV(L15,4);
A1:=BARSLAST(C15>REF(HH1,1));
A2:=BARSLAST(C15<REF(LL1,1));
VAR1:=A1<A2;
VBR1:=A2<A1 ;
STICKLINE(A1<A2,O15,C15,10,1),COLORRED;
STICKLINE(A2<A1,O15,C15,10,1),COLORBLUE;
HT:= IFELSE (O15>C15,O15,C15);
LT:= IFELSE (O15<C15,O15,C15);
O2:=O15-C15;
STICKLINE(O2>0&&A1<A2,O15,C15,10,0),COLORRED;
STICKLINE(O2>0&&A1>A2,O15,C15,10,0),COLORBLUE;
//突破开仓
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