- UID
- 2
- 积分
- 2893117
- 威望
- 1396590 布
- 龙e币
- 1496527 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-26
|
【HPI】
- inputs: OneCent( numericsimple ), SmFactor( numericsimple ) ;
- variables: var0( 0 ), var1( 0 ), var2( 0 ), var3( 0 ), var4( 0 ) ;
- var0 = ( H + L ) * .5 ;
- if CurrentBar = 1 then
- HPI = 0
- else
- begin
- var1 = MaxList( OpenInt, OpenInt[1] ) ;
- var2 = 2 * AbsValue( OpenInt - OpenInt[1] ) ;
- var3 = var0 - var0[1] ;
- if var1 = 0 then
- var4 = 0
- else
- begin
- if BarType >= 2 and BarType < 5 then
- begin
- if var3 > 0 then
- var4 = OneCent * Volume * var3 * ( 1 + var2 / var1 )
- else if var3 < 0 then
- var4 = OneCent * Volume * var3 * ( 1 - var2 / var1 ) ;
- end
- else
-
- begin
- if var3 > 0 then
- var4 = OneCent * Ticks * var3 * ( 1 + var2 / var1 )
- else if var3 < 0 then
- var4 = OneCent * Ticks * var3 * ( 1 - var2 / var1 ) ;
- end ;
- end ;
- HPI = HPI[1] + SmFactor * ( var4 - HPI[1] ) ;
- end ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|