[求助]請老師編一個加倉的模型
作者:金字塔 來源:cxh99.com 發(fā)布時間:2015年05月15日
- 咨詢內(nèi)容:
c>ma(c,31) and c=hhv(c,9)買入開倉30%倉位;c<ma(c,10) and c=llv(c,9)賣出平倉;c<ma(c,31) and c=llv(c,9)賣出開倉30%倉位;c>ma(c,10) and c=hhv(c,9)買入平倉;連續(xù)虧損3次以后的下一次開倉40%倉位;連續(xù)虧損4次以后的下一次開倉50%倉位;連續(xù)盈利3次以后的下一次開倉20%倉位;老師這個能完成嗎?謝謝
- 金字塔客服:
if c<ma10 and c=llv(c,9) and holding>0 then begin
sell(1,0,market);
if numprofit(1)>0 then begin
n:=n+1;
m:=0;
end
if numprofit(1)<0 then begin
n:=0;
m:=m+1;
end
end