Rss & SiteMap

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

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

标题:[求助]加仓单引用日线数据问题

1楼
宁静致远1 发表于:2017/2/15 12:59:47
老师,请问您一下,下面这个代码用在加仓单上,想要实现5分钟收盘价大于昨天日线收盘价才加多仓,5分钟收盘价小于昨天日线收盘价才加空仓,螺纹钢夜盘引用日线数据却是无效的,不知道是什么原因?麻烦老师帮我看一下
cc:=callstock(stklabel,vtclose,2);
cd:=callstock(stklabel,vtclose,6,-1);
大于:=cc>cd;
小于:=cc<cd;
if   macd>0 and macd>ref(macd,1)    then buy(holding=0,ss,marketr);
if   cc>cd   and macd>0    and holding=ss and openprofit>0 and enterbars>=3  then buy(holding=ss,m,marketr);
if   macd<0  and holding>0 then sell(1,0,marketr);
if   macd<0 and macd<ref(macd,1)   then buyshort(holding=0,ss,marketr);
if   cc<cd   and macd<0      and holding=-ss and openprofit>0 and enterbars>=3  then buyshort(holding=-ss,m,marketr);
if   macd>0   and holding<0  then sellshort(1,0,marketr);
2楼
宁静致远1 发表于:2017/2/15 13:27:38
因为用金字塔时间不习惯,我使用的是北京时间,跟这个有没有关系
3楼
jinzhe 发表于:2017/2/15 13:39:13

"螺纹钢夜盘引用日线数据却是无效的"

麻烦解释一下这句话的具体含义

4楼
宁静致远1 发表于:2017/2/15 14:09:32
改用金字塔时间后可以了,谢谢老师
共4 条记录, 每页显示 10 条, 页签: [1]


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