Rss & SiteMap

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

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

标题:[求助]止损线

1楼
xian_0_9 发表于:2011/5/24 21:12:03

bline:=IF(holding>0,HHV(HIGH,TYPEBAR(1,1))-round(enterprice/w)*mindiff,L-round(enterprice/w)*mindiff);//多单移动止损线
PARTLINE( holding>0, bline, colorrgb(255,0,0));

pd:=(holding>0 and bline>c);

//开空仓条件:
kk:=l<ol and holding=0 and entertime ;


//平空仓条件:
sline:=IF(holding<0,LLV(LOW,TYPEBAR(1,3))+round(enterprice/w)*mindiff,H+round(enterprice/w)*mindiff);//空单移动止损线
PARTLINE(holding<0, sline, colorrgb(0,255,0));

pk:=(holding<0 and sline<c);

sell(pd,holding>0,limitr,c );      //平多
sellshort(pk,holding<0,limitr,c); //平空

这么写只能是收盘过止损线 才会出信号。如何写成触发止损线就平呢?要图表显示和实际一样的。

2楼
阿火 发表于:2011/5/24 21:52:15

pd:=(holding>0 and l<bline);

sell(pd,holding,limitr,min(o,bline));

3楼
xian_0_9 发表于:2011/5/25 14:19:56

谢谢

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


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