|
|
Translating Metastock Formulas Into Other Languages
Last post 10-30-2005, 16:12 by Patrick. 16 replies.
-
10-25-2005, 14:24 |
-
btconnolly
-
-
-
Joined on 10-25-2005
-
-
Posts 9
-
-
|
Translating Metastock Formulas Into Other Languages
I am trying to translate a formula that includes the Swing Index (Wells-Wilder) and the Projection Oscillator (Mel Widner) that come standard on Metastock. Unfortunately there is no detail on how those formulas work in Metastock Help and they are not listed on www.meta-formula.com either. Can anyone provide a Metastock or Excel language interpretation of these indicators so I can convert my formula in to a more sophisticated back-testing system? Many thanks,
|
|
-
10-25-2005, 14:27 |
-
Patrick
-
-

-
Joined on 09-08-2004
-
Lyon
-
Posts 2,292
-
-
|
Re: Translating Metastock Formulas Into Other Languages
I just did a lot of work on the Accumulation swing index ... My best / only advice is to get the book ...
"New Concepts in technical trading systems" by J.Welles Wilder
Patrick :mrgreen:
My Site
|
|
-
10-25-2005, 14:35 |
-
Patrick
-
-

-
Joined on 09-08-2004
-
Lyon
-
Posts 2,292
-
-
|
Re: Translating Metastock Formulas Into Other Languages
Since I have the book opened, here is the formula for the swing index :D
Code:
SI = 50[(c2-c1 + .5(c2-o2) + .25(c1-o1))/R] . K/L
Where K is the largest of
H2-C1
L2-C1
And L the value of a limit move in one direction.
Patrick :mrgreen:
My Site
|
|
-
10-25-2005, 14:43 |
-
Patrick
-
-

-
Joined on 09-08-2004
-
Lyon
-
Posts 2,292
-
-
|
Re: Translating Metastock Formulas Into Other Languages
C2 is today's close
C1 is yesterday's close
R is the largest of
Code:
(H2-C1) + .5(L2-O2) + .25(C1-O1)
(L2-C1) + .5(H2-O2) + .25(C1-O1)
(H2-L2) + .25(C1-O1)
Patrick :mrgreen
My Site
|
|
-
10-25-2005, 15:05 |
-
wabbit
-
-

-
Joined on 10-28-2004
-
Perth, Western Australia
-
Posts 2,042
-
-
|
Re: Translating Metastock Formulas Into Other Languages
If I have interpreted what you have posted so far, this should be pretty close....?
---8<-----------------------------
{Using Patrick's strange nomenclature?}
C1:=Ref(C,-1);
C2:=C;
H1:=Ref(H,-1);
H2:=H;
L1:=Ref(L,-1);
L2:=L;
O1:=Ref(O,-1);
O2:=O;
R1:=(H2-C1)+.5*(L2-O2)+.25*(C1-O1);
R2:=(L2-C1)+.5*(H2-O2)+.25*(C1-O1);
R3:=(H2-L2)+.25*(C1-O1);
R:=Max(Max(R1,R2),R3);
K:=Max(H2-C1,L2-C1);
{And LL the value of a limit move in one direction???}
SI:=50*(((c2-c1) + 0.5*(c2-o2) + 0.25*(c1-o1))/R)*(K/LL);
SI;
---8<------------------------------
WITH THE EXCEPTION of the LL variable??? Good luck in defining that in MS! :evil:
But what is it supposed to show? Beats me so far! Guess I will have to wait for the next thrilling installment of, "Patrick's Messing With Our Minds!"
wabbit :D
"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim." Edsgar W. Dijkstra MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC C, 11 PRO w/QC & MDK For custom MetaStock programming : http://www.wabbit.com.au My SkyPE status :  My SkyPE account : wabbit.com.au
|
|
-
10-25-2005, 15:14 |
-
Patrick
-
-

-
Joined on 09-08-2004
-
Lyon
-
Posts 2,292
-
-
|
Re: Translating Metastock Formulas Into Other Languages
Thannks Wabbit :D
Well after a few corrections we are at :
LL:=Input("Limit Move",0,1000,5);
C1:=Ref(C,-1);
C2:=C;
H1:=Ref(H,-1);
H2:=H;
L1:=Ref(L,-1);
L2:=L;
O1:=Ref(O,-1);
O2:=O;
R1:=(H2-C1)+.5*abs(L2-O2)+.25*(C1-O1);
R2:=abs(L2-C1)+.5*(H2-O2)+.25*(C1-O1);
R3:=(H2-L2)+.25*(C1-O1);
R:=Max(Max(R1,R2),R3);
K:=Max(H2-C1,Abs(L2-C1));
SI:=50*(
(
(c2-c1) +
0.5*(c2-o2) +
0.25*(c1-o1)
)/R)*(K/LL);
SI;
My Site
|
|
-
10-25-2005, 15:19 |
-
wabbit
-
-

-
Joined on 10-28-2004
-
Perth, Western Australia
-
Posts 2,042
-
-
|
Re: Translating Metastock Formulas Into Other Languages
That took you nine minutes to correct - getting slow! :lol:
LL being a user input threw a spanner in my thought processes, but now it all seems as clear as mud! So, the question still remains, what does it do?
wabbit :D
"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim." Edsgar W. Dijkstra MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC C, 11 PRO w/QC & MDK For custom MetaStock programming : http://www.wabbit.com.au My SkyPE status :  My SkyPE account : wabbit.com.au
|
|
-
10-25-2005, 15:48 |
-
10-25-2005, 15:53 |
-
Patrick
-
-

-
Joined on 09-08-2004
-
Lyon
-
Posts 2,292
-
-
|
Hey guys ... :D
It's nothing new, it is simply Wilders Swing Index indicator, we just made a custom version to help out Connely translating it into something else :)
But I guess you could mess around with it a little ... :P
Patrick :mrgreen:
My Site
|
|
-
10-25-2005, 16:01 |
-
10-25-2005, 16:42 |
-
btconnolly
-
-
-
Joined on 10-25-2005
-
-
Posts 9
-
-
|
Any Possibility of Getting the Projection Oscillator
you guys are great. Thanks for the Swing Indicator breakdown. Any possibility for doing the same with the Projection Oscillator or is that pressing my luck??
|
|
-
10-25-2005, 16:46 |
-
Patrick
-
-

-
Joined on 09-08-2004
-
Lyon
-
Posts 2,292
-
-
|
Re: Any Possibility of Getting the Projection Oscillator
Well like I said I was working on Wilders ASI system so I had all the info avail ... ;)
But you should press your luck, that's what the forum is for :D
I don't know what "Projection Oscillator (Mel Widner)" is ... Do you have any info on it?
Is this in MetaStock?
Patrick :mrgreen:
My Site
|
|
-
-
10-25-2005, 19:08 |
-
Bulli
-
-

-
Joined on 09-26-2005
-
-
Posts 153
-
-
|
Slope of High
{14 period regression line of High)}
((14 * (Sum( Cum(1) * HIGH, 14))) - (Sum( Cum(1),14) * ( Sum(HIGH, 14)))) /
((14 * Sum( Pwr( Cum(1), 2), 14)) - Pwr( Sum(Cum(1),14), 2))
Slope of Low
{14 period regression line of Low}
((14 * (Sum( Cum(1) * LOW, 14))) - (Sum( Cum(1), 14) * ( Sum(LOW, 14)))) /
((14 * Sum( Pwr( Cum(1), 2), 14)) - Pwr( Sum(Cum(1),14), 2))
Upper Projection Band
Max(HIGH,
Max( Ref(HIGH,-1) + 1 * Fml("slope of high"),
Max( Ref(HIGH,-2) + 2 * Fml("slope of high"),
Max( Ref(HIGH,-3) + 3 * Fml("slope of high"),
Max( Ref(HIGH,-4) + 4 * Fml("slope of high"),
Max( Ref(HIGH,-5) + 5 * Fml("slope of high"),
Max( Ref(HIGH,-6) + 6 * Fml("slope of high"),
Max( Ref(HIGH,-7) + 7 * Fml("slope of high"),
Max( Ref(HIGH,-8) + 8 * Fml("slope of high"),
Max( Ref(HIGH,-9) + 9 * Fml("slope of high"),
Max( Ref(HIGH,-10) + 10 * Fml("slope of high"),
Max( Ref(HIGH,-11) + 11 * Fml("slope of high"),
Max( Ref(HIGH,-12) + 12 * Fml("slope of high"),
Ref(HIGH,-13) + 13 * Fml("slope of high"))))))))))))))
Lower Projection Band
Min(LOW,
Min( Ref(LOW,-1) + 1 * Fml("slope of low"),
Min( Ref(LOW,-2) + 2 * Fml("slope of low"),
Min( Ref(LOW,-3) + 3 * Fml("slope of low"),
Min( Ref(LOW,-4) + 4 * Fml("slope of low"),
Min( Ref(LOW,-5) + 5 * Fml("slope of low"),
Min( Ref(LOW,-6) + 6 * Fml("slope of low"),
Min( Ref(LOW,-7) + 7 * Fml("slope of low"),
Min( Ref(LOW,-8) + 8 * Fml("slope of low"),
Min( Ref(LOW,-9) + 9 * Fml("slope of low"),
Min( Ref(LOW,-10) + 10 * Fml("slope of low"),
Min( Ref(LOW,-11) + 11 * Fml("slope of low"),
Min( Ref(LOW,-12) + 12 * Fml("slope of low"),
Ref(LOW,-13) + 13 * Fml("slope of low"))))))))))))))
Projection Oscillator
100 * (CLOSE -
Fml( "Lower Projection Band" )) /
( Fml( "Upper Projection Band" ) -
Fml( "Lower Projection Band" ))
This code I picked up on the net, the programmer is unkown, see if it helps.
Bulli
|
|
-
10-25-2005, 19:11 |
-
10-30-2005, 15:07 |
-
10-30-2005, 16:12 |
|
|