指标里有2个参数K和T,当high>ref(close,1),让K=K1, T=T1否则让K=K2,T=T2。这个正确的写法应该是怎样的? 是先要定义K=K1,T=T1吗?我写起来图表下面多条线,整个图表都被压缩了
k:=k1;
t:=T1;
ifelse(high>ref(close,1) ,(k=k1 and t=t1),(k=k2 and t=t2)); 这样写对吗? K1.T1.K2.T2都是设的0.4, 结果图表下面多出条0.4的线 怎么弄没掉?
if high>ref(close,1) then begin
k:=k1 ;
t:=t1;
end
if not(high>ref(close,1)) then begin
k:=k2 ;
t:=t2;
end