Rss & SiteMap

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

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

标题:请教:价格回落平仓怎么写?

1楼
wubiao888 发表于:2012/11/28 12:16:50

多头回落平仓:开多后超过20个周期以后,如果价格从最高点回落超过8%,则平多;

空头回落平仓:开空后超过20个周期以后,如果价格从最低点上升超过8%,则平空;

 

 

2楼
jinzhe 发表于:2012/11/28 13:15:16

//开多超过20周期

 

cond1 :=  barslast(开多条件)>20;

cond2 := barslast(开空条件)>20;

价格最高点回落8%

 

//variable:hh=0;

 

if 开多条件 then begin

buy();

hh:=h;

end

 

if h>hh then hh:=h;

 

if (hh-c)/hh>0.08  and  cond1 then begin

sell();

end

//最低点回升8%

variable:ll=0;

if 开空条件 then begin

buyshort();;

ll:=l;

end

 

if l<ll then ll:=l;

 

if (c-l)/l>0.08 and cond2 then

sellshort();

end

 

3楼
wubiao888 发表于:2012/12/1 14:52:02

已经解决,谢谢

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


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