Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Is anyone aware if Jack Schwager's Volatility Ratio has been coded for MetaStock.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 126 Location: Italy
|
I have got this formula for volatlity ratio as used by Connors and Ratscke:
VR:=Std(Log(C/Ref(C,-1)),5)/Std(Log(C/Ref(C,-1)),99);
Do not know if it is what you are looking for.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi minnamor,
Thanks for your response, however the code looks significantly different from what i would expect.
Perhaps I should have included the following details in my initial post (my 1st attempt so please forgive me):-
VR = True Range / True Range for the past "n" periods.
Whilst "True Range" is part of the calculation of ATR, I believe there is a difference between the two.
Regards,
oztrader
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
oztrader, There are many different ways to achieve what you think you mean, unfortunately as you have not fully defined what you think you mean to us, so I will have a guess and provide a few possible solutions. First, True Range can be defined using the built in MS indicator: or, you can define your own using: Code:r1:=H-L;
r2:=Abs(Ref(C,-1)-H);
r3:=Abs(Ref(C,-1)-L);
TrueRange:=Max(Max(r1,r2),r3);
{plot/return}
TrueRange;
Now we have the TrueRange defined (the numerator) we can try to define what you mean in your denominator term "True Range for the past "n" periods." You might try: Code:n:=10;
myVolatility:=ATR(1)/ATR(n);
{plot/return}
myVolatility;
or, maybe: Code:n:=10;
myVolatility:=ATR(1)/Sum(ATR(1),n);
{plot/return}
myVolatility;
or, what about: Code:n:=10;
myVolatility:=ATR(1)/HHV(ATR(1),n);
{plot/return}
myVolatility;
or, even: Code:n:=10;
zero:=Power(10,-30);
myVolatility:=(ATR(1)-LLV(ATR(1),n))/Max(HHV(ATR(1),n)-LLV(ATR(1),n),zero);
{plot/return}
myVolatility;
Remember, you have to define EXACTLY what you think you mean so that it can be correctly programmed, but I hope one of these might help... wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
oztrader, Following our phone conversation today I did a liitle more reading about Schwager, and although I did not find any exact definitions of his code, I did manage to glean this code by combining several different "descriptions" of his volatiliy ratio: Code:{Volatility Ratio - Schwager}
n:=Input("Periods",1,253,14);
zero:=Power(10,-10);
r1:=H-L;
r2:=Abs(H-Ref(C,-1));
r3:=Abs(Ref(C,-1)-L);
TrueRange:=Max(Max(r1,r2),r3);
TrueHighPds:=Max(HHV(H,n),Ref(C,-n));
TrueLowPds:=Min(LLV(L,n),Ref(C,-n));
TrueRangePds:=TrueHighPds-TrueLowPds;
VolatilityRatio:=TrueRange/Max(TrueRangePds,zero);
{plot VR}
VolatilityRatio;
Hope this helps. wabbit [:D] [edited: following even more discussions...]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/18/2007(UTC) Posts: 99 Location: sydney australia
|
an interesting formula Wabbit, but I don't see where it is of any use projected onto a chart. like most volatility-type indicators (the ATR & the RVI as well as Chaikin's vol) it is very hard to draw any conclusions as to the stock involved. but this one even more so, I mean it tells me nothing!
my favorite in this class of indicators would have to be the CBOE, known as ^VIX, as long as you remember to read it upside-down. but I don't think that one is designed for general use.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi Wabbit,
I take on board your comment re "what am I really requesting in this code" and it has been a enlightening journey working thru the alternatives.
Your latest posting covers what I was chasing and as such I thankyou for your assistance and patience.
Regards,
oztrader
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi amory,
Although this question has been directed to Wabbit and he may well respond, I am interested in a variety of volatility codes to test in mechanical systems, either mutually or exclusively, and I have an affinity to indicators related to the ATR. From Wabbit's viewpoint I may well be a lost sole looking for a dense forest to fulfil my destiny.
Cheers,
oztrader
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
amory,
Although this indicator might not be of use on its own; like many of the volatility indicators, this function can be employed to do "other jobs" like adjust the length of a moving average, RSI or other indicators etc.
This code produces values between zero and one, so we might multiply this result by a factor then create a variable moving average that is shorter in periods of low "volatility" and longer in high "volatility". Obviously, we can reverse this if we like.
Hope this helps.
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi Amory,
I appologise for being somewhat flippant in my reply last night.
The Volatility Ratio has been used to identify "Wide-Ranging Days" when used in association with Trend Reversal (refer to incrediblecharts.com).
Regards,
oztrader
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.