老师,请问您一下,下面这个代码用在加仓单上,想要实现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);
因为用金字塔时间不习惯,我使用的是北京时间,跟这个有没有关系