龙听期货论坛's Archiver

龙听 发表于 2022-11-2 14:11

【Variance】

[code]Inputs: PriceValue(Numeric), Len(Numeric);
Variables: var0(0), var1(0);

var0 = Len * Summation(Square(PriceValue), Len) - Square(Summation(PriceValue, Len));
var1 = Len * (Len - 1);

condition1 = Len > 1 OR Len < 0 ;
IF condition1 Then
        Variance = var0 / var1;
[/code]

页: [1]