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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请教专家们

   

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


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

主题:请教专家们

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


加好友 发短信
等级:新手上路 帖子:59 积分:358 威望:0 精华:0 注册:2012/4/13 14:03:48
请教专家们  发帖心情 Post By:2012/9/10 20:57:13    Post IP:119.119.242.27[只看该作者]

A是买开卖平条件

B是卖开卖平条件

请专家们看看下面的下单控制(抄别的公式)是不是对的,是不是单反了或有什么明显错误。最好翻译一下

 

longcond:=A;

shortcond:=B


if holding=0 then begin
 if longcond then
  buy(1,1,limitr,open);
end

if holding=0 then begin
 if shortcond then
  buyshort(1,1,limitr,open);
end

if holding>0 then begin
 if shortcond then begin
  sell(1,holding,limitr,open);
  buyshort(1,1,limitr,open);
 end
 
 if time=150000 then
  sell(1,holding,limitr,open);
end

if holding<0 then begin
 if longcond then begin
  sellshort(1,holding,limitr,open);
  buy(1,1,limitr,open);
 end
 
 if time=150000 then
  sellshort(1,holding,limitr,open);
end
   
收益:asset,noaxis,colorred;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;


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


加好友 发短信
等级:新手上路 帖子:59 积分:358 威望:0 精华:0 注册:2012/4/13 14:03:48
  发帖心情 Post By:2012/9/10 21:11:10    Post IP:119.119.242.27[只看该作者]

请专家能解释一下上面的语句


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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
请教一个统计数据的编写  发帖心情 Post By:2012/9/11 9:15:31    Post IP:58.246.57.26[只看该作者]


longcond:=A;//做多条件

shortcond:=B;//做空条件


if holding=0 then begin
 if longcond then
  buy(1,1,limitr,open);
end//当无持仓时满足多头条件开多

if holding=0 then begin
 if shortcond then
  buyshort(1,1,limitr,open);
end//当无持仓时满足空头条件开空

if holding>0 then begin
 if shortcond then begin
  sell(1,holding,limitr,open);
  buyshort(1,1,limitr,open);
 end //当有多仓时满足空头条件平多开空
 
 if time=150000 then
  sell(1,holding,limitr,open);
end//收盘时平掉多仓,这里改为time>=145500比较好

if holding<0 then begin
 if longcond then begin
  sellshort(1,holding,limitr,open);
  buy(1,1,limitr,open);
 end//当有空仓时满足多头条件平空开多
 
 if time=150000 then
  sellshort(1,holding,limitr,open);
end//收盘前平仓,同样修改下时间比较好
   
收益:asset,noaxis,colorred;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;
// 各种参数



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

客户服务部

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

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

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


加好友 发短信
等级:新手上路 帖子:59 积分:358 威望:0 精华:0 注册:2012/4/13 14:03:48
  发帖心情 Post By:2012/9/11 10:05:08    Post IP:218.60.148.214[只看该作者]

谢谢老师


 回到顶部