- UID
- 2
- 积分
- 2892857
- 威望
- 1396460 布
- 龙e币
- 1496397 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-26
|
【Arms Index (TRIN)】
- inputs:
- AdvIssues( Close of data1 ),
- AdvVol( Close of data2 ),
- DecIssues( Close of data3 ),
- DecVol( Close of data4 ),
- SmoothingLength( 4 ),
- OverSold( 1.25 ),
- OverBought( .7 ) ;
-
-
- variables:
- var0( 0 ),
- var1( 0 ) ;
- var0 = ArmsIndex( AdvIssues, AdvVol, DecIssues, DecVol ) ;
- var1 = Average( var0, SmoothingLength ) ;
- Plot1( var0, "ArmsX" ) ;
- Plot2( var1, "ArmsXAvg" ) ;
- Plot3( OverSold, "OverSld" ) ;
- Plot4( OverBought, "OverBot" ) ;
- condition1 = var1 crosses under OverSold ;
- if condition1 then
- Alert( "Indicator exiting oversold zone" )
- else
- begin
- condition1 = var1 crosses over OverBought ;
- if condition1 then
- Alert( "Indicator exiting overbought zone" ) ;
- end;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|