Rss & SiteMap

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

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

标题:请教一个问题

1楼
wocool100 发表于:2015/8/4 14:32:17
老师你好,请问这个怎么写。 

 盈利100点回撤40点止盈,盈利200点回撤60点止盈, 盈利300点以上回撤20%止盈
2楼
jinzhe 发表于:2015/8/4 14:35:59

以开多为例:

if holding>0 and hhv(h,enterbars+1)-enterprice>100 and hhv(h,enterbars+1)-enterprice<200 and l<hhv(h,enterbars+1)-40 then sell.........;

 

if holding>0 and hhv(h,enterbars+1)-enterprice>=200 and hhv(h,enterbars+1)-enterprice<300 and l<hhv(h,enterbars+1)-60 then sell.........;

 

if holding>0 and hhv(h,enterbars+1)-enterprice>=300 and l<hhv(h,enterbars+1)-300*0.2 then sell.........;

3楼
wocool100 发表于:2015/8/4 14:44:44
谢谢。 另外再问下。 MA5余MA10金叉加仓一次怎么写。  
DD1:=CROSS(MA5,MA10);
加多:BUY(DD1 AND HOLDING>0,1,THISCLOSE);  


我这样写的,但是模型一直加仓 
4楼
jinzhe 发表于:2015/8/4 14:46:06
如果你开多是开多1手,那么加多的时候holding判断写为holding=1
共4 条记录, 每页显示 10 条, 页签: [1]


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