RSIa(HHV(High,-125),14) this is resulting in column with values of 100

#1
I am trying to achieve RSI of HHV of High of period -125 Candles, i thought i made it correct RSIa(HHV(High,-125),14) resulting in 100 ...any guidance will be much appreciated
 
#2
A = RSIa(HHV(High,-125),14) ;

AddColumn(A,"A",1.2);
Filter = 1;


-------------------------------------

Intent is need the RSI Value for Highest High Value of High in last 125 candles.
The above A brings back 100, not sure the problem with this...any turnarounds please
 
#3
Amibroker function HHV has the following syntax -

SYNTAX hhv( ARRAY, periods )
RETURNS
ARRAY
FUNCTION Calculates the highest value in the ARRAY over the preceding periods (periods includes the current day). HHV accepts periods parameter that can be constant as well as time-variant (array).
EXAMPLE The formula "hhv( close, 4)" returns the highest closing price over the preceding four periods; "hhv( high, 8)" returns the highest high price over the preceding eight periods.

The value of "periods" is POSITIVE as shown in example above. Using a negative might be causing this issue.

Hence try with positive values of "periods" parameter.