Announcement

Collapse
No announcement yet.

Metastock easylanguage conversion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Metastock easylanguage conversion

    This was posted on a forum and I am looking to use it in esignal. Is there an easy way to convert?? Thanks for your help.

    'Gann HiLo' MetaStock Indicator code.

    HLd:=If(CLOSE>Ref(Mov(H,2,S),-1),
    {then}1,
    {else}If(CLOSE<Ref(Mov(L,2,S),-1),
    {then}-1,
    {else}0));
    HLv:=ValueWhen(1,HLd<>0,HLd);
    HiLo:=If(HLv=-1,
    {then}Mov(H,2,S),
    {else}Mov(L,2,S));
    HiLo;

    'Gann HiLo' trading system, MetaStock Expert code.

    {Highlights: Buy}
    HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),1,If(CLOSE<Ref(Mov(L,3,S),-1),-1,0));
    HLv:=ValueWhen(1,HLd<>0,HLd);
    HiLo:=If(HLv=-1,Mov(H,3,S),Mov(L,3,S));
    Buy:=Cross(C,HiLo);
    Sell:=Cross(HiLo,C);
    X:=If(BarsSince(Buy)<BarsSince(Sell),1,If(BarsSinc e(Buy)>BarsSince(Sell),0,1));
    X=1

    {Highlights: Sell}
    HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),1,If(CLOSE<Ref(Mov(L,3,S),-1),-1,0));
    HLv:=ValueWhen(1,HLd<>0,HLd);
    HiLo:=If(HLv=-1,Mov(H,3,S),Mov(L,3,S));
    Buy:=Cross(C,HiLo);
    Sell:=Cross(HiLo,C);
    X:=If(BarsSince(Buy)<BarsSince(Sell),1,If(BarsSinc e(Buy)>BarsSince(Sell),0,1));
    X=0

    {Symbol: Buy}
    HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),1,If(CLOSE<Ref(Mov(L,3,S),-1),-1,0));
    HLv:=ValueWhen(1,HLd<>0,HLd);
    HiLo:=If(HLv=-1,Mov(H,3,S),Mov(L,3,S));
    Buy:=Cross(C,HiLo);
    Sell:=Cross(HiLo,C);
    X:=If(BarsSince(Buy)<BarsSince(Sell),1,If(BarsSinc e(Buy)>BarsSince(Sell),0,1));
    X=1 AND Ref(X,-1)=0

    {Symbol: Sell}
    HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),1,If(CLOSE<Ref(Mov(L,3,S),-1),-1,0));
    HLv:=ValueWhen(1,HLd<>0,HLd);
    HiLo:=If(HLv=-1,Mov(H,3,S),Mov(L,3,S));
    Buy:=Cross(C,HiLo);
    Sell:=Cross(HiLo,C);
    X:=If(BarsSince(Buy)<BarsSince(Sell),1,If(BarsSinc e(Buy)>BarsSince(Sell),0,1));
    X=0 AND Ref(X,-1)=1

    Edit: include Indicator.

  • #2
    There's no easy way to convert this (i.e. a MS --> EFS conversion tool), so it would need to be pulled apart and recoded back into EFS. Unless you are familiar with both languages, I would suggest looking into one of our EFS Development Partners, who might me able to do this for you.
    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11

    Comment


    • #3
      MetaStock -&gt; *.EFS

      Bondo,

      I have converted about 10 MS formulae to EFS JScript. It is LOT OF WORK! The lines of code ratio is about 5-10 JScript lines = 1 Formula Language line - depending, of course.

      I'm not in the conversion business. but I looked over your MS script and I think it would be a fairly major project

      Good Luck,

      Reef Break

      Comment


      • #4
        Thanks for looking at it.....

        I will need to go another route.

        Comment


        • #5
          bondo,
          were you able to get that code sorted? I am in the process of translating some of my EL code to EFS as well and wanted to know if you found a solution you could recommend. thanks,
          c_13

          Comment


          • #6
            No I was not able to get it done. I am looking into other alternatives.

            Comment


            • #7
              hey bondo I am dealing with the similar conversion issues. I started a thread on the general topic:



              check it out when you get some time -- feel free to post your questions etc. if you think it might be helpful.


              c_13

              Comment

              Working...
              X