Rss & SiteMap

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

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

标题:保本止损策略未实现问题

1楼
pepsi 发表于:2011/9/10 21:31:38

此保本策略写的是否正确,但是在策略测试和K线图中未起到作用,求解。

exlong:=(hhv(h,enterbars)-enterprice)>n and cross(enterprice,c);

//多单保本止损策略:当最大浮动盈利达到N个点,当最新价向下穿越开仓价。

2楼
阿火 发表于:2011/9/11 21:31:05

把条件变量 显示出来

看到底是哪个变量没符合条件。

tiaoshi1:hhv(h,enterbars);

tiaoshi2:tiaoshi1-enterprice>n;

tiaoshi3:cross(enterprice,c);

exlong:=(hhv(h,enterbars)-enterprice)>n and cross(enterprice,c);

3楼
pepsi 发表于:2011/9/13 8:54:38

1:这个必须是在盘中才能发现是哪个条件不成立,还是通过策略测试就能发现的?

2:

tiaoshi1:hhv(h,enterbars);

tiaoshi2:tiaoshi1-enterprice>n;

tiaoshi3:cross(enterprice,c);

这三个返回值都是1或者0,我要再哪里看返回值的记录呢?

4楼
fly 发表于:2011/9/13 9:24:53

1.在图表上查看

http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=1246&page=1&star=1

这里的方法1.基于图表公式的调试

5楼
pepsi 发表于:2011/9/14 10:26:51

按照leevolvo的方法,在主图中K线和条件语句所返回的值 0 和 1 ,不能很好的显示在一起,如何改进一下,让K线图正常显示呢。

从纵坐标可以看出,最小值是从0开始的,这样K线图必然不能正常显示。

图片点击可在新窗口打开查看

6楼
fly 发表于:2011/9/14 10:29:48

加",linethick0;"或NOAXIS

(1)tiaoshi1:hhv(h,enterbars),linethick0;

 

(2)tiaoshi1:hhv(h,enterbars),noaxis;

7楼
pepsi 发表于:2011/9/14 11:14:32
恩 挺好用
共7 条记录, 每页显示 10 条, 页签: [1]


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