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


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

   

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


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

主题:请教老师!!!!

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


加好友 发短信
等级:新手上路 帖子:14 积分:0 威望:0 精华:0 注册:2015/11/29 23:57:20
请教老师!!!!  发帖心情 Post By:2015/12/30 12:23:24    Post IP:27.195.44.72[只看该作者]

问题1.
        日盘:止损2次不再开仓,止盈1次不再开仓,收盘前提前一根K线平仓;
        夜盘:止损2次不再开仓,止盈1次不再开仓,收盘前提前一根K线平仓;
问题2.
       如果品种为橡胶   参数M=8,品种为白糖   参数M=6,品种为甲醇   参数M=3;

请问老师如何表达??O(∩_∩)O谢谢

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


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

1.根据需求要这样写,必须在止盈止损语句里面加上全局变量计算

variable:dy=0,ds=0;
variable:yy=0,ys=0;

if 多头止损条件 and holding>0   then begin
 sell(1,0,market);
 if time>010000 and time<=063000 then ys:=ys+1;
 if time>130000 and time<=190000 then ds:=ds+1;
end

if 空头止损条件 and holding<0   then begin
 sellshort(1,0,market);
 if time>010000 and time<=063000 then ys:=ys+1;
 if time>130000 and time<=190000 then ds:=ds+1;
end

if 多头止赢条件 and holding>0   then begin
 sell(1,0,market);
 if time>010000 and time<=063000 then yy:=yy+1;
 if time>130000 and time<=190000 then dy:=dy+1;
end

if 空头止赢条件 and holding<0   then begin
 sellshort(1,0,market);
 if time>010000 and time<=063000 then yy:=yy+1;
 if time>130000 and time<=190000 then dy:=dy+1;
end

if time=closetime(1) then begin
 yy:=0;
 ys:=0;
end

if time=closetime(0) then BEGIN
    dy:=0;
    ds:=0;
end

 

 

需要在开仓条件里面加上 (ds<2 or ys<2 or dy<1 or dy<1)

 

 

2.

nn:=STRLEN(stklabel);
ss:=strleft(stklabel,nn-2);


if stricmp(ss,'rb')=0 then m:=8;
if stricmp(ss,'srx')=0 then m:=6;
if stricmp(ss,'ma')=0 then m:=8;



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

客户服务部

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

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

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


加好友 发短信
等级:新手上路 帖子:14 积分:0 威望:0 精华:0 注册:2015/11/29 23:57:20
  发帖心情 Post By:2015/12/30 13:31:53    Post IP:27.195.44.72[只看该作者]

谢谢,老师辛苦!!

 回到顶部