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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请问如何表达

   

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


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

主题:请问如何表达

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


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

哪个品种,哪个周期,几月几日的信号?
[此贴子已经被作者于2014/8/8 9:40:47编辑过]

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


加好友 发短信
等级:论坛游民 帖子:226 积分:0 威望:0 精华:0 注册:2014/8/4 16:49:30
  发帖心情 Post By:2014/8/8 9:46:28    Post IP:219.137.134.238[只看该作者]

上图中标注的是: 期指连续,1分钟,14年8月5日

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


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

稍微改了下

VARIABLE:n:=0,m:=0,en:=0,ex:=0;
TT:=time<=145500;

H1:=hhv(h, todaybar);
if h1-L>=12 and n=0 and TT and holding=0 THEN
begin
buyshort(1,1,market);
n:=1;
en:=enterbars;
end

L1:=llv(L,todaybar);
if h-L1>=12 and m=0 and TT and holding=0 then
begin
buy(1,1,market);
m:=1;
en:=enterbars;
end


 

L2:=LLv(L,en+1);
if (H-L2>=6 or H-enterprice >=4) and en>1 and holding<0 then
begin
 sellshort(1,1,market);
 ex:=exitbars;
 end

H2:=hhv(h,ex+1);
if H2-L>=12 and TT and ex>1 and holding=0 then
BEGIN
 buyshort(1,1,market);
en:=enterbars;
end

if H-L2>=12 and TT and ex>1 and holding=0 then
begin
buy(1,1,market);
en:=enterbars;
end

L3:=LLv(L,ex+1);
if L3<=L2 and H2-L3<12 and H-L3>=12 and TT and ex>1 and holding=0 then
begin
buy(1,1,market);
en:=enterbars;
end

HH2:=hhv(h,en+1);

if (HH2-L>=6 or enterprice-L>=4) and en >1 and holding>0 then
begin
sell(1,1,market);
ex:=exitbars;
end

LL2:=llv(L,ex+1);
if h-LL2>=12 and TT and ex>1 and holding=0 then
begin
 buy(1,1,market);
 en:=enterbars;
 end

if HH2-L>=12 and TT and ex>1 and holding=0 then
begin
buyshort(1,1,market);
en:=enterbars;
end

HH3:=hhv(h,ex+1);
if HH3>=HH2 and HH3<LL2+12 and L<=HH3-12 and TT and ex>1 and holding=0 then
begin
 buyshort(1,1,market);
 en:=enterbars;
 end

if time>150000 and holding>0 THEN
begin
sell(1, 0, market);
ex:=exitbars;
end

if time>150000 and holding<0 THEN
begin
sellshort(1, 0, market);
ex:=exitbars;
end


if time=closeTIME(0) then
begin
n:=0;
m:=0;
en:=0;
ex:=0;
end


 

[此贴子已经被作者于2014/8/8 10:04:42编辑过]

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


加好友 发短信
等级:论坛游民 帖子:226 积分:0 威望:0 精华:0 注册:2014/8/4 16:49:30
  发帖心情 Post By:2014/8/8 10:15:32    Post IP:219.137.134.238[只看该作者]

有没有测试一下?还是不行阿

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


加好友 发短信
等级:论坛游民 帖子:226 积分:0 威望:0 精华:0 注册:2014/8/4 16:49:30
  发帖心情 Post By:2014/8/8 10:16:33    Post IP:219.137.134.238[只看该作者]

一天1个信号

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


加好友 发短信
等级:论坛游民 帖子:226 积分:0 威望:0 精华:0 注册:2014/8/4 16:49:30
  发帖心情 Post By:2014/8/8 10:49:05    Post IP:219.137.134.238[只看该作者]

有没有再看看,谢谢

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


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

之前的用全局变量有问题,改后

VARIABLE:n:=0,m:=0;

TT:=time<=145500;

H1:=hhv(h, todaybar);
afd:h1-L>=12 and n=0 and holding=0;
if h1-L>=12 and n=0 and holding=0 THEN
begin
buyshort(1,1,market);
n:=1;
end
L1:=llv(L,todaybar);
if h-L1>=12 and m=0 and holding=0 then
begin
buy(1,1,market);
m:=1;
end

b1:=min(enterbars+1,TODAYBAR);
L2:=LLv(L,b1);
if (H-L2>=6 or H-enterprice >=4) and enterbars >1 then sellshort(holding<0,1,market);
b2:=min(exitbars+1,todaybar);
H2:=hhv(h,b2);

if H2-L>=12 and TT and exitbars>1 then buyshort(holding=0,1,market);

if H-L2>=12 and TT and exitbars>1 then buy(holding=0,1,market);

L3:=LLv(L,b2);
if L3<L2 and H2-L3<12 and H-L3>12 and TT and exitbars>1 then buy(holding=0,1,market);

HH2:=hhv(h,b1);

if (HH2-L>=6 or enterprice-L>=4) and enterbars >1 then sell(holding>0,1,market);

LL2:=llv(L,b2);

if h-LL2>=12 and TT and exitbars>1 then buy(holding=0,1,market);
if HH2-L>=12 and TT and exitbars>1 then buyshort(holding=0,1,market);

HH3:=hhv(h,b2);

if HH3>HH2 and HH3<LL2+12 and L<HH3-6 and TT and exitbars>1 then buyshort(holding=0,1,market);

sell(time>150000 and holding>0, 0, market);
sellshort(time>150000 and holding<0, 0, market);

if time=closetime(0) then begin
n:=0;
m:=0;
end


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


加好友 发短信
等级:论坛游民 帖子:226 积分:0 威望:0 精华:0 注册:2014/8/4 16:49:30
  发帖心情 Post By:2014/8/8 11:31:15    Post IP:219.137.134.238[只看该作者]

谢谢,己经非常好了

还有些小问题

下图中第一个平空后为什么会有一个开空(8月7日)


图片点击可在新窗口打开查看此主题相关图片如下:图像 001.gif
图片点击可在新窗口打开查看


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


加好友 发短信
等级:论坛游民 帖子:226 积分:0 威望:0 精华:0 注册:2014/8/4 16:49:30
  发帖心情 Post By:2014/8/8 13:12:36    Post IP:219.137.134.238[只看该作者]

有没有再看看,谢谢

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


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

平多仓之后的最低价(C1点)升12点开多 或者 平多仓之前与上次开仓后之间的最高点(B1点)跌12点开空 或者 平多仓之后的最高。。。。。

是红字部分开的空,对应的代码是if HH2-L>=12 and TT and exitbars>1 then buyshort(holding=0,1,market);
这个图上输出是满足条件开空。


图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看

 回到顶部
总数 95 上一页 1 2 3 4 5 6 7 8 9 10 下一页