Rss & SiteMap

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

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

标题:引用公式问题

1楼
tanyongde 发表于:2016/11/10 10:23:45
引用公式“DAYTREND”

input:n(20,0,100,1);
input:m(20,0,100,1);
tr1 := max(max((high-low),abs(ref(close,1)-high)),abs(ref(close,1)-low));
atr1 : =ma(tr1,n);
atr:=ifelse(atr1<0.01*c,0.01*c,ifelse(atr1<0.025*c,atr1,0.025*c));
c1:=(h+l+2*c)/4;         
mam1:ref(ema(c1,m),1);
top1:ref(ema(c1+atr,m),1);
bottom1:ref(ema(c1-atr,m),1);
mam2:ref(ema(c1,5*m),1);
top2:ref(ema(c1+atr,5*m),1);
bottom2:ref(ema(c1-atr,5*m),1);

引用公式“DAYTREND”日周期的指标如下

5mam1:stkindi('','DAYTREND.mam1',6,-1);
5top1:stkindi('','DAYTREND.top1',6,-1);
5bottom1:stkindi('','DAYTREND.bottom1',6,-1);
5mam2:stkindi('','DAYTREND.mam2',6,-1);
5top2:stkindi('','DAYTREND.top2',6,-1);
5bottom2:stkindi('','DAYTREND.bottom2',6,-1);
5atr:=stkindi('','DAYTREND.atr',6,-1);
5emastr:=stkindi('','DAYTREND.emastr',6,-1);

引用公式“DAYTREND”周周期的指标如下

5mam1:stkindi('','DAYTREND.mam1',7,-1);
5top1:stkindi('','DAYTREND.top1',7,-1);
5bottom1:stkindi('','DAYTREND.bottom1',7,-1);
5mam2:stkindi('','DAYTREND.mam2',7,-1);
5top2:stkindi('','DAYTREND.top2',7,-1);
5bottom2:stkindi('','DAYTREND.bottom2',7,-1);
5atr:=stkindi('','DAYTREND.atr',7,-1);
5emastr:=stkindi('','DAYTREND.emastr',7,-1);


  交易模块分别按日周期引用DAYTREND”的指标和按周期的指标DAYTREND”的指标回测结果都是一样的,是编写的问题?






2楼
jinzhe 发表于:2016/11/10 10:31:33
因为你没写对,所有引用都按照下面改:
5mam1:stkindi('','DAYTREND.mam1',0,6,-1);
3楼
tanyongde 发表于:2016/11/10 11:01:49
改后回测结果不一样,?谢!!
4楼
jinzhe 发表于:2016/11/10 11:18:27

你没写对,你前面写的是错的。我修改的是正确的写法,

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


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