Back to TS code links
    Relative Vigor Index from John Ehlers
Back to Ehlers links


Anyone using information or codes on these pages does so at their own risk - no guarantees of stability or profitability are claimed. These codes are all for testing purposes only.

//// Ehlers Relative Vigor Index - coded by dn
//// From Cybernetic Analysis for Stocks and Futures

Inputs: Length(10);
Vars: Num(0),
Denom(0),
Count(0),
RVI(0),
Trigger(0);
Value1 = ((Close - Open) + 2*(Close[1] - Open[1]) + 2*(Close[2] - Open[2])
+ (Close[3] - Open[3]))/6;Value2 = ((High - Low) + 2 * (High[1]
- Low[1]) + 2 * (High[2] - Low[2]) + (High[3] - Low[3]))/6;
Num = 0;
Denom = 0;
For count = 0 to Length -1 begin
Num = Num + Value1 [count];
Denom = Denom + Value2[count];
End;

If Denom <> 0 then RVI = Num / Denom;Trigger = RVI[1];
plot1 (RVI, "RVI",black);
plot2 (Trigger, "Trigger",blue);