Metastock indikatörler

Collapse
X
 
  • Saat
  • Show
Clear All
new posts
  • teo
    Demirbaş
    • 03 Mart 2009
    • 3712

    #16
    MetaStock code for the Special K and MA, weekly


    p1:=Input("Enter MA Value",1,500,52);
    p2:=Input("Enter MA Value",1,500,26);

    (Mov(ROC(C,4,%),4, E)*1)+(Mov(ROC(C,5,%),5, E)
    *2)+(Mov(ROC(C,6,%),6, E)*3)+(Mov(ROC(C,8,%),6, E)*5)+
    (Mov(ROC(C,10,%),10,E)*1)+((Mov(ROC(C,13,%),13,E)* 2)+
    (Mov(ROC(C,15,%),15,E)*3)+(Mov(ROC(C,20,%),20,E)*4 )*1)+
    ((Mov(ROC(C,39,%),26,E)*1)+(Mov(ROC(C,52,%),26,E)* 2)+
    (Mov(ROC(C,78,%),26,E)*3)+(Mov(ROC(C,104,%),39,E)* 4)*1);

    Mov(Mov((Mov(ROC(C,4,%),4, E)*1)+(Mov(ROC(C,5,%),5, E)*2)+
    (Mov(ROC(C,6,%),6, E)*3)+(Mov(ROC(C,8,%),6, E)*5)+
    (Mov(ROC(C,10,%),10,E)*1)+((Mov(ROC(C,13,%),13,E)* 2)+
    (Mov(ROC(C,15,%),15,E)*3)+(Mov(ROC(C,20,%),20,E)*4 )*1)+
    ((Mov(ROC(C,39,%),26,E)*1)+(Mov(ROC(C,52,%),26,E)* 2)+
    (Mov(ROC(C,78,%),26,E)*3)+(Mov(ROC(C,104,%),39,E)* 4)*1),p1,S),p2,S);

    zero:=0;
    zero;

    Yorum

    • teo
      Demirbaş
      • 03 Mart 2009
      • 3712

      #17
      Special K and MA Formula for METASTOCK Daily


      p1:= Input("Enter First MA Time Span",1,500,100);
      p2:= Input("Enter First MA Time Span",1,500,100);
      (Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%),10,S)*2 )+
      (Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4 )+
      Mov(ROC(C,50,%),50,S)*1+(Mov(ROC(C,65,%),65,S)*2)+
      (Mov(ROC(C,75,%),75,S)*3)+(Mov(ROC(C,100,%),100,S) *4)+
      (Mov(ROC(C,195,%),130,S)*1)+(Mov(ROC(C,265,%),130, S)*2)+
      (Mov(ROC(C,390,%),130,S)*3)+(Mov(ROC(C,530,%),195, S)*4);

      Mov(Mov((Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%) ,10,S)*2)+
      (Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4 )+
      Mov(ROC(C,50,%),50,S)*1+(Mov(ROC(C,65,%),65,S)*2)+
      (Mov(ROC(C,75,%),75,S)*3)+(Mov(ROC(C,100,%),100,S) *4)+
      (Mov(ROC(C,195,%),130,S)*1)+(Mov(ROC(C,265,%),130, S)*2)+
      (Mov(ROC(C,390,%),130,S)*3)+(Mov(ROC(C,530,%),195, S)*4),p1,S),p2,S);

      zero:=0;
      zero;
      zero:=0;

      Yorum

      • teo
        Demirbaş
        • 03 Mart 2009
        • 3712

        #18
        ARSI MetaStock Formula

        With thanks to William Golson of Equis Technical Support and the MetaStock
        Forum Crew for their Forum.dll file:

        {ARSI MetaStock formula}
        Period:=Input("ARSI Time Period ->",1,100,14);
        UpCount:=Sum(If(ROC(C,1,$)>=0,1,0),Period);
        DnCount:=Period-UpCount;
        UpMove:=ExtFml("Forum.MOV",If(ROC(C,1,$)>=0,ROC(C, 1,$),0),UpCount*2-1,E);
        DnMove:=ExtFml("Forum.MOV",If(ROC(C,1,$)<0,Abs(ROC (C,1,$)),0),DnCount*2-1,E);
        RS:=UpMove/(DnMove+0.0001);
        100-(100/(1+RS));

        To use this formula, you need the external forum.dll file that has a function
        for a dynamic moving average. You can find this file on the Equis forum at
        http://forum.equis.com/.
        Forum.dll

        Yorum

        • teo
          Demirbaş
          • 03 Mart 2009
          • 3712

          #19
          METASTOCK CODE FOR THE MACD LEADER

          Indicator1:=Mov(C,12,E)+Mov(C-Mov(C,12,E),12,E);
          Indicator2:=Mov(C,26,E)+Mov(C-Mov(C,26,E),26,E);
          Leader:=Indicator1-Indicator2;
          Leader;

          Yorum

          • teo
            Demirbaş
            • 03 Mart 2009
            • 3712

            #20
            IMPROVIAN CODE FOR THE MACD LEADER

            Var
            shortEMA:=EMA(C,12);
            LongEMA:=EMA(C,26);
            Indicator1:=ShortEMA+EMA(C-ShortEMA,12);
            Indicator2:=LongEMA+EMA(C-LongEMA,26);
            Leader:=Indicator1-Indicator2;
            End_Var

            Return Leader;

            Yorum

            • teo
              Demirbaş
              • 03 Mart 2009
              • 3712

              #21
              TEMA

              Tema(Close, 10, Exponential)
              Or a more general method:
              3*Mov(C,10,E)-3*Mov(Mov(C,10,E),10,E)+Mov(Mov(Mov(C,10,E),10,E), 10,E)
              where Mov = moving average, C = Closing price,
              E = Exponential average

              Yorum

              • teo
                Demirbaş
                • 03 Mart 2009
                • 3712

                #22
                HEIKIN-ASHI

                haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2;
                haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+Min(L,haOpen))/4;

                Yorum

                • teo
                  Demirbaş
                  • 03 Mart 2009
                  • 3712

                  #23
                  ZERO-LAGGING EMA AND TEMA

                  EMA
                  Period:= Input("What Period",1,250,10);
                  EMA1:= Mov(CLOSE,Period,E);
                  EMA2:= Mov(EMA1,Period,E);
                  Difference:= EMA1 - EMA2;
                  ZeroLagEMA:= EMA1 + Difference;
                  ZeroLagEMA

                  Yorum

                  • teo
                    Demirbaş
                    • 03 Mart 2009
                    • 3712

                    #24
                    TEMA

                    Period := Input("What TEMA period? ",1,250,10);
                    TMA1:= Tema(CLOSE,period);
                    TMA2:= Tema(TMA1,period);
                    Difference:= TMA1 - TMA2;
                    ZeroLagTMA:= TMA1 + Difference;
                    ZeroLagTMA

                    Yorum

                    • teo
                      Demirbaş
                      • 03 Mart 2009
                      • 3712

                      #25
                      MOVING AVERAGES USED


                      Typical price zero-lagging TEMA
                      MetaStock formula:
                      period := Input("Average TEMA period? ",1,100,55);
                      TMA1:= Tema(Typ(),period);
                      TMA2:= Tema(TMA1,period);
                      Difference:= TMA1 - TMA2;
                      ZeroLagTMA:= TMA1 + Difference;
                      ZeroLagTMA

                      Yorum

                      • teo
                        Demirbaş
                        • 03 Mart 2009
                        • 3712

                        #26
                        Heikin-ashi zero-lagging TEMA

                        MetaStock formula:
                        avg := Input("Average TEMA period? ",1,100,55);
                        haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2;
                        haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+
                        Min(L,haOpen))/4;
                        TMA1:= Tema(haC,avg);
                        TMA2:= Tema(TMA1,avg);
                        Diff:= TMA1 - TMA2;
                        ZeroLagHA:= TMA1 + Diff;
                        ZeroLagHA

                        Yorum

                        • teo
                          Demirbaş
                          • 03 Mart 2009
                          • 3712

                          #27
                          Buying formula (MetaStock)

                          Avg:=55; {a 55 fixed day average}
                          haOpen:=(Ref((O+H+L+C)/4,-1) + PREV)/2;
                          haC:=((O+H+L+C)/4+haOpen+Max(H,haOpen)+Min
                          (L,haOpen))/4;
                          TMA1:= Tema(haC,avg);
                          TMA2:= Tema(TMA1,avg);
                          Diff:= TMA1 - TMA2;
                          ZlHa:= TMA1 + Diff;
                          TMA1:= Tema(typ(),avg);
                          TMA2:= Tema(TMA1,avg);
                          Diff:= TMA1 - TMA2;
                          ZlCl:= TMA1 + Diff;
                          cross(ZlCl,ZlHa) {crossover of the zero-lagging TEMA on the typical price
                          and the zero-lagging TEMA of the heikin-ashi closing price}

                          Yorum

                          • teo
                            Demirbaş
                            • 03 Mart 2009
                            • 3712

                            #28
                            Selling formula (MetaStock)

                            Similar to the buying formula except the last line, which makes the crossover
                            the other way around - that is, cross(ZlHa,ZlCl)

                            Yorum

                            • teo
                              Demirbaş
                              • 03 Mart 2009
                              • 3712

                              #29
                              20-BAR ZERO-LAGGING EMA for MetaStock

                              Period:= Input("What Period?",1,100,20);
                              EMA1:= Mov(CLOSE,Period,E);
                              EMA2:= Mov(EMA1,Period,E);
                              Difference:= EMA1 - EMA2;
                              ZeroLagEMA:= EMA1 + Difference;
                              ZeroLagEMA

                              Yorum

                              • teo
                                Demirbaş
                                • 03 Mart 2009
                                • 3712

                                #30
                                TRAILING-STOP REVERSAL for MetaStock

                                stop:= Input("Trailing Stop",0,20,7);
                                trail:= If(C=PREV,PREV,
                                If(((Ref(C,-1)< PREV) AND (C< PREV)),
                                Min(PREV,C*(1+stop/100)),
                                If((Ref(C,-1)>PREV) AND (C>PREV),
                                Max(PREV,C*(1-stop/100)),
                                If(C>PREV,C*(1-stop/100),C*(1+stop/100)))));
                                trail

                                Yorum

                                Working...
                                X

                                Debug Information