【MassIndex】
[code]inputs:SmoothingLen( numericsimple ),
SummationLen( numericsimple ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ) ;
var0 = XAverage( Range, SmoothingLen ) ;
var1 = XAverage( var0, SmoothingLen ) ;
if var1 > 0 then
var2 = var0 / var1
else
var2 = 0 ;
var3 = SummationLen - CurrentBar ;
if var3 >= 0 then
MassIndex = Cum( var2 ) + var3
else
MassIndex = MassIndex[1] + var2 - var2[SummationLen] ;
[/code]
页:
[1]