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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Imothep  
#1 Posted : Tuesday, September 6, 2005 9:38:56 PM(UTC)
Imothep

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/28/2005(UTC)
Posts: 25

Hi, Could anyone translate into MSFL the following formula ? UserPostedImage Where : C = typical() MB = mov(typical(),20,s) Thanks in advance ! :wink: PS : unfortunately, I am not good at maths :oops: :oops: :oops:
Patrick  
#2 Posted : Tuesday, September 6, 2005 9:45:20 PM(UTC)
Patrick

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)
Sqrt(Power(Mov(Typical()-Mov(Typical(),20,S),20,S),2)) Patrick :mrgreen:
StorkBite  
#3 Posted : Tuesday, September 6, 2005 10:10:10 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Hey Imothep- Where did the formula come from? It seems to me that 't' will set the boundary of the summation. Do you know what it is? I'm thinking it has to be at least 20.
Quote:
Sqrt(Power(Mov(Typical()-Mov(Typical(),20,S),20,S),2))
Gong! :roll:
Patrick  
#4 Posted : Tuesday, September 6, 2005 10:12:27 PM(UTC)
Patrick

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)
What do you mean g ... Do you think it's wrong :?:
StorkBite  
#5 Posted : Tuesday, September 6, 2005 10:30:23 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Well... I'm halfway playing, but if it's like any math that I ever learned, I think that there is more involved.
Patrick  
#6 Posted : Tuesday, September 6, 2005 10:37:20 PM(UTC)
Patrick

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)
I don't know now .. Do you think it should be like this : Sqrt(Power(sum(typical()-Ref(Mov(typical(),20,s),-19),20),2)/20) Either I don't think it is much more complex than that ... Patruick :mrgreen:
henry1224  
#7 Posted : Tuesday, September 6, 2005 11:18:55 PM(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)
There are two books that really go into detail on how to apply square roots into your trading New Blueprints for gains in Stocks and grains by William Dunnigan Chart reading for professional traders by Michael S. Jenkins
StorkBite  
#8 Posted : Tuesday, September 6, 2005 11:23:35 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Well... I don't know either. I'm thinking about something along these lines: t1:=Input(“upper boundary”,5,50,20); j:=t1; BarC:=ref(typical(),-j); MB:=mov(typical(),20,s); a1:=power((BarC-MB)/MB,2); a2:=sum(a1,t1); a3:=sqrt(a2/20); a3; Of course, I have no idea about what this is supposed to do, so there is no way to see if I'm even in the ballpark.
StorkBite  
#9 Posted : Tuesday, September 6, 2005 11:26:26 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
IR's an engineer... he knows about sigma and point segments and such... huh? Of course, any 10th grader taking calculus could probably solve this in about 5 minutes! :D
wabbit  
#10 Posted : Wednesday, September 7, 2005 8:42:41 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)
All, I am a little confused by the original assumptions that C=Typical() and MB=Mov(Typical(),20,S) For such a "complicated" formula such as that given in the original post by Imothep, I believe that C and MB relate to something completely different? Perhaps some more light could be shed on the source of the formula. (See also: http://forum.equis.com/viewtopic.php?t=933 ) I believe the bar above the C indicates an average (remember x, x(bar) etc from high school stats?). C(subscript)j could indicate the moving average of C at point j. If this is the case, I doubt MB(subscript)t would be a moving average too? wabbit :D
StorkBite  
#11 Posted : Wednesday, September 7, 2005 5:44:41 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Wabbit <<<<< I'm with him! :smt003
Imothep  
#12 Posted : Thursday, September 8, 2005 1:32:46 PM(UTC)
Imothep

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/28/2005(UTC)
Posts: 25

Patrick wrote:
Sqrt(Power(Mov(Typical()-Mov(Typical(),20,S),20,S),2)) Patrick :mrgreen:
Hi Patrick :wink:, Thanks for your reply but unfortunately the result is wrong. Actually, this formula is another way to calculate Bollinger's bandwidth. Here is the the original code (which is the transcription of the mathematical formula posted in my first message) : IF BarIndex<20 then VolatNK = Undefined else MB=Average[20](TypicalPrice) I=19 D2=0 While I>=0 Do D2=D2+Square((TypicalPrice-MB)/MB) I=I-1 Wend VolatNK=LOG(SQRT(D2/20)) Hope someone will find out how to translate it into MSFL. Regards, Imothep PS : Wabbit, I am sure for the following assumptions : C = typical() MB = mov(typical(),20,s)
StorkBite  
#13 Posted : Thursday, September 8, 2005 2:47:30 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
[quote=log(a3);". Do you have something to reference your results to to know if it produces the desired results? I think the confusion in your original request came from having no definition of the symbols used in the mathematical equation.
Patrick  
#14 Posted : Thursday, September 8, 2005 3:17:35 PM(UTC)
Patrick

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 sorry to bust your chops but this is wrong as well, you have a prev value in there ... D2=D2+Square((TypicalPrice-MB)/MB) ... And because it is a loop of 20 period you have to sum D2 for 20 periods ... And that's where it crashes :D My guess is it can't be done with msfl .... Maybe a dll or maybe I'm wrong and someone else will post the answer ... Here is what I would have wrote : MB:=Mov(Typical(),20,S); D2:=Sum(PREV+Sqrt((Typical()-MB)/MB),20); Log(Sqrt(D2/20)) Patrick :mrgreen:
StorkBite  
#15 Posted : Thursday, September 8, 2005 3:24:37 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
[quote=prev+" to the mix. Let's get this straight... I have too much time in now to let it go. Unfortunately, I am not in front of my computer to check it out further. :D
Patrick  
#16 Posted : Thursday, September 8, 2005 3:27:33 PM(UTC)
Patrick

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)
Quote:
I am not in front of my computer
#-o Ok ... So who is posting messages on the forum then :lol: :oops: I don't think the sum takes care of it ... Patrick :mrgreen:
StorkBite  
#17 Posted : Thursday, September 8, 2005 3:30:51 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
I'm in front of someone else's computer... but, you never said that you needed unique ISP's! :-w)
Patrick  
#18 Posted : Thursday, September 8, 2005 3:32:51 PM(UTC)
Patrick

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)
:lol: Nice!!! Keep up the good work :D
StorkBite  
#19 Posted : Thursday, September 8, 2005 3:37:03 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Quote:
MB:=Mov(Typical(),20,S); D2:=Sum(PREV+Sqrt((Typical()-MB)/MB),20); Log(Sqrt(D2/20))
Actually, I hope you're right. If I had gotten it, that would have been like a blind man hitting a bulls eye! I got tangled up in that funky nondescript notation.
Nag  
#20 Posted : Thursday, September 8, 2005 3:41:50 PM(UTC)
Nag

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/2/2005(UTC)
Posts: 7
Location: Aix-en-Provence - France

It also seems to me that this kind of formula can't be done with MSFL... but it wouldn't be a problem to create a DLL for it. Let me know if you need that Patrick (aka Nag) metastock.thenexttools.com (please don't laugh, site construction has just begun)
Users browsing this topic
Guest (Hidden)
2 Pages12>
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.