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


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

   

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


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

主题:固定轮询问题

帅哥哟,离线,有人找我吗?
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秒下单哪?谢谢

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


加好友 发短信
等级:管理员 帖子:26632 积分:0 威望:0 精华:7 注册:2015/4/9 14:59:07
  发帖心情 Post By:2016/9/23 14:33:49 [只看该作者]

你理解的有点偏差。固定时间间隔,是间隔相同时间检测信号是否触发。

你是想提前60秒下单。可以考虑使用软件中带的走完k提前n秒下单(专业版功能)

或者在策略中用代码实现。

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



编程无捷径,技巧靠积累。
 回到顶部
帅哥哟,离线,有人找我吗?
yuanman
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | 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线走完的模式吗?



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


加好友 发短信
等级:管理员 帖子:26632 积分:0 威望:0 精华:7 注册:2015/4/9 14:59:07
  发帖心情 Post By:2016/9/23 14:57:06 [只看该作者]

代码实现的提前几秒下单,需要固定时间间隔的方式。

 

 



编程无捷径,技巧靠积累。
 回到顶部
帅哥哟,离线,有人找我吗?
yuanman
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | 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



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


加好友 发短信
等级:管理员 帖子:26632 积分:0 威望:0 精华:7 注册:2015/4/9 14:59:07
  发帖心情 Post By:2016/9/23 15:35:22 [只看该作者]

可以,这个是一个经典例子


编程无捷径,技巧靠积累。
 回到顶部
帅哥哟,离线,有人找我吗?
yuanman
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | 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

谢谢

 回到顶部
美女呀,离线,留言给我吧!
pyd
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:8439 积分:0 威望:0 精华:0 注册:2014/7/14 13:43:36
  发帖心情 Post By:2016/9/26 10:23:23 [只看该作者]

开平仓顺序写成

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 buy(1,5,thisclose);
if holding>0 and ma5<ma10 then sell(1,1,thisclose);
if holding=0 and ma5<ma10 then buyshort(1,5,thisclose);
end

 回到顶部
帅哥哟,离线,有人找我吗?
yuanman
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | 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

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


加好友 发短信
等级:管理员 帖子:26632 积分:0 威望:0 精华:7 注册:2015/4/9 14:59:07
  发帖心情 Post By:2016/9/26 12:44:12 [只看该作者]

不理解你的代码意图?你是想相同条件中,开多次?还是什么?


编程无捷径,技巧靠积累。
 回到顶部
总数 26 1 2 3 下一页