logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
pulsewaveform  
#1 Posted : Tuesday, June 28, 2005 12:19:20 PM(UTC)
pulsewaveform

Rank: Member

Groups: Registered, Registered Users
Joined: 5/18/2005(UTC)
Posts: 10

The default formula for standard deviation does not allow you to input the number of deviations. Any ideas on how to write a function that can allow for deviation input?
wabbit  
#2 Posted : Tuesday, June 28, 2005 12:28:09 PM(UTC)
wabbit

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)
PulseWaveForm... Please have a perusal of : http://forum.equis.com/viewtopic.php?t=933 The reason that you cannot input the number of standard deviations into the formula is because the Stdev() function CALCULATES the standard deviation of the input data array over the input time periods. If you read your users manual you will see there is a good example of how to use the Stdev() function to create your own Bollinger Bands. (page 281 of the MS 6.52 Users Manual or page 298 of the MS 9 Users Manual, any others have the other manuals for MS7 and MS8?) In addition, I would also spend a little time getting to know what each indicator means and what it does - then you will have a better appreciation for trading, and probably save yourself some time and money. Hope this helps. wabbit :D
pulsewaveform  
#3 Posted : Friday, July 8, 2005 1:41:42 AM(UTC)
pulsewaveform

Rank: Member

Groups: Registered, Registered Users
Joined: 5/18/2005(UTC)
Posts: 10

thanks a lot. very helpful.
pulsewaveform  
#4 Posted : Friday, July 8, 2005 3:17:50 PM(UTC)
pulsewaveform

Rank: Member

Groups: Registered, Registered Users
Joined: 5/18/2005(UTC)
Posts: 10

Have you tried normalizing your SD by dividing it by the average from which it is calculated? It produces some interesting results.
wabbit  
#5 Posted : Saturday, July 9, 2005 2:08:09 AM(UTC)
wabbit

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)
How so? Can you post your code to do this? I don't see how it could produce anything other than a scaling of the same of the same curve as the StDev()? {MSFL to compute 5 periods StDev()} {this is a 'biased' SD, an 'unbiased' SD would divide by 4} x:=Mov(C,5,S); Sqrt( ( Power(x-C,2) + Power(x-Ref(C,-1),2) + Power(x-Ref(C,-2),2) + Power(x-Ref(C,-3),2) + Power(x-Ref(C,-4),2) ) /5) This is really hard to code for variable periods, as there is no looping capability in the MSFL... so quite often you might see people approximate the StDev function when required using code like: x:=c; prd:=5; sqrt(sum(power(x-mov(x,prd,s),2),prd)/(prd-1)); Its not quite the same, but programmatically it allows a little more flexibility.... In either case, what does dividing by the average give you? Curious... wabbit :D P.S. See http://forum.equis.com/viewtopic.php?t=981 for a brief discussion on normalisation
Victor_H  
#6 Posted : Saturday, July 9, 2005 2:51:50 AM(UTC)
Victor_H

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/6/2005(UTC)
Posts: 5

Quote:
Have you tried normalizing your SD by dividing it by the average from which it is calculated? It produces some interesting results.
This is also referred to as the 'Coefficient of Variation' http://en.wikipedia.org/wiki/Coefficient_of_variation
wabbit  
#7 Posted : Saturday, July 9, 2005 3:11:28 AM(UTC)
wabbit

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)
http://en.wikipedia.org/wiki/Coefficient_of_variation wrote:
In probability theory and statistics, the coefficient of variation (CV) is a measure of dispersion of a probability distribution. It is defined as the ratio of the standard deviation to the mean: c_{v} = {\\sigma \\over \\mu }. The coefficient of variation is a dimensionless number that allows comparison of the variation of populations that have significantly different mean values. It is often reported as on a scale of 0 to 100% by multiplying the above calculation by 100.
So on a single chart it does nothing than 'scale' or normalise the SD, but as the definition suggests it could be used to compare variation (or if you consider volatility and variation to be similar terms, volatility) of different stocks. And....?? Might be useful in sector analysis? I am at a loss to descibe its usefulness in this environment. Any ideas? wabbit :D P.S. I always HATED statistics - at school and uni too! Lies, damn lies and statistics!
Victor_H  
#8 Posted : Saturday, July 9, 2005 3:38:59 AM(UTC)
Victor_H

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/6/2005(UTC)
Posts: 5

My only application of the CoV has been to apply it to Guppy's 12 MMA's. A low 'Coefficient of Variation' reflects a period of low volatility in much the same way as a low ADX value does. One could always look for breakouts when the CoV starts to turn up - in much the same way as the ADX starts to rise with the start of a new trend. Personally, I would only use it to compare or rank stocks in a list. Regards Victor.
Victor_H  
#9 Posted : Saturday, July 9, 2005 6:55:11 PM(UTC)
Victor_H

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/6/2005(UTC)
Posts: 5

For anyone interested in the code - adjust MA's as required. [code:1:670f38daf1]pr:= MP(); m0:= Mov(pr,6,E); m1:= Mov(pr,7,E); m2:= Mov(pr,8,E); m3:= Mov(pr,9,E); m4:= Mov(pr,10,E); m5:= Mov(pr,11,E); m6:= Mov(pr,12,E); m7:= Mov(pr,30,E); m8:= Mov(pr,35,E); m9:= Mov(pr,40,E); m10:= Mov(pr,45,E); m11:= Mov(pr,50,E); m12:= Mov(pr,55,E); m13:= Mov(pr,60,E); mvst:= (m0+m1+m2+m3+m4+m5+m6)/7; mvlt:= (m7+m8+m9+m10+m11+m12+m13)/7; mv:= (mvst+mvlt)/2; sd:= Sqrt((Power((m0-mv),2) +Power((m1-mv),2)+Power((m2-mv),2) +Power((m3-mv),2)+Power((m4-mv),2) +Power((m5-mv),2)+Power((m6-mv),2) +Power((m7-mv),2)+Power((m8-mv),2) +Power((m9-mv),2)+Power((m10-mv),2) +Power((m11-mv),2)+Power((m12-mv),2) +Power((m13-mv),2))/14); CoV:= sd*100/mv; CoV;[/code:1:670f38daf1] Regards Victor.
henry1224  
#10 Posted : Sunday, July 10, 2005 10:52:39 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
try this as compared to Victor's code,both show extreme areas but this indicator is not bounded by a scale from 0 to 10 OS1:=Mov(C,3,E)-Mov(C,30,E); OS2:=Mov(C,5,E)-Mov(C,35,E); OS3:=Mov(C,8,E)-Mov(C,40,E); OS4:=Mov(C,10,E)-Mov(C,45,E); OS5:=Mov(C,12,E)-Mov(C,50,E); OS6:=Mov(C,15,E)-Mov(C,60,E); B:=OS1+OS2+OS3+OS4+OS5+OS6; B2:=Mov(Mov(B,2,S),2,S); B2;Ref(B2,-1);
pulsewaveform  
#11 Posted : Friday, August 19, 2005 2:09:50 AM(UTC)
pulsewaveform

Rank: Member

Groups: Registered, Registered Users
Joined: 5/18/2005(UTC)
Posts: 10

Quote:
Personally, I would only use it to compare or rank stocks in a list
I also use it for ranking and screening stocks, with the normalized version you can write a formula that only looks for stocks that have a value above 90 or below 10.
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.