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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 用于日内交易的公式请老师 帮忙编写一个谢谢

   

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


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

主题:用于日内交易的公式请老师 帮忙编写一个谢谢

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/11/30 13:11:15    Post IP:180.169.30.6[显示全部帖子]

if openint=hhv(openint,todaybar) and h=hhv(h,todaybar) then buy(1,1,market);


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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/11/30 15:26:12    Post IP:116.231.212.45[显示全部帖子]


n1:=todaybar;

dm:=4-INTPART(LOG(C));

jj:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm);

zf:=abs((c-ref(c,todaybar))/ref(c,todaybar));

if todaybar>15 and h=hhv(h,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 sellshort(1,0,market);
 buy(holding=0,1,market);
end

if cross(jj,c) or (c<enterprice*0.99) then sell(1,0,thisclose);
if c>=enterprice*1.01 then sell(1,0,thisclose);
if hhv(h,enterbars+1)>=enterprice*1.03 and c<=enterprice*1.02 then sell(1,0,thisclose);


if todaybar>15 and l=llv(l,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 sell(1,0,market);
 buyshort(holding=0,1,market);
end

if cross(close,jj) or (c>=enterprice*1.01) then sellshort(1,0,thisclose);
if c<=enterprice*0.99 then sellshort(1,0,thisclose);
if llv(l,enterbars+1)<=enterprice*0.97 and c>=enterprice*0.98 then sellshort(1,0,thisclose);


if (time=closetime(1)) or (time=closetime(0)) then begin
 sell(1,0,thisclose);
 sellshort(1,0,thisclose);
end

 



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 9:45:57    Post IP:180.169.30.6[显示全部帖子]

请定义下保本止损的概念,以及和移动止损的区别



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 9:46:10    Post IP:180.169.30.6[显示全部帖子]

后台交易请用户出示专业版帐号


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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 10:43:52    Post IP:180.173.193.42[显示全部帖子]

n1:=todaybar;

dm:=4-INTPART(LOG(C));

jj:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm);

zf:=abs((c-ref(c,todaybar))/ref(c,todaybar));

if todaybar>15 and h=hhv(h,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 sellshort(1,0,market);
 buy(holding=0,1,market);
end

if cross(jj,c) or (c<enterprice*0.99) then sell(1,0,thisclose);
if hhv(h,enterbars+1)>=enterprice*1.01 and c<=enterprice*1.01 and c>enterprice then sell(1,0,thisclose);
if hhv(h,enterbars+1)>=enterprice*1.03 and c<=enterprice*1.02 then sell(1,0,thisclose);


if todaybar>15 and l=llv(l,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 sell(1,0,market);
 buyshort(holding=0,1,market);
end

if cross(close,jj) or (c>=enterprice*1.01) then sellshort(1,0,thisclose);
if llv(l,enterbars+1)<=enterprice*0.99 and c>=enterprice*0.99 and c>enterprice then sellshort(1,0,thisclose);
if llv(l,enterbars+1)<=enterprice*0.97 and c>=enterprice*0.98 then sellshort(1,0,thisclose);


if (time=closetime(1)) or (time=closetime(0)) then begin
 sell(1,0,thisclose);
 sellshort(1,0,thisclose);
end



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 10:47:49    Post IP:116.231.212.45[显示全部帖子]

改成后台的:

 

n1:=todaybar;

dm:=4-INTPART(LOG(C));

jj:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm);

zff:=abs((c-ref(c,todaybar))/ref(c,todaybar));

zf:=abs(dynainfo(14));

if todaybar>15 and h=hhv(h,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 tsellshort(1,0,mkt);
 tbuy(tbuyholding(0)=0,1,mkt);
end

if cross(jj,c) or (c<tenterprice*0.99) then tsell(1,0,mkt);
if hhv(h,tenterbars+1)>=tenterprice*1.01 and c<=tenterprice*1.01 and c>tenterprice then tsell(1,0,mkt);
if hhv(h,tenterbars+1)>=tenterprice*1.03 and c<=tenterprice*1.02 then tsell(1,0,mkt);


if todaybar>15 and l=llv(l,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 tsell(1,0,mkt);
 tbuyshort(tsellholding(0)=0,1,mkt);
end

if cross(close,jj) or (c>=tenterprice*1.01) then tsellshort(1,0,mkt);
if llv(l,tenterbars+1)<=tenterprice*0.99 and c>=tenterprice*0.99 and c>tenterprice then tsellshort(1,0,mkt);
if llv(l,tenterbars+1)<=tenterprice*0.97 and c>=tenterprice*0.98 then tsellshort(1,0,mkt);
if (time=closetime(1)) or (time=closetime(0)) then begin
 tsell(1,0,mkt);
 tsellshort(1,0,mkt);
end



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 11:16:53    Post IP:180.169.30.6[显示全部帖子]

n1:=todaybar;

dm:=4-INTPART(LOG(C));

jj:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),2+dm);

zff:=abs((c-ref(c,todaybar))/ref(c,todaybar));

zf:=abs(dynainfo(14));

if todaybar>15 and h=hhv(h,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 tsellshort(1,0,mkt);
 tbuy(tbuyholding(0)=0,1,mkt);
end

if cross(jj,c) or (c<tenterprice*0.99) then tsell(1,0,mkt);
if hhv(h,tenterbars+1)>=tenterprice*1.01 and c<=tenterprice*1.01 and c>tenterprice and hhv(h,tenterbars+1)<=tenterprice*1.03 then tsell(1,0,mkt);
if hhv(h,tenterbars+1)>=tenterprice*1.03 and c<=(((hhv(h,tenterbars+1)-tenterprice)/tenterprice)-0.01)*tenterprice then tsell(1,0,mkt);


if todaybar>15 and l=llv(l,todaybar) and openint=hhv(openint,todaybar) and zf<=0.03 then begin
 tsell(1,0,mkt);
 tbuyshort(tsellholding(0)=0,1,mkt);
end

if cross(close,jj) or (c>=tenterprice*1.01) then tsellshort(1,0,mkt);
if llv(l,tenterbars+1)<=tenterprice*0.99 and c>=tenterprice*0.99 and c>tenterprice and llv(l,tenterbars+1)>=tenterprice*0.97  then tsellshort(1,0,mkt);
if llv(l,tenterbars+1)<=tenterprice*0.97 and c>=(((tenterprice-llv(l,tenterbars+1))/tenterprice)+0.01)*tenterprice then tsellshort(1,0,mkt);
if (time=closetime(1)) or (time=closetime(0)) then begin
 tsell(1,0,mkt);
 tsellshort(1,0,mkt);
end




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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 11:46:02    Post IP:180.169.30.6[显示全部帖子]

以下是引用lqi1000在2016-11-30 15:15:29的发言:
老师 我刚接触程序化 是个新手  请您帮忙把我一个简单的策略写出来 
1多头,开盘15分钟后价格创日内新高的同时分时图的持仓量也同步创新高并且涨跌幅的绝对值小于3% 则平空开多 。然后固定止损开仓价回撤1%或者跌破分时均价线平仓。  保本止损:如果盈利大于1%则止损价为开仓价。 移动止损: 如果盈利幅度大于3% ,则回撤1%就平仓。   下午三点收盘平仓, 夜盘收盘平仓 。  
2空头,开盘15分钟后价格创日内新低的同时分时图的持仓量也创新高并且涨跌幅的绝对值小于3% 则平多开空。 然后固定止损开仓价回撤1%或者上穿分时均价线平仓。  保本止损:如果盈利大于1%则止损价为开仓价。 移动止损: 如果盈利幅度大于3%, 则回撤1%就平仓  。 下午三点收盘平仓, 夜盘收盘平仓 。

因为在这里没看到你讲有跌停价平仓, 如果后面回复有新加的条件,麻烦标注下



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 11:48:04    Post IP:180.169.30.6[显示全部帖子]

以下是引用lqi1000在2016-12-2 11:39:17的发言:
改成这样可以吗?if hhv(h,tenterbars+1)>=tenterprice*1.01 and  hhv(h,tenterbars+1)<=tenterprice*1.03 and c<tenterprice then tsell(1,0,mkt);

要保本那么多头要c>tenterprice,空头要c<tenterprice,你反过来了

 



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/2 13:47:46    Post IP:180.169.30.6[显示全部帖子]

那就按照你的想法写好了


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

客户服务部

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

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

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