或者用跨周期引用,下面给出两种方法的代码:
方法1:交易映射,既交易PTA,然后设置上面的图片里面的映射给RU
if h=hhv(h,20) then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if l=llv(l,20) then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
方法2:跨周期引用,这样就需要用两个公式来实现
公式1:不做交易,不可省略
hh:h=hhv(h,20);
ll:l=llv(l,20);
公式2:交易公式,交易在ru上
duo:stkindi('ta00','公式1.hh',0,datatype);
kong:stkindi('ta00','公式1.ll',0,datatype);
if duo then begin
sellshort(1,0,market);
buy(holding=0,1,market);
end
if kong then begin
sell(1,0,market);
buyshort(holding=0,1,market);
end
方法1还是方法2?
不能加载在30秒上的具体表象是什么?
方法2里面的duo和kong有数值返回吗?