Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共10 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

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

1楼
z7c9 发表于:2010/11/1 17:18:23
以下内容为程序代码:

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
2楼
CITSCWB 发表于:2010/11/7 10:32:00

通不过

3楼
admin 发表于:2010/11/7 10:39:02
将代码前面序号去掉
4楼
guotx2010 发表于:2011/1/9 1:36:45
学习了
5楼
xian_0_9 发表于:2011/1/13 21:19:08
...一下就奖励5个金币。。真好啊。
6楼
szstock2002 发表于:2011/1/14 17:35:08


 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;

 

 

无法通过!

7楼
xian_0_9 发表于:2011/1/14 21:49:10

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

8楼
伍星亮 发表于:2011/2/17 17:33:46

哦,原来是这个问题

9楼
淡定688 发表于:2011/4/28 15:33:56

努力学习!看不懂!

10楼
xian_0_9 发表于:2011/4/29 22:26:20

只能是在后台运行啊。

[此贴子已经被作者于2011-4-29 22:38:34编辑过]
共10 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03906 s, 3 queries.