relative vigour index.afl

来自「一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台」· AFL 代码 · 共 37 行

AFL
37
字号
//------------------------------------------------------------------------------
//
//  Formula Name:    Relative Vigour Index
//  Author/Uploader: Stefan Bondorowicz 
//  E-mail:          SBondorowicz@aol.com
//  Date/Time Added: 2002-01-18 11:17:19
//  Origin:          John Ehler
//  Keywords:        
//  Level:           basic
//  Flags:           indicator
//  Formula URL:     http://www.amibroker.com/library/formula.php?id=150
//  Details URL:     http://www.amibroker.com/library/detail.php?id=150
//
//------------------------------------------------------------------------------
//
//  Relative Vigour Index described in an article by John Ehlers
//
//  in the January 2002 edition of TASC.
//
//------------------------------------------------------------------------------

/* Relative Vigour Index from TASC 01/02 */

period = 14;

value1 = ( ( C - O ) + ( 2 * Ref( C - O, -1) ) + ( 2 * Ref( C - O, -2) ) + Ref( C - O, -3) ) / 6;
value2 = ( ( H - L ) + ( 2 * Ref( H - L, -1) ) + ( 2 * Ref( H - L, -2) ) + Ref( H - L, -3) ) / 6;

num = Sum( value1, period );
denom = Sum( value2, period );

RVI = IIf( denom != 0, num / denom, 0);

RVISig = ( RVI + 2 * Ref( RVI, -1) + 2 * Ref( RVI, -2) + Ref( RVI, -3) ) / 6;
Graph1 = RVI;
Graph0 = RVISig;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?