in Search

Translating Metastock Formulas Into Other Languages

Last post 10-30-2005, 16:12 by Patrick. 16 replies.
Sort Posts: Previous Next
  •  10-25-2005, 14:24 10466

    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 10468 in reply to 10466

    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 10469 in reply to 10466

    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 10471 in reply to 10466

    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 10473 in reply to 10466

    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 10475 in reply to 10466

    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 10476 in reply to 10466

    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 10478 in reply to 10466

    Wabbit & Patrick

    I do not know what this thing is supposed to do #-o , but I will tell one thing, it is giving some very interesting signals for Swing Trading! , it is worth investigating! :D

    Bulli :D
  •  10-25-2005, 15:53 10480 in reply to 10466

    Re: Wabbit & Patrick

    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 10481 in reply to 10466

    That is why then!

    Well, if it is the Swing index #-o , that is why it is giving interesting Swings! :lol: :lol: :lol:

    Bulli
  •  10-25-2005, 16:42 10487 in reply to 10466

    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 10488 in reply to 10466

    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, 18:38 10504 in reply to 10466

    Projection Oscillator

    Yes in Metastock the Projection Oscillator is
    ProjOsc(Regression Periods, Slowing Periods) - there is also a verbal explanation on what it is supposed to do.

    I found a math interpretation but I am not sure how to read it (I am neither a math guy nor a programmer but I am trying to make it easier for a programmer to understand for the translation) For instance, I don't understand what the X and b are referencing. Also, the [-x] appears slightly below and to the right of "high" and "low" in the formula below and I don't know what that means.



    HiSlope= slope of regression line of the high over n periods
    LowSlope = slope of regression line of the low over n periods
    HiBand = max over n periods of (high[-x] + b * X)
    LowBand= min over n periods of (low[-x] +b * X)

    PBoscillator = 100 x ((close – LowBand)/(Hiband - LowBand))
  •  10-25-2005, 19:08 10507 in reply to 10466

    Try This:

    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 10508 in reply to 10466

    Re: Try This:

    this smily 8) is actually: 8 )

    (Smily deos not show inside the code anymore, either someone fixed it :twisted: , or I was seeing things! :eek: )

    Bulli
  •  10-30-2005, 15:07 10745 in reply to 10466

    btconnolly

    Dear btconnolly,

    Referring to the private message you have sent to me asking about the link if there is one for the formula of this indicator:

    I preferred to post the link here in order to benefit others from the link

    http://trader.online.pl/MSZ/e-w-Projection_Oscillator.html

    The same site maybe is the best site there is for formulas.

    Best regards,
    Bulli :D
  •  10-30-2005, 16:12 10746 in reply to 10466

    Re: btconnolly

    either someone fixed it Twisted

    It was me :goofy:
    My Site
View as RSS news feed in XML