龙听期货论坛's Archiver

龙听 发表于 2022-11-2 10:04

【HMA】

[code]inputs:
        double Price( numericseries ),
        int Length( numericsimple) ;

if Length > 1 then
        HMA = WAverage( 2 * WAverage( Price, IntPortion( Length * 0.5 ) ) -
         WAverage( Price, Length ), IntPortion( SquareRoot( Length ) ) )
else
        RaiseRunTimeError( "HMA length input must be greater than 1." ) ;
[/code]

页: [1]