欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 部分代码,请帮忙看看有无问题

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有1886人关注过本帖树形打印复制链接

主题:部分代码,请帮忙看看有无问题

帅哥哟,离线,有人找我吗?
量化马甲
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:97 积分:0 威望:0 精华:0 注册:2013/3/18 14:52:39
部分代码,请帮忙看看有无问题  发帖心情 Post By:2014/7/11 22:09:35    Post IP:14.120.192.3[只看该作者]

cu1:='cu00';
CUKD:=;
CUPD:=;
CUKK:=;
CUPK:=;
tbuy(CUKD and tbuyholdingex('',cu1,1)<1,10,mkt,0,0,'',cu1);
tbuyshort(CUKK and tsellholdingex('',cu1,1)<1,10,mkt,0,0,'',cu1);
tsell(CUPD and tbuyholdingex('',cu1,1)>0,0,mkt,0,0,'',cu1);
tsellshort(CUPD and tsellholdingex('',cu1,1)>0,0,mkt,0,0,'',cu1);
if (hhv(topenprofit,tenterbars+1)-topenprofit)/hhv(topenprofit,tenterbars+1)>=0.2 and tbuyholdingex('',cu1,1)>0 then begin
tsell(1,tbuyholdingex('',cu1,1),mkt,0,0,'',cu1);
end
if (hhv(topenprofit,tenterbars+1)-topenprofit)/hhv(topenprofit,tenterbars+1)>=0.2 and tsellholdingex('',cu1,1)>0 then begin
tsellshort(1,tsellholdingex('',cu1,1),mkt,0,0,'',cu1);
end
if tavgenterpriceex2('',cu1,0)-c>200*mindiff then begin
tsell(1,tbuyholdingex('',cu1,1),mkt,0,0,'',cu1);
end
if c-tavgenterpriceex2('',cu1,0)>200*mindiff then begin
tsellshort(1,tsellholdingex('',cu1,1),mkt,0,0,'',cu1);
end
WCJ:=tremainqty(0,'',cu1);
if WCJ<>0 then begin
A:=WCJ;
end
if WCJ>0 then begin
tcancelex(1,0,'',cu1);
tbuy(WCJ=0,A,mkt,0,0,'',cu1);
tbuyshort(WCJ=0,A,mkt,0,0,'',cu1);
end
当前持仓量:=tbuyholdingex('',cu1,1)+tsellholdingex('',cu1,1);
当前可用资金:=taccount(19);
debugout('当前持仓量%.2f',当前持仓量 );
debugout('当前可用资金%.2f',当前可用资金 );

 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2014/7/14 8:59:56    Post IP:58.246.57.26[只看该作者]

你本地编译通过即算作无问题


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部