Rss & SiteMap

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

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

标题:帮忙编写下 谢谢

1楼
a77887 发表于:2013/9/28 17:37:39
固定止损:7个跳动点,
移动止盈:盈利20个跳动点后,如果盈利回撤20%就执行止盈,     
2楼
jinzhe 发表于:2013/9/29 10:10:20

写了一个大概的框架,需要把对应的下单条件,下单平仓语句填写进去就行

 

下单条件:=;

variable:n=0;

 

if 下单条件  and holding=0 then begin

   下单语句;

   n:=h;

end

 

if h>n then n:=h;

 

if holding>0 and enterprice-c>7*mindiff then 平仓语句;

 

if n-enterprice>20*mindiff and (n-h)/n<=0.2 then 平仓语句;

[此贴子已经被作者于2013/9/29 10:10:50编辑过]
3楼
a77887 发表于:2013/10/1 10:55:23
弄不懂。。
开多条件:A1 and holding=0 and time<144500 and time>91800;//开多条件
平空条件:A1 and holding<0 ;//平空条件
开空条件:=A2  and holding=0 and time<144500 and time>91800;//开空条件
平多条件:=A2 and holding>0 ;//平多条件


帮忙完整编下 谢谢

4楼
jinzhe 发表于:2013/10/8 8:56:59
开多条件:A1 and holding=0 and time<144500 and time>91800;//开多条件
平空条件:A1 and holding<0 ;//平空条件
开空条件:=A2  and holding=0 and time<144500 and time>91800;//开空条件
平多条件:=A2 and holding>0 ;//平多条件

variable:n=0;

 

if 开多条件  and holding=0 then begin

   buy(1,1,market);

   n:=h;

end

 

if h>n then n:=h;

 

if holding>0 and enterprice-c>7*mindiff then sell(1,0,market);//固定止损多

 

if n-enterprice>20*mindiff and (n-enterprice)/enterprice<=0.2 then sell(1,0,market);//移动止盈多

 

if 平多条件 then sell(holding>0,0,market);

 

 

if 开空条件 and holding=0 then begin

   buyshort(1,1,market);

   n:=l;

end

 

if l<n then n:=l; 

 

if holding<0 and enterprice-c>7*mindiff then sell(1,0,market);//固定止损空

 

if enterprice-n>20*mindiff and (enterprice-n)/n<=0.2 then sell(1,0,market);//移动止盈空

 

if 平空条件 and holding<0 then sellshort(1,0,market);

共4 条记录, 每页显示 10 条, 页签: [1]


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