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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]

   

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


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

主题:[求助]

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


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2012/4/11 8:59:47    Post IP:58.246.57.26[显示全部帖子]

工作人员在处理,稍后回复


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

客户服务部

-----------------------------------------------------------

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

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
just
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2012/4/11 10:31:03    Post IP:58.246.57.26[显示全部帖子]

http://www.weistock.com/bbs/dispbbs.asp?BoardID=11&ID=7320&skin=0 参考TB改金字塔的三级止损写法。


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

客户服务部

-----------------------------------------------------------

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

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
just
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2012/4/11 16:32:33    Post IP:58.246.57.26[显示全部帖子]

把你的思路写出来看看。


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

客户服务部

-----------------------------------------------------------

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

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
just
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:金字塔养老院 帖子:1323 积分:6764 威望:0 精华:0 注册:2011/6/14 17:27:11
  发帖心情 Post By:2012/4/12 10:06:59    Post IP:58.246.57.26[显示全部帖子]

variable:zs=c,hl=c;
hi20:=ref(hhv(h,20),1);
lo20:=ref(llv(l,20),1);
if holding>0 and l<zs then sell(1,1,limitr,min(o,zs)-mindiff);//止损
if holding<0 and h>zs then sellshort(1,1,limitr,max(o,zs)+mindiff);//止损
if holding>0 and l<lo20 then sell(1,1,limitr,min(o,lo20)-mindiff);//离场
if holding<0 and h>hi20 then sellshort(1,1,limitr,max(o,hi20)+mindiff);//离场
if holding=0 and h>hi20 then begin//开多
 buy(1,1,limitr,max(o,hi20)+mindiff);
 hl:=h;//记录开仓后的最高点
 zs:=enterprice*(1-20/1000);//多头初始止损
 end
if holding=0 and l<lo20 then begin//开空
 buyshort(1,1,limitr,min(o,lo20)-mindiff);
 hl:=l;//记录开仓后的最低点
 zs:=enterprice*(1+20/1000);//空头初始止损
end
if holding>0 and h>hl then begin//上移最高点
 hl:=h;
 if hl>enterprice*(1+30/1000) then zs:=enterprice;//保本止损位
else if hl>enterprice*(1+50/1000)then zs:=enterprice*(1+50/1000);//移动止损
end
if holding<0 and l<hl then begin
 hl:=l;
 if hl<enterprice*(1-30/1000) then zs:=enterprice;//保本止损位
 else if hl<enterprice*(1-50/1000) then zs:=enterprice*(1-50/1000);//移动止损
end

 

[此贴子已经被作者于2012-4-12 10:07:42编辑过]


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

客户服务部

-----------------------------------------------------------

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

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