Sayfa 19/27 İlkİlk ... 91718192021 ... SonSon
Arama sonucu : 215 madde; 145 - 152 arası.

Konu: Multi Time Frame ve Koklatılan İndiktorler

  1. #145
     Alıntı Originally Posted by Trade Yazıyı Oku
    bende bu şekilde farklılıklar oluştu
    Grafigindeki sistem formulunu özelden gönder bir bakayım....
    Hata varsa formulumde, modifiye edeyim...
    Dürüstlük pahalı bir mülktür, ucuz insanlarda bulunmaz. Honore Balssa

  2. #146
     Alıntı Originally Posted by uufuk Yazıyı Oku


    Üssel ortalamanın,normal açık formulunden kaynaklı hata...
    Bak basit ortalamada o hata yok.Basit ortalamaya kendim açık formul yazdım...
    Üssel e bir bar önceki degeri kullanmak zorunda oldugundan,daha çözüm bulamadım...
    İyileştirme var ama tam sonuç daha yok...
    Data sayısına oranla yüksek peryotlu ortalamada hata kaçınılmaz oluyor....
    sayın uufuk ema için linkteki dökümanda sizinkinden biraz farklı bir yaklaşım var, aradığınıza çözüm olabilir mi diye paylaşıyorum.
    Step 2: The Logic
    Start with the initial values that will not change. The time interval is fixed but assigned to a variable. Alpha is also fixed but still needs to be calculated:
    tp:= 40; {EMA time periods}
    alpha:= 2 / (tp +1);
    Next, the formula to identify the start of a new time period should be done. This is best near the top so it is easily changed allowing the basic logic of a formula to be reused with just minor 78changes. The formula for an hourly extrapolation will look for
    a change in the value of the Hour() function. Since the 5 minute interval is where the formula will be applied and 5 minutes is evenly divisible into 60 minutes, this extrapolation is possible. The same logic for a daily extrapolation can be used. Just change the DayOfWeek() function to the Hour() function:
    new:=ROC(Hour(),1,$)<>0;
    This identifies when a new hour starts. However, the average needs to use the Close of the previous hour for the calculation. So, each time new is true, the Ref() function is used to get the previous bar’s close for the new value in the average. If new is not
    true, use PREV to “remember†the last value of the average. This same PREV is used for the value of the average from the previous interval to calculate the next of the average:
    EMA:= If( new, ( Ref(C, -1) * alpha) + ( PREV * (1-alpha)), PREV);
    However, this calculation does not seed the average with the close of the first hour in the chart. PREV has the value of zero at the start of the chart. This means the value of EMA will start at zero and slowly increase over the next several hours before it
    gets to a value close to what the prices are. Typically, this would take one to two times the length of the average. To avoid that, the average can be assigned a value to start with. This seed value will then be used by PREV as a jump-start, instead of the value of zero.To seed the average, another If() must be combined with the first. When new is true, this If() is checked first and can only be true on the first hour of the chart. The Cum() function can be used to count the number of times new has been TRUE:
    EMA:= If
    ( new, If( Cum( new ) = 1, Ref(C, -1),
    ( Ref(C, -1) * alpha) + ( PREV * (1-alpha))), PREV);
    Step 3: The Final FormulaNow all that remains is to call the EMA variable so the formula will plot the value. The final formula should look something like this:
    tp:= 40; {EMA time periods}
    new:=ROC(Hour(),1,$)<>0;
    alpha:= 2 / (tp +1);
    EMA:=
    If
    ( new, If( Cum( new ) = 1, Ref(C, -1),
    ( Ref(C, -1) * alpha) + ( PREV * (1-alpha)), PREV));
    EMA

    bu ilgili dökümanın linki sayfa 80
    https://www.metastock.com/customer/r..._Primer_II.pdf
    matriks için denemedim çalışır mı fikrim yoktur. saygılar

  3. #147
     Alıntı Originally Posted by Trade Yazıyı Oku
    bende bu şekilde farklılıklar oluştu
     Alıntı Originally Posted by uufuk Yazıyı Oku
    Grafigindeki sistem formulunu özelden gönder bir bakayım....
    Hata varsa formulumde, modifiye edeyim...
    Dostumuz,sagolsun özelden formulunu gönderdi...
    Tahmin ettigim gibi formulun nihayi kararı > < = => <= operatorleriyle saptanıyordu...

    Formulumde gerekli düzeltmeyi yaptım ama önce hatanın sebebini açıklayacagım...
    Cross(Data1,Data2) mevcut iki datanın kesişmesi yani kıyası yapılırken degişim anını yakalar...
    Tek degişim anında sinyal uyarı verir, ama > < = => <= sürekli deger üretir...

    al:=Mov(C,13,S)>Mov(C,50,S);
    sat:=Mov(C,13,S)<Mov(C,50,S);
    al;sat


    Dostumuzun sistemi bu temelli,Metastock ve Matriks karşılaştırması ....





    Hatamızın nedeni, kendi sistem hesaplarında kullandıgı "IS DEFİNED" fonksiyonunu indikator yazılımda bize kullandırtmaması...Çözüm bir sonraki mesajda ....
    Dürüstlük pahalı bir mülktür, ucuz insanlarda bulunmaz. Honore Balssa

  4. #148
    AL_SAT kararı Cross ile verilen örnek...







    AL_SAT kararı > < >= <= = ile verilen örnek...






    islemTipi:=Input("Alsat1 Tum0",0,1,1); ---->İŞLEM TİPİ
    n:=50; --------------------------------------->FORMULUMUZDE BULUNAN EN BÜYÜK PERYOT örnegimizde 50
    {al:=Cross(mov(c,13,s),mov(c,50,s)); sat:=Cross(mov(c,50,s),mov(c,13,s)); }-->AL_SAT FORMULUMUZ
    al:=mov(c,13,s)>mov(c,50,s); sat:=mov(c,13,s)<mov(c,50,s); -->AL_SAT FORMULUMUZ
    al:=if(al and cum(1)=>n,1,0) ; sat:=if(sat and cum(1)=>n,1,0) ;
    z:=valuewhen(1,al-sat,al-sat);
    st:=if(BarsSince(cross(cum(al or sat),0.5))>0,1,0);
    ov0:=cum(if(ref(z,-1)=1,ROC(c,1,$),if(ref(z,-1)=-1,-ROC(c,1,$))))*st;
    ov1:=cum(ref(z,-1)*ROC(c,1,$))*st;
    if(islemTipi=1,ov0,ov1)

    Burada kendimiz "IS DEFINED" oluşturtuk..
    SON Formulasyon

    Kod:
    islemTipi:=Input("Alsat1 Tum0",0,1,1);     n:=50;
    {al:=Cross(mov(c,13,s),mov(c,50,s));   sat:=Cross(mov(c,50,s),mov(c,13,s)); }
     al:=mov(c,13,s)>mov(c,50,s);   sat:=mov(c,13,s)<mov(c,50,s);   
    al:=if(al and cum(1)=>n,1,0) ;      sat:=if(sat and cum(1)=>n,1,0) ; 
    z:=valuewhen(1,al-sat,al-sat);
    st:=if(BarsSince(cross(cum(al or sat),0.5))>0,1,0);                
    ov0:=cum(if(ref(z,-1)=1,ROC(c,1,$),if(ref(z,-1)=-1,-ROC(c,1,$))))*st;
    ov1:=cum(ref(z,-1)*ROC(c,1,$))*st;  if(islemTipi=1,ov0,ov1)
    Dürüstlük pahalı bir mülktür, ucuz insanlarda bulunmaz. Honore Balssa

  5. #149
    mtf ema
    1 dk hariç tüm periyotlarda çalışmaktadır,
    formül, günlük emanın alt periyotlarda gösterilmesi
    tp:= 4;
    Nw:=ROC( DayOfWeek() ,1,$)<>0;
    a1:= 2 / (tp +1);
    if(nw,If( Cum( nw ) = 1, Ref(c, -1), Ref(c, -1)*a1 + (PREV*(1-a1))),prev)

  6. #150
     Alıntı Originally Posted by EWP Yazıyı Oku
    mtf ema
    1 dk hariç tüm periyotlarda çalışmaktadır,
    formül, günlük emanın alt periyotlarda gösterilmesi
    Dostum,bu formul 1dak da çalışır...
    Önceki gönderinde belirtdigin üzere uzun peryotlarda sorunumuz vardı..
    İyileştirme yaptım ama tam netice degil demişdim...
    Formulu matrikse uyduramamışsın devamını ben getireyim...

    tp:= 4;
    Nw:=ROC( DayOfWeek() ,1,$)<>0;
    a1:= 2 / (tp +1);
    if(nw,If( Cum( nw ) = 1, Ref(c, -1), Ref(c, -1)*a1 + (PREV*(1-a1))),prev)

    Cum( nw ) = 1 hiç bir zaman gerçekleşmez çünkü nw gün başı -1 üretir....

    Şu şekil olmalıydı...

    tp:= 4;
    Nw:=ROC( DayOfWeek() ,1,$)<>0;
    a1:= 2 / (tp +1);
    if(nw,If( Cum(nw ) = -1, Ref(c, -1), Ref(c, -1)*a1 + (PREV*(1-a1))),prev)


    -------------------
    Kaynak paylaşımın için teşekkür...
    Benim iyileştirmem kaynakdaki bu örnekdekden daha iyi...
    Son aşamada sizlerle paylaşırım...
    -----------------
    Dürüstlük pahalı bir mülktür, ucuz insanlarda bulunmaz. Honore Balssa

  7. Elinize sağlık abiler teşekkürler..
    ''Borsa tembel yatırımcılar için hiç uygun değildir. Çalışkan, öğrenmeyi, yeniden öğrenmeyi sevenler için ise en ideal, en yüksek kazançlı yatırım alanıdır.'' P.Lynch

  8. #152
    ok sn. uufuk, düzeltme için teşekkürler. böylece formülün her parçasının ayrı ayrı kontrol edilmesi gerekliliğini de öğrendik.

    aslında iki cross fonksiyonunu birleştirmeye çalışıyordum internette araştırayım dedim. farklı bir yaklaşım var mı diye. o site bu site ilgili döküman çıktı. kısaca okurken sizin ema ile yazdıklarınız aklıma geldi, ben de buraya aktardım. işin özü ben simple taraftarıyım.

Sayfa 19/27 İlkİlk ... 91718192021 ... SonSon

Yer İmleri

Yer İmleri

Gönderi Kuralları

  • Yeni konu açamazsınız
  • Konulara cevap yazamazsınız
  • Yazılara ek gönderemezsiniz
  • Yazılarınızı değiştiremezsiniz
  •