Fikirler -> Sistemler

Collapse
This topic is closed.
X
X
 
  • Saat
  • Show
Clear All
new posts
  • teo
    Demirbaş
    • 03 Mart 2009
    • 3712

    #3616
    MACD REVERSED CROSSOVER SYSTEM CODE

    For MetaStock Exploration

    Long entry:
    Cross(Mov(MACD( ),9,E),MACD( ))

    Short entry:
    Cross(MACD( ),Mov(MACD( ),9,E))

    For MetaStock TradeSim Enterprise Exploration:

    EntryTrigger := Ref(Cross(Mov(MACD( ),9,E),MACD( )),-1);
    EntryPrice := OPEN;
    ExitTrigger := Ref(Cross(MACD( ),Mov(MACD( ),9,E)),-1);
    ExitPrice := OPEN;
    InitialStop := 0; { no initial stop used }

    ExtFml( "TradeSim.Initialize");
    ExtFml( "TradeSim.RecordTrades",
    "MACD Crossover Reversed", {Trade Data Filename}
    LONG, {Trade Position Type}
    EntryTrigger, {Entry Trigger}
    EntryPrice, {Entry Price }
    InitialStop, {Optional Initial Stop}
    ExitTrigger, {Exit Trigger}
    ExitPrice, {Exit Price}
    START); {Recorder Control}


    --Donald W. Pendergast Jr.

    Yorum

    • teo
      Demirbaş
      • 03 Mart 2009
      • 3712

      #3617
      MetaStock code for fixed-percentage trailing stop from "Using Initial And Trailing Stops" by Sylvain Vervoort


      Here, I calculate the maximum allowed loss based on a fixed percentage of the closing price.


      Fixed-percentage trailing stop for MetaStock

      {SVE_Stop_Trail%_Date: Fixed percentage trailing stop from date}
      InpMonth:=Input("Month",1,12,1);
      InpDay:=Input("Day",1,31,1);
      InpYear:=Input("Year",1800,2050,2009);
      LongShort:=Input("1=Long or 2=Short? ",1,2,1);
      InitStop:=Input("Initial Stop Price",0.1,10000,10);
      Perc:=Input("Trailing Stop Percentage",1,30,12);
      Loss:=C*Perc/100;
      Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
      StopLong:=ExtFml("AdvancedStop.StopLong", Entry,InitStop,0,C-Loss,0,0,0,0);
      StopShort:=ExtFml("AdvancedStop.StopShort",Entry,
      Initstop,0,C+Loss,0,0,0,0);
      Trail:=If(LongShort=1,Stoplong,Stopshort);
      Trail

      Yorum

      • teo
        Demirbaş
        • 03 Mart 2009
        • 3712

        #3618
        MetaStock code for "Average True Range Trailing Stops" by Sylvain Vervoort




        Code from page 34 of the June 2009 issue:

        {Get the required ATR period;}
        period:=Input("ATR Period :",1,100,5);
        {Calculate the biggest difference based on the true range concept;}
        diff1:=Max(H-L,Abs(H-Ref(C,-1)));
        diff2:=Max(diff1,Abs(L-Ref(C,-1)));
        {Use Wilders' moving average method to calculate the Average True Range;}
        Mov(diff2,period*2-1,E)


        Sidebar code from page 35 of the June 2009 issue:

        ATR TRAILING STOP

        {SVE_Stop_trail_ATR}
        atrper:=Input("ATR period :",1,100,5);
        atrfact:=Input("ATR multiplication :",1,10,3.5);
        loss:=atrfact*ATR(atrper);
        trail:=
        If(C>PREV AND Ref(C,-1)>PREV,
        Max(PREV,C-loss),
        If(C < PREV AND Ref(C,-1) < PREV,
        Min(PREV,C+loss),
        If(C>PREV,C-loss,C+loss)));
        Trail


        Code from page 36 of the June 2009 issue:

        Long position: SVE_StopLong_Trail_ATR_Date.

        {SVE_StopLong_Trail_ATR_Date - ATR trailing stop long from date}
        InpMonth:=Input("Month",1,12,1);
        InpDay:=Input("Day",1,31,1);
        InpYear:=Input("Year",1800,2050,2009);
        InitStop:=Input("Initial Stop Price",0.1,10000,10);
        atrper:=Input("ATR period :",1,100,5);
        atrfact:=Input("ATR multiplication :",1,10,3.5);
        loss:=atrfact*ATR(atrper);
        Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
        StopLong:=ExtFml( "AdvancedStop.StopLong", Entry,InitStop,0,C-Loss,0,0,0,0);
        StopLong

        Short position: SVE_StopShort_Trail_ATR_Date.

        {SVE_StopShort_Trail_ATR_Date - ATR trailing stop short from date}
        InpMonth:=Input("Month",1,12,1);
        InpDay:=Input("Day",1,31,1);
        InpYear:=Input("Year",1800,2050,2009);
        InitStop:=Input("Initial Stop Price",0.1,10000,10);
        atrper:=Input("ATR period :",1,100,5);
        atrfact:=Input("ATR multiplication :",1,10,3.5);
        loss:=atrfact*ATR(atrper);
        Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
        StopShort:=ExtFml("AdvancedStop.StopShort",Entry,
        InitStop,0,C+Loss,0,0,0,0);
        StopShort


        Sidebar code from page 38 of the June 2009 issue:

        ATR MODIFIED

        {SVE_ATR_Mod}
        period:=Input("ATR Period :",1,100,5);
        HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
        Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
        Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
        diff1:=Max(HiLo,Href);
        diff2:=Max(diff1,Lref);
        Wilders(diff2,period);


        Sidebar code from page 39 of the June 2009 issue:

        MODIFIED ATR WITH TRAILING STOPS

        {SVE_Stop_Trail_ATR_Mod}
        period:=Input("ATR period :",1,100,5);
        atrfact:=Input("ATR multiplication :",1,10,3.5);
        HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
        Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
        Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
        diff1:=Max(HiLo,Href);
        diff2:=Max(diff1,Lref);
        atrmod:=Wilders(diff2,period);
        loss:=atrfact*atrmod;
        trail:=
        If(C>PREV AND Ref(C,-1)>PREV,
        Max(PREV,C-loss),
        If(C < PREV AND Ref(C,-1) < PREV,
        Min(PREV,C+loss),
        If(C>PREV,C-loss,C+loss)));
        Trail


        Sidebar code from page 40 of the June 2009 issue:

        Modified ATR trailing stop from start date

        Since you are using your own trading method to finding entry points, you certainly want
        to be able to use your own entry date. So again, since the number of input parameters in
        MetaStock is limited to six, we have to create separate formulas for a long or a short
        position:

        Long position: SVE_StopLongMod_Trail_ATR_Date.

        {SVE_StopLongMod_Trail_ATR_Date}
        InpMonth:=Input("Month",1,12,1);
        InpDay:=Input("Day",1,31,1);
        InpYear:=Input("Year",1800,2050,2009);
        InitStop:=Input("Initial Stop Price",0.1,10000,10);
        period:=Input("ATR period :",1,100,5);
        atrfact:=Input("ATR multiplication :",1,10,3.5);
        HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
        Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
        Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
        diff1:=Max(HiLo,Href);
        diff2:=Max(diff1,Lref);
        atrmod:=Wilders(diff2,period);
        loss:=atrfact*atrmod;
        Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
        StopLong:=ExtFml( "AdvancedStop.StopLong", Entry,InitStop,0,C-Loss,0,0,0,0);
        StopLong

        Short position: SVE_StopShortMod_Trail_ATR_Date.

        {SVE_StopShortMod_Trail_ATR_Date}
        InpMonth:=Input("Month",1,12,1);
        InpDay:=Input("Day",1,31,1);
        InpYear:=Input("Year",1800,2050,2009);
        InitStop:=Input("Initial Stop Price",0.1,10000,10);
        period:=Input("ATR period :",1,100,5);
        atrfact:=Input("ATR multiplication :",1,10,3.5);
        HiLo:=If(H-L<1.5*Mov(H-L,period,S),H-L, 1.5*Mov(H-L,period,S));
        Href:=If(L<=Ref(H,-1),H-Ref(C,-1),(H-Ref(C,-1))-(L-Ref(H,-1))/2);
        Lref:=If(H>=Ref(L,-1),Ref(C,-1)-L,(Ref(C,-1)-L)-(Ref(L,-1)-H)/2);
        diff1:=Max(HiLo,Href);
        diff2:=Max(diff1,Lref);
        atrmod:=Wilders(diff2,period);
        loss:=atrfact*atrmod;
        Entry:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth();
        StopShort:=ExtFml("AdvancedStop.StopShort",
        Entry,InitStop,0,C+Loss,0,0,0,0);
        StopShort

        Yorum

        • teo
          Demirbaş
          • 03 Mart 2009
          • 3712

          #3619
          Inside Bar

          MQL5: Forum on automated trading systems and strategy testing

          Yorum

          • teo
            Demirbaş
            • 03 Mart 2009
            • 3712

            #3620
            Inside Bar Forex Trading Trigger Strategy

            Yorum

            • teo
              Demirbaş
              • 03 Mart 2009
              • 3712

              #3621
              IBNR4-1 Trading Naked Setup

              Yorum

              • teo
                Demirbaş
                • 03 Mart 2009
                • 3712

                #3622
                Multiple Timeframe Trading Video

                http://transcripts.fxstreet.com/2008...le-timefr.html

                Yorum

                • teo
                  Demirbaş
                  • 03 Mart 2009
                  • 3712

                  #3623
                  A Trading Technique using the Inside Bar with the MACD

                  Online Trading Community for Stocks Futures and Forex Traders

                  Yorum

                  • teo
                    Demirbaş
                    • 03 Mart 2009
                    • 3712

                    #3624
                    Sayın MOzkan gozukmuyor, bır kac gundur, umarım ıyıdır..

                    Yorum

                    • AMON RA
                      Yeni üye
                      • 27 Şubat 2009
                      • 1

                      #3625
                      Uzun zamandır yazmak kısmet olmamıştı.aslında bu topiğe yazmak bana zor üstadların içinde! Neyse karınca kararınca vadeli ile görüşüm şu şekilde. YVADE 60 dk grafik macd sat vermiş durumda ve belirgin bir uyumsuzluk söz konusu.Üssel ortalamalar kıvrılmaya başlamış budurum shortçuların işine gelsede 14 mayıs saat 11de oluşan dipten itibaren oluşan yükseliş kanalı halen kırılmış değil.Bu kanal kırılmadığı müddetçe yükseliş akımının devam edeceği düşünülür.Lakin hem oluşan uyumsuzluklar hemde dowun dün gece yaptığı hareketler. Kafamda soru işareti yaratıyor.
                      Eklenen Dosyalar

                      Yorum

                      • teo
                        Demirbaş
                        • 03 Mart 2009
                        • 3712

                        #3626
                        Bu topikte bir sürü sistem yazdık çorbaya döndü, BU nedenle yazdıklarımı ayrı topiklere tasıyacagım.Ve orada sistem olarak tartısırız.

                        Bu topıkte bellı bır ortak sıstem yoktur.Sadece fıkırlerımızı tartısalımdır.

                        Yorum

                        • PAŞA
                          Demirbaş
                          • 22 Mayıs 2009
                          • 100

                          #3627
                          teo Nickli Üyeden Alıntı Mesajı göster
                          Bu topikte bir sürü sistem yazdık çorbaya döndü, BU nedenle yazdıklarımı ayrı topiklere tasıyacagım.Ve orada sistem olarak tartısırız.

                          Bu topıkte bellı bır ortak sıstem yoktur.Sadece fıkırlerımızı tartısalımdır.

                          Sn.Teo

                          Bu siteye üye olalı 2-3 gün oldu.Topiğiniz o kadar yararlı ki en baştan okumaya başladım ve şu an 30 küsürüncü sayfadayım.
                          Bence yazılarınızı başka topiklere dağıtıp bizim işimizi zorlaştırmayın
                          Burada herşeyi bulabilelim.Sevgiler
                          BİR SOĞAN SOYULUYOR, YAŞARIYOR GÖZLER, BİR DEVLET SOYULUYOR, ALDIRMIYOR ÖKÜZLER....

                          Yorum

                          • bgungor68
                            ....................
                            • 06 Aralık 2007
                            • 809

                            #3628
                            Sevgili Teo, Matriksten Metatradere veri aktarma için yazdıgımız metod için de bir başlık açılsa olurmu?.. SAnırım "Keykafe" okuyucuları Meta trader ile Endeks grafiklerini nasıl oluyor diye düşünüyorlardır..

                            Yorum

                            • bgungor68
                              ....................
                              • 06 Aralık 2007
                              • 809

                              #3629
                              Sistemleri alt başlıkta toplamanız arşiv açısından çok süper olmuş. Lineer Regresyonu lütfen unutmayın ...

                              Yorum

                              • bgungor68
                                ....................
                                • 06 Aralık 2007
                                • 809

                                #3630
                                Market Profile metodu da bir alt başlığı hakediyor sanırım ... Bunlar bir kitapta toplansa nasıl olur?

                                Yorum

                                Working...
                                X

                                Debug Information