Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Just for reassurance, I want to check any thoughts on this formula for calculating the volatility average based on the number of days that the trend has been in place. It seems to work OK.
[code:1:92f79d2a14]Trend:=
If(C>Ref(C,-1) AND Ref(C,-1)>Ref(C,-2),PREV+1,
If(C<Ref(C,-1) AND Ref(C,-1)<Ref(C,-2),PREV-1,
If(C>Ref(C,-1) AND Ref(C,-1)<=Ref(C,-2),1,
If(C<Ref(C,-1) AND Ref(C,-1)>=Ref(C,-2),-1,
0))));
Sum(H-L,LastValue(Trend-PREV+PREV))/Max(Trend,0.00001)[/code:1:92f79d2a14]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
g_stockman,
I don't see anything wrong with your formula, seems fine ...
Patrick :mrgreen:
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
Thanks, Patrick! I appreciate you taking some time to look it over. You're the best. :D
|
|
|
|
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.