hi
where is the code for inertia?
HTML:
//I have the following AFL code for the RVI:
//by Gordon Sutherland
// Donald Dorsey's RVI Indicator (Relative Volatility Index?)
// Posted to AB Yahoo Groups by Rakesh Sahgal on 23rd April 2007
SD10=StDev(C,10);
RVI=RSIa(SD10,10);
Plot(RVI,"RVI",colorBlack,styleLine);
==========================================================
MS CODE INERTIA IS
Inertia 2 in 1
Mov( ((100 * Mov( If(HIGH > Ref(HIGH,-1), Std(HIGH,10),0),14,E) /
(Mov( If(HIGH > Ref(HIGH,-1), Std(HIGH,10), 0),14,E)+
Mov(If(HIGH < Ref(HIGH,-1), Std(HIGH,10),0),14,E)) +
100 * Mov( If(LOW > Ref(LOW,-1), Std(LOW,10),0),14,E) /
(Mov( If(LOW > Ref(LOW,-1), Std(LOW,10), 0),14,E)+
Mov(If(LOW < Ref(LOW,-1), Std(LOW,10), 0),14,E)))/ 2),20,SIMPLE)
============================================================
RULES ARE
Buy if RVI > 50
Sell if RVI < 50
If you miss the first RVI buy signal buy when RVI > 60
If you miss the first RVI Sell signal sell when RVI < 40
Close a long position when the RVI falls below 40
Close a short position when the RVI rises above 60
INERTIA = nature or tendency to continue in trend or no trend
============================================
Appeared in the September 95 issue of Stocks &Commodities magazine
The Inertia indicator was developed by Donald Dorsey.
It was originally introduced in theSeptember1995 issue of Technical Analysis of Stocks and Commodities magazine.
It is an outgrowth of Dorsey's Relative Volatility Index (see Relative Volatility Index).
Dorsey chose the name "Inertia" because of his definition of a trend.
He asserts that a trend is simply the outward result of inertia.
It takes significantly more energy for a market to reverse direction than to continue along the same path. Therefore a trend is a measurement of market inertia.
In physics, Inertia is defined in terms of mass and direction of motion.
Using technical analysis to analyze security prices, the direction of motion is easily defined.
However, mass is not so easily defined. Dorsey asserts that volatility may be the simplest and most accurate measurement of inertia.
This theory led him to use the Relative Volatility Index (RVI) as the basis for a trend indicator.
Inertia is simply a smoothed RVI.
The smoothing mechanism is a Linear Regression indicator (see Linear Regression Indicator).
The RVI helps measure the general direction of volatility.
Dorsey found that by smoothing the RVI, a good long-term trend indicator resulted.
If the Inertia indicator is above 50, positive inertia is indicated.
The long-term trend is up and should remain up as long as the indicator is above 50.
I
f the Inertia indicator is below 50, negative inertia is indicated.
The long-term trend is down and should remain down, as long as the indicator is below 50.
------------------------------
metastock code(
our friends can now coinvert this code into afl)
New Relative Volatility Index
(100 * Mov( If(HIGH > Ref(HIGH,-1),Std(HIGH,10),0),14,E) /
(Mov( If(HIGH > Ref(HIGH,-1), Std(HIGH,10),0),14,E) +
Mov(If(HIGH < Ref(HIGH,-1), Std(HIGH,10),0),14,E)) +
100 * Mov( If(LOW > Ref(LOW,-1), Std(LOW,10),0),14,E) /
(Mov( If(LOW > Ref(LOW,-1), Std(LOW,10), 0),14,E)+
Mov(If(LOW < Ref(LOW,-1), Std(LOW,10),0),14,E))) / 2
Inertia
Mov( Fml( "New Relative Volatility Index" ),20,SIMPLE)