- UID
- 2
- 积分
- 2874604
- 威望
- 1387331 布
- 龙e币
- 1487273 刀
- 在线时间
- 13156 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【StandardError】
- Inputs: PriceValue(Numeric), Len(Numeric), Smooth(Numeric);
- Variables: var0(0), var1(0), var2(0), var3(0), var4(0), var5(0), var6(0), var7(0), var8(0);
- var0 = CurrentBar;
- IF CurrentBar > Len Then Begin
- var4 = Summation(var0 * PriceValue, Len) - (Len * Average(var0, Len) * Average(PriceValue, Len));
- var5 = Summation(Square(var0), Len) - (Len * Square(Average(var0, Len)));
- var3 = var4 / var5;
- var2 = Average(PriceValue, Len) - (var3 * Average(var0, Len));
- var6 = (Summation(Square(PriceValue), Len)) - ((var2 * Summation(PriceValue, Len))) - ((var3 * Summation(var0 * PriceValue, Len)));
- var7 = Len - 2;
- var8 = (var6 / var7);
- IF var8 > 0 Then
- var1 = SquareRoot(var6 / var7)
- Else
- var1 = var1[1];
- StandardError = 2 * Average(var1, Smooth);
- End;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|