Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:不能自动交易

1楼
曹晓东 发表于:2016/11/30 10:24:22
a1:=stickline(barpos=datacount-22,c,o,10,0,COLORMAGENTA); 
a2:=stickline(barpos=datacount-10,c,o,10,0,COLORMAGENTA); 
a3:=c<a1;
a4:=c>a1;

mm:=ref(h,1)=hhv(h,3);
nn:=ref(l,1)=llv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;

uu3:=cross(i=1,0.5);//绿
uu4:=cross(i=-1,0.5);//红

if a3 and uu3 then begin  
 buyshort(holding=0,1,market);//阴包阳,卖出
 end
if a4 and uu4 then begin
 buy(holding=0,1,market);//阳包阴,买入
 end
 

 
 if holding>0 and c>a2 then sellshort(1,0,thisclose);
  
 if holding>0 and c<a2 then sell(1,0,thisclose);
 



不能自动交易能否帮忙指点指点   
2楼
wenarm 发表于:2016/11/30 12:32:00
输出你的条件,看下开平仓条件是否满足
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01563 s, 2 queries.