 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA :=EMA(DIFF,9);
MACD :2*(DIFF-DEA);
cond1:hhv(h,todaybar)/llv(low,todaybar)>1.1;
n1:=todaybar;
dm:=4-INTPART(LOG(C));
结算价:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm),colorred;
cond2:close>结算价;
cond3:macd<ref(macd,10)*(1-2/100);
cond4:ref(h=hhv(high,todaybar),10);
variable:n=0;
if cond1 and cond2 and cond3 and cond4 and n<=2 then
begin
n:=n+1;
buyshort(1,20%,marketr);
end
if enterbars>5 and (dif=hhv(dif,todaybar) or macd=hhv(macd,todaybar)) then sell(1,10%,marketr);
if close<enterprice*(1-10%) then sell(1,10%,marketr);
|
|