if barpos>30 then begin
buy(holding=0 and close>ref(close,10)+3,1,thisclose);
sell(holding=1 and close<ref(close,10)-3,1,thisclose);
end
这样写编译报错:ref在逐K线不能直接在控制语句之内引用
if barpos>30 and close>ref(close,10)+3 then begin
buy(holding=0,1,thisclose);
end
这样写却没有问题,具体是什么原理?帮助里没找到
统计类函数,可能会有无效值,不能放在 if then 语句
就当这是金字塔的语法。不要触碰“法”,否则“坐牢”