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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件金字塔软件问题提交 → 固定轮询问题

   

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


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

主题:固定轮询问题

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
固定轮询问题  发帖心情 Post By:2016/9/23 14:15:29 [显示全部帖子]

请问固定轮询的是怎样计算的?如果我是15分钟周期的模型,想实现60秒下单,我设置840秒的间隔,是不是在出现信号的时候可以实现提前60秒下单哪?谢谢

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/23 14:40:53 [显示全部帖子]

input:tq(5,3,60,1);//TQ即为您要提前的秒数
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);

这个代码可以用在K线走完的模式吗?



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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/23 15:24:58 [显示全部帖子]

请教老师;论坛上的阿火秘籍中的提前下单方法是否可以实现?

ma5:=ma(c,5);
ma10:=ma(c,10);
input:tq(5,3,60,1);
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);

if abb then begin
  if holding>0 and ma5<ma10 then sell(1,1,thisclose);
  if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
  if holding=0 and ma5>ma10 then buy(1,1,thisclose);
  if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);

end



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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/26 9:45:13 [显示全部帖子]

请老师指点;我是15分钟周期,要提前10秒下单,每次开仓5手,

abb:=(time0-timetot0(dynainfo(207))<=10) or not(islastbar);
if abb then begin
  if holding>0 and ma5<ma10 then sell(1,1,thisclose);
  if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
  if holding=0 and ma5>ma10 then buy(1,5,thisclose);
  if holding=0 and ma5<ma10 then buyshort(1,5,thisclose);
end

谢谢

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/26 11:23:53 [显示全部帖子]

如果我有多个平多,平空。开多,开空这样编写对吗?谢谢老师!

abb:=(time0-timetot0(dynainfo(207))<=10) or not(islastbar);
if abb then begin
if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);

if holding=0 and ma5>ma10 then buy(1,5,thisclose);
if holding=0 and ma5>ma10 then buy(1,5,thisclose);

if holding>0 and ma5<ma10 then sell(1,1,thisclose);
if holding>0 and ma5<ma10 then sell(1,1,thisclose);
if holding>0 and ma5<ma10 then sell(1,1,thisclose);

if holding=0 and ma5<ma10 then buyshort(1,5,thisclose);
if holding=0 and ma5<ma10 then buyshort(1,5,thisclose);
end

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/26 13:19:16 [显示全部帖子]

抱歉,没表示清楚,应该是这样;开平仓的条件都是不同的,刚才图省事没写明白;
如果我有多个平多,平空。开多,开空这样编写对吗?谢谢老师!

abb:=(time0-timetot0(dynainfo(207))<=10) or not(islastbar);
if abb then begin
if holding<0 and  aa then sellshort(1,1,thisclose);
if holding<0 and  bb then sellshort(1,1,thisclose);
if holding<0 and  cc then sellshort(1,1,thisclose);

if holding=0 and  dd  then buy(1,5,thisclose);
if holding=0 and  ee then buy(1,5,thisclose);

if holding>0 and  ff  then sell(1,1,thisclose);
if holding>0 and  ss then sell(1,1,thisclose);
if holding>0 and  nn then sell(1,1,thisclose);

if holding=0 and  hh then buyshort(1,5,thisclose);
if holding=0 and  kk then buyshort(1,5,thisclose);
end

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/26 13:51:04 [显示全部帖子]

谢谢老师!

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/26 16:16:57 [显示全部帖子]

遇到新问题,测试通不过,按提示是REF,MA等带有统计性质的函数以及指标公式引用无法直接使用在IF语句之中.我没在if语句中使用,为什么不行?我的模型中这样的函数不少,要怎么样改?谢谢!

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20160926160906.png
图片点击可在新窗口打开查看

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/26 16:18:36 [显示全部帖子]

我是按老师指点的这样编写,对吗?
if holding>0 and pk1 or pk2 or pk3 or pk4 or pk5 or pk6 or pk7 or pk8 or pk9 then sell(1,1,thisclose);//平多
if holding=0 and kk1 or kk2 or kk3 or kk4 or kk5 or kk6 then buyshort(1,5,thisclose);//开空
if holding<0 and pd1 or pd2 or pd3 or pd4 or pd5 or pd6 or pd7 or pd8 or pd9 then sellshort(1,1,thisclose);
if holding=0 and kd1 or kd2 or kd3 or kd4 or kd5 or kd6 then buy(1,5,thisclose);

end

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


加好友 发短信
等级:论坛游侠 帖子:424 积分:0 威望:0 精华:0 注册:2015/10/20 13:25:28
  发帖心情 Post By:2016/9/26 16:40:57 [显示全部帖子]

老师,我上面也是这样写的,没有直接写在If语句里啊?

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