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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件金字塔软件问题提交 → 建议新版 使用多个多秒线!

   

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


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

主题:建议新版 使用多个多秒线!

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


加好友 发短信
等级:小飞侠 帖子:1966 积分:0 威望:0 精华:1 注册:2013/6/15 21:56:35
  发帖心情 Post By:2013/11/21 15:05:24 [显示全部帖子]

这样是不是也可以变相解决;
使用后台程序,用stkindiex(,,,,,,,)来调用不同秒周期的holding。

版主评定:好评,获得4个金币奖励好评,获得4个金币奖励
(理由:奖励)
 回到顶部
帅哥哟,离线,有人找我吗?
qwer123
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小飞侠 帖子:1966 积分:0 威望:0 精华:1 注册:2013/6/15 21:56:35
  发帖心情 Post By:2013/11/21 21:38:52 [显示全部帖子]

好像使用图表交易也可以,我没有实际使用过只是大概觉得这样也可以:

r8:=stkindiex('if00','a1.持仓',0,22,2,1000);
r10:=stkindiex('if00','a2.持仓',0,22,3,1000);
r11:=stkindiex('if00','a3.持仓',0,22,5,1000);
r12:=r8+r10+r11;

hd1:=if(islastbar,4,-0.1);
//********************************
if holding=0 and r12>0 then buy(1,r12,limitr,c+hd1);
if holding=0 and r12<0 then buyshort(1,abs(r12),limitr,c-hd1);

if holding>0 and r12>0 and holding>r12 then sell(1,holding-r12,limitr,c-hd1);
if holding>0 and r12>0 and holding<r12 then buy(1,r12-holding,limitr,c+hd1);
if holding>0 and r12<0 then
begin
sell(1,holding,limitr,c-hd1);
buyshort(1,abs(r12),limitr,c-hd1);
end

if holding<0 and r12<0 and holding>r12 then buyshort(1,holding-r12,limitr,c-hd1);
if holding<0 and r12<0 and holding<r12 then sellshort(1,r12-holding,limitr,c+hd1);
if holding<0 and r12>0 then
begin
sellshort(1,holding,limitr,c+hd1);
buy(1,r12,limitr,c+hd1);
end 


用图表时一定要先有虚拟仓位,才能对其平仓,否则就会出问题。要用固定轮询!
[此贴子已经被作者于2013/11/21 21:40:25编辑过]

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


加好友 发短信
等级:小飞侠 帖子:1966 积分:0 威望:0 精华:1 注册:2013/6/15 21:56:35
  发帖心情 Post By:2013/11/21 21:41:41 [显示全部帖子]

hd1:=if(islastbar,4,0.1);

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


加好友 发短信
等级:小飞侠 帖子:1966 积分:0 威望:0 精华:1 注册:2013/6/15 21:56:35
  发帖心情 Post By:2013/11/21 21:46:59 [显示全部帖子]

为例防止一根k线上出现很多操作,这个程序最好使用在分笔数据上,当然用再秒级的k线上也是可以的。

 回到顶部