[Full]
完整版
[Rss]
订阅
[Xml]
无图版
[Xhtml]
无图版
Rss
& SiteMap
金字塔客服中心 - 专业程序化交易软件提供商
http://www.weistock.com/bbs/
专业程序化软件提供商
◎
金字塔客服中心 - 专业程序化交易软件提供商
→
公式模型编写问题提交
→
[求助]为何改用IF语句后测试结果不一样?
共9 条记录, 每页显示 10 条, 页签:
[1]
[浏览完整版]
标题:[求助]为何改用IF语句后测试结果不一样?
1楼
烟圈
发表于:2012/11/8 8:36:34
{开多} ENTERLONG:Z>0 ,TFILTER;
{平多}EXITLONG:Z<0 ,TFILTER;
{开空}ENTERSHORT:Z<0 ,TFILTER;
{平空}EXITSHORT:Z>0 ,TFILTER;
此主题相关图片如下:qq截图20121108083339.png
a:=z>0;
b:=z<0;
if holding<0 and a then begin
sellshort(1,0,nextopen);
buy(1,1,nextopen);
end
if holding>0 and b then begin
sell(1,0,nextopen);
buyshort(1,1,nextopen);
end
if holding=0 and a then buy(1,1,nextopen);
if holding=0 and b then buyshort(1,1,nextopen);
此主题相关图片如下:qq截图20121108083542.png
其他条件没有改变
[此贴子已经被作者于2012-11-8 8:37:36编辑过]
2楼
jinzhe
发表于:2012/11/8 9:35:16
用旧图表测评,需要在测评第二步做价格的设置
3楼
every
发表于:2012/11/8 9:35:17
如果是次周期开盘价入场,BUY测评改为如下试试
a:=z>0;
b:=z<0;
if holding<0 and a then begin
sellshort(1,0,limit,open);
buy(1,1,limit,open);
end
if holding>0 and b then begin
sell(1,0,limit,open);
buyshort(1,1,limit,open);
end
if holding=0 and a then buy(1,1,limit,open);
if holding=0 and b then buyshort(1,1,limit,open);
4楼
烟圈
发表于:2012/11/8 11:37:25
第二步已经做了价格设置
[此贴子已经被作者于2012-11-8 11:38:20编辑过]
5楼
烟圈
发表于:2012/11/8 11:37:54
谢谢every兄 我先试试
6楼
烟圈
发表于:2012/11/8 12:09:37
用every兄的改后,还是老样子。不过利润率降到8%了。。。。。。。。。贴不上图,不知道回帖怎么贴图
[此贴子已经被作者于2012-11-8 12:10:39编辑过]
7楼
jinzhe
发表于:2012/11/8 13:23:03
a:=z>0;
b:=z<0;
if a then begin
sellshort(holding<0,0,nextopen);
buy(holding=0,1,nextopen);
end
if b then begin
sell(holding>0,0,nextopen);
buyshort(holding=0,1,nextopen);
end
改成这样呢
8楼
烟圈
发表于:2012/11/8 21:44:33
可以了。
谢谢客服!!!!什么原因呢?
9楼
jinzhe
发表于:2012/11/9 9:06:11
正常的反手这么写,按照一楼的方法可能会造成不反手
共9 条记录, 每页显示 10 条, 页签:
[1]
Powered By
Dvbbs
Version 8.3.0
Processed in 0.06250 s, 3 queries.
[Full]
完整版
[Rss]
订阅
[Xml]
无图版
[Xhtml]
无图版