I get a power function overflow. Can anyone fix the problem?
 

 

 

 {UI = Ulcer Index Formula for MetaStock}
Period:=10; {set this to the number of periods to calculate in the formula}
Sqrt(Sum(Power(100*( HHV(CLOSE,Period) - CLOSE )/(HHV(CLOSE,
Period)),2),Period)/Period);

 

 {UPI = (annual return - 5.4)/UI
5.4 = the average annualized return of a money market fund since September
1, 1988
UI = Ulcer Index for the period.}

{UPI = Ulcer Performance Index Formula for MetaStock}
Period:=100; {set this to the number of periods to calculate in the formula}
Fml("UI")-((Power((CLOSE-Ref(CLOSE,-Period))/Ref(CLOSE,-Period)),(365/period
))-1)*100-5.4)/Fml("UI")

 

Reply via email to