【UltimateOscillator】
[code]inputs:ShortLen( numericsimple ),
MiddlLen( numericsimple ),
LongLen( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ) ;
Value1 = Summation( TrueRange, ShortLen ) ;
Value2 = Summation( TrueRange, MiddlLen ) ;
Value3 = Summation( TrueRange, LongLen ) ;
Value4 = Summation( C - TrueLow, ShortLen ) ;
Value5 = Summation( C - TrueLow, MiddlLen ) ;
Value6 = Summation( C - TrueLow, LongLen ) ;
condition1 = Value1 = 0 or Value2 = 0 or Value3 = 0 ;
if condition1 then
UltimateOscillator = 0
else
begin
var0 = LongLen / ShortLen ;
var1 = LongLen / MiddlLen ;
Value7 = ( Value4 / Value1 ) * ( var0 ) ;
Value8 = ( Value5 / Value2 ) * ( var1 ) ;
Value9 = ( Value6 / Value3 ) ;
UltimateOscillator = ( Value7 + Value8 + Value9 ) / ( var0 + var1 + 1 ) ;
end ;
[/code]
页:
[1]