我覺得這個代碼夠簡單了,但是結果是不對的。?
想自己用交易師公式寫個10日最高價,還請官方解惑,以下是指標源碼,很簡單了。為什么返回的數字不對?
//返回10周期最高價
function HasSameV
input:
? numericseries VH;
variable:
? numericSimple tempB(0);
begin?
tempB:=ref(VH,0);
for i = 0 to 9 begin
if ref(VH,i)>=tempB ?Then Begin
tempB:=ref(VH,i);
end;
end ;
Return tempB;
end;
十日最高價:HasSameV(H);