- UID
- 2
- 积分
- 2892617
- 威望
- 1396340 布
- 龙e币
- 1496277 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-25
|
【VolatilityExVal】
- Inputs: NumberDays(Numeric);
- Variables: var0(0), var1(0), var2(0), var3(0), var4(0), var5(0);
- If DataCompression = 2 Then Begin
- var4 = NumberDays;
- For var2 = 0 To var4 Begin
- var0 = Close[var2];
- If var0 = 0 Then
- var3 = 1;
- End;
- If var3 = 0 Then Begin
- var5 = SquareRoot(253 / var4);
- var1 = ((.6 * Log((Highest(Close, var4) / Lowest(Close, var4))) * var5) + (.6 * Log((Highest(High, var4) / Lowest(Low, var4))) * var5)) * .5;
- If var1 <= 0 Then
- var1 = 0;
- If var1 >= 2.99 Then
- var1 = 2.99;
- End;
- End;
-
- VolatilityExVal = var1
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|