这种写法,不知为什么在旗舰版上无法得到aa的有效值,而在TBquant上可以?
//这种写法,不知为什么在旗舰版上无法得到aa的有效值,而在TBquant上可以?那位老师可以回答 Params Numeric length(14); Numeric lots(1); Vars numericseries aa; numericseries sf; numericseries up_move; numericseries low_move ; Begin up_move = Abs(h[1] - h[2]); Commentary("up_move="+Text(up_move)); low_move = Abs(l[1] - l[2]); Commentary("low_move="+Text(low_move)); sf = abs((up_move -low_move) / (up_move +low_move)); Commentary("sf="+Text(sf)); if (CurrentBar==0 ) { aa = close; Commentary("aa1="+Text(aa)); } Else { if (aa== InvalidNumeric) { aa = close[1]; Commentary("aa2="+Text(aa)); } Else { aa= close[1] * sf+ aa[1] * (1-sf) ; Commentary("aa3="+Text(aa)); } } Commentary("CurrentBar2="+Text(CurrentBar)); Commentary("aa4="+Text(aa)); end