将C改为最高价h为开多.low为开空
改成了之后用何条件开仓?
如果用最高价就是这样写的
VAR1:=EMA(EMA(h,9),9);
VAR2:=REF(VAR1,1);
kp1:(VAR1-VAR2)/VAR2*100000;
VAR3:=EMA(EMA(l,9),9);
VAR4:=REF(VAR1,1);
kp2:(VAR1-VAR2)/VAR2*100000;
{将C改为最高价h为开多.low为开空}
KD:=cross(kp1,0); //开多条件
PD:=kp1<0; //平多条件
KK:=cross(0,kp2); //开空条件
PK:=kp2>0; //平空条件
if pk then sellshort(1,0,market);
if kd then buy(holding=0,1,market);
if pd then sell(1,0,market);
if kk then buyshort(holding=0,1,market);