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


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

   

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


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

主题:[原创]

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


加好友 发短信
等级:新手上路 帖子:10 积分:55 威望:0 精华:0 注册:2013/3/1 13:38:56
[原创]  发帖心情 Post By:2013/3/1 13:49:47    Post IP:14.23.246.88[只看该作者]

老师;请教1个模型的编写:交易周期15分钟周期,交易手数:2手,每天开仓只一次。交易思路:在每天开盘半小时后,接下来超过前半小时最高价1个点做多,低于前半小时最低价1个点做空。止损都是15个点。盈利脱离开仓价15个点止损就调到开仓价。盈利高过开仓价30点,止盈1手,超过70点止盈另1手,没到止损 止盈价,就以收盘前1分钟的收盘价平仓。谢谢老师!


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


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

请稍等,工作人员处理中


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

客户服务部

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

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

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


加好友 发短信
等级:新手上路 帖子:10 积分:55 威望:0 精华:0 注册:2013/3/1 13:38:56
  发帖心情 Post By:2013/3/1 14:44:05    Post IP:14.23.246.88[只看该作者]

谢谢老师,辛苦了!图片点击可在新窗口打开查看

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


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

input:n(2,1,100);
variable:n1=0;//计算次数

zuigao:valuewhen(time<=094500,hhv(h,todaybar));//前半个小时最高价
zuidi:valuewhen(time<=094500,llv(l,todaybar));//前半个小时最高价

if h>zuigao and todaybar>2 and n1=0 and time<151500 then begin
 buy(holding=0,1,market);
 n1:=1;
end

if l<zuidi and todaybar>2 and n1=0 and time<151500 then begin
 buyshort(holding=0,1,market);
 n1:=1;
end

if c-enterprice>=15*mindiff and holding<0 then sellshort(holding<0,0,market);

if enterprice-c>=15*mindiff and holding>0 then sell(holding>0,0,market);//止损

if c-enterprice>=30*mindiff and holding>0 then sell(holding>0,0,market);

if enterprice-c>=30*mindiff and holding<0 then sellshort(holding<0,0,market);//止盈

if time>=151500 then begin
 sell(holding>0,0,market);
 sellshort(holding<0,0,market);
 n1:=0;
end

if datatype<>3 then exit;

 

 

 

1盈利脱离开仓价15个点止损就调到开仓价,这句不懂

2一天只开一手仓,那么70点的二次止盈就没啥用了。


 



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

客户服务部

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

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

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


加好友 发短信
等级:新手上路 帖子:10 积分:55 威望:0 精华:0 注册:2013/3/1 13:38:56
  发帖心情 Post By:2013/3/1 15:29:30    Post IP:14.23.246.88[只看该作者]

原则:一天做多或做空空只开一次仓,交易手数:2手。如果做多,高过15点就把止损调到开仓价;如果做空,价格低过15点止损也调到开仓价。如果盈利有30点就先平1手,盈利到70点就平另1手。

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


加好友 发短信
等级:新手上路 帖子:10 积分:55 威望:0 精华:0 注册:2013/3/1 13:38:56
  发帖心情 Post By:2013/3/1 15:31:08    Post IP:14.23.246.88[只看该作者]

谢谢老师:不知我表述清楚了吗?

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


加好友 发短信
等级:新手上路 帖子:10 积分:55 威望:0 精华:0 注册:2013/3/1 13:38:56
  发帖心情 Post By:2013/3/1 16:14:14    Post IP:14.23.246.88[只看该作者]

请教老师:模型编写完了吗?谢谢!

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


加好友 发短信
等级:新手上路 帖子:10 积分:55 威望:0 精华:0 注册:2013/3/1 13:38:56
  发帖心情 Post By:2013/3/1 16:32:20    Post IP:14.23.246.88[只看该作者]

怎么没有回复呀?图片点击可在新窗口打开查看

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


加好友 发短信
等级:新手上路 帖子:10 积分:55 威望:0 精华:0 注册:2013/3/1 13:38:56
  发帖心情 Post By:2013/3/1 16:39:22    Post IP:14.23.246.88[只看该作者]

老师:在吗?

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


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

input:n(2,1,100);
variable:n1=0,n2=0;//计算次数
variable:yingli=0;
zuigao:valuewhen(time<=094500,hhv(h,todaybar));//前半个小时最高价
zuidi:valuewhen(time<=094500,llv(l,todaybar));//前半个小时最高价

if h>zuigao and todaybar>2 and n1=0 and time<151500 and holding=0 then begin
 buy(holding=0,1,market);
 yingli:=c-enterprice;
 n1:=1;
end

if c-enterprice>yingli then yingli:=c-enterprice;
if l<zuidi and todaybar>2 and n2=0 and time<151500 and holding=0 then begin
 buyshort(holding=0,1,market);
 n2:=1;
 yingli:=enterprice-c;
end
if enterprice-c>yingli then yingli:=enterprice;

if c-enterprice>=15*mindiff and holding<0 then sellshort(holding<0,0,market);

if enterprice-c>=15*mindiff and holding>0 then sell(holding>0,0,market);//止损

if yingli>15*mindiff and c<enterprice then sell(holding>0,0,market);

if yingli>15*mindiff and c>enterprice then sellshort(holding<0,0,market);//盈利15点后的止损

if c-enterprice>=30*mindiff and holding>0 then sell(holding>0,0,market);

if enterprice-c>=30*mindiff and holding<0 then sellshort(holding<0,0,market);//止盈

if c-enterprice>=70*mindiff and holding>0 then sell(holding>0,0,market);

if enterprice-c>=70*mindiff and holding<0 then sellshort(holding<0,0,market);//二次止盈


if time>=151500 then begin
 sell(holding>0,0,market);
 sellshort(holding<0,0,market);
 n1:=0;
 n2:=0;
end

if datatype<>3 then exit;

 



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

客户服务部

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

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

 回到顶部
总数 14 1 2 下一页