【UlcerIndex】
[code]inputs:PriceValue( numericseries ),
Len( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ) ;
var0 = 0 ;
var1 = PriceValue[ Len - 1 ] ;
for Value1 = Len - 2 downto 0
begin
condition1 = var1 > PriceValue[Value1] and var1 <> 0;
if condition1 then
var0 = var0 + Square( ( ( var1 - PriceValue[Value1] ) / var1 ) * 100 )
else
var1 = PriceValue[Value1] ;
end ;
UlcerIndex = SquareRoot( var0 / Len ) ;
[/code]
页:
[1]