STOCKS & COMMODITIES magazine. The Traders' Magazine

Register or Log In — Traders.com and STOCKS & COMMODITIES magazine

Traders' Tips  |  JAN 2002

Traders’ Tips

Traders’ Tips TRADESTATION: RELATIVE VIGOR INDEX John Ehlers’s article “Relative Vigor Index (RVI)” in this issue includes a version of EasyLanguage code for the indicator. That version includes hardcoded implementations of a symmetrically weighted moving average in three places, and also a hardcoded implementation of two summations. We provide an alternative version below that replaces these hardcoded implementations with function calls. This version produces identical results, except for minor initialization differences. The SWMA, also known as a triangular moving average, can be conveniently implemented as a double simple moving average, and this code can be separated out into a function that can than be called from the main body of the code as many times as necessary. TradeStation includes a TriAverage function, but the function required here is a little more generalized, so it we call it TriAverage_gen and provide the code for it below, following the main indicator code. Summation is another built-in function in TradeStation, and we use that as is.

by Technical Analysis, Inc.

Technical Analysis of STOCKS & COMMODITIES
The Traders’ Magazine since 1982
has had over 1,226,237 subscribers from 174 different countries.
37,000 Page Traders’ Archive for $89.99

NOT A SUBSCRIBER?

To continue reading, sign-up for trial access to Traders.com and the S&C Archive37,000 pages of trading ideas!




After verifying your email address, you will have limited access to the S&C Archive, as well as access to a Digital Edition of S&C, and access to Traders.com Advantage and Working Money for 30 days.



DEPARTMENTS: Advertising | Editorial | Circulation | Contact Us | BY PHONE: (206) 938-0570

PTSK — The Professional Traders' Starter Kit
Home — S&C Magazine | Working Money Magazine | Traders.com Advantage | Online Store | Traders’ Resource
Add a Product to Traders’ Resource | Message Boards | Subscribe/Renew | Free Trial Issue | Article Code | Search

Copyright © 1982–2024 Technical Analysis, Inc. All rights reserved. Read our disclaimer & privacy statement.