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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [原创]移动止损后台交易模板

   

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


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

主题:[原创]移动止损后台交易模板

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


加好友 发短信
等级:小飞侠 帖子:1882 积分:3310 威望:0 精华:15 注册:2010/3/15 13:11:56
[原创]移动止损后台交易模板  发帖心情 Post By:2010/11/1 17:18:23    Post IP:123.118.85.229[只看该作者]

以下内容为程序代码:

1 input:stopnum(20,5,50,5);
2 runmode:1;
3
4 if tholding=0 then begin
5     extgbdataset('stopprice',low-stopnum*mindiff);
6     tbuy(1,1,lmt,close);
7 end;
8
9 if tholding>0 then begin
10     if low-stopnum*mindiff>extgbdata('stopprice') then
11         extgbdataset('stopprice',low-stopnum*mindiff);
12     
13     if low<=extgbdata('stopprice') then begin
14         tsell(1,tholding,lmt,extgbdata('stopprice')),orderqueue;
15         tbuyshort(1,1,lmt,extgbdata('stopprice')),orderqueue;
16     end;
17 end;
18
19 if tholding<0 then begin
20     if high+stopnum*mindiff<extgbdata('stopprice') then
21         extgbdataset('stopprice',high+stopnum*mindiff);
22     
23     if high>=extgbdata('stopprice') then begin
24         tsellshort(1,tholding,lmt,extgbdata('stopprice')),orderqueue;
25         tbuy(1,1,lmt,extgbdata('stopprice')),orderqueue;
26     end;    
27 end;
28

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


加好友 发短信
等级:新手上路 帖子:96 积分:413 威望:0 精华:0 注册:2010/3/12 10:56:49
  发帖心情 Post By:2010/11/7 10:32:00    Post IP:182.149.47.141[只看该作者]

通不过


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


加好友 发短信
等级:管理员 帖子:7302 积分:32559 威望:1000 精华:45 注册:2003/12/30 16:34:32
  发帖心情 Post By:2010/11/7 10:39:02    Post IP:116.227.59.25[只看该作者]

将代码前面序号去掉

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


加好友 发短信
等级:蜘蛛侠 帖子:1366 积分:5210 威望:0 精华:7 注册:2010/12/11 18:00:33
  发帖心情 Post By:2011/1/9 1:36:45    Post IP:183.39.138.152[只看该作者]

学习了

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


加好友 发短信 BOO
等级:论坛游民 帖子:378 积分:1856 威望:0 精华:0 注册:2010/1/25 18:04:12
  发帖心情 Post By:2011/1/13 21:19:08    Post IP:123.189.24.212[只看该作者]

...一下就奖励5个金币。。真好啊。

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


加好友 发短信
等级:新手上路 帖子:15 积分:90 威望:0 精华:0 注册:2010/11/4 17:53:02
  发帖心情 Post By:2011/1/14 17:35:08    Post IP:113.124.112.103[只看该作者]


 input:stopnum(20,5,50,5);
 runmode:1;
 
 if tholding=0 then begin
     extgbdataset('stopprice',low-stopnum*mindiff);
     tbuy(1,1,lmt,close);
 end;
 
 if tholding>0 then begin
     if low-stopnum*mindiff>extgbdata('stopprice') then
         extgbdataset('stopprice',low-stopnum*mindiff);
     
     if low<=extgbdata('stopprice') then begin
         tsell(1,tholding,lmt,extgbdata('stopprice')),orderqueue;
         tbuyshort(1,1,lmt,extgbdata('stopprice')),orderqueue;
     end;
 end;

 if tholding<0 then begin
     if high+stopnum*mindiff<extgbdata('stopprice') then
         extgbdataset('stopprice',high+stopnum*mindiff);
    
     if high>=extgbdata('stopprice') then begin
         tsellshort(1,tholding,lmt,extgbdata('stopprice')),orderqueue;
         tbuy(1,1,lmt,extgbdata('stopprice')),orderqueue;
     end;    
 end;

 

 

无法通过!


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


加好友 发短信 BOO
等级:论坛游民 帖子:378 积分:1856 威望:0 精华:0 注册:2010/1/25 18:04:12
  发帖心情 Post By:2011/1/14 21:49:10    Post IP:119.114.113.161[只看该作者]

大于号小于号都改成半角就好了。


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


加好友 发短信
等级:论坛游侠 帖子:421 积分:1318 威望:0 精华:0 注册:2011/1/19 22:31:12
  发帖心情 Post By:2011/2/17 17:33:46    Post IP:113.105.207.44[只看该作者]

哦,原来是这个问题


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


加好友 发短信
等级:新手上路 帖子:80 积分:277 威望:0 精华:0 注册:2011/2/14 21:50:41
  发帖心情 Post By:2011/4/28 15:33:56    Post IP:218.14.53.28[只看该作者]

努力学习!看不懂!


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


加好友 发短信 BOO
等级:论坛游民 帖子:378 积分:1856 威望:0 精华:0 注册:2010/1/25 18:04:12
  发帖心情 Post By:2011/4/29 22:26:20    Post IP:119.114.113.70[只看该作者]

只能是在后台运行啊。

[此贴子已经被作者于2011-4-29 22:38:34编辑过]

 回到顶部