Teknik Analiz Dünyasına Hoşgeldiniz. Paylaşmak Güzeldir.

Yayından kaldırmak istediğiniz formüller için algoritmabul@gmail.com ile iletişime geçebilirsiniz... 

  • DİKKAT: Formüller, Sistemler sadece eğitim amaçlıdır. Alım satım, olası anapara kaybı ve diğer kayıplar dahil olmak üzere "YÜKSEK RİSK" içerir.
  • Mucize teknik gösterge yoktur, sadece doğru veya yanlış kullanılan göstergeler vardır.

Hareketli Ortalama Moving Average - Crossovers I by Dimitris Tsokakis

Hareketli Ortalamalar Göstergeler arasında en çok kullanılan indikatördür. Trend takip eden özelliği bulunmakla birlikte son geçmişte kalan belli bir zaman diliminin ortalaması alınarak, şuan ki fiyatın trende ne derece uzak olduğunu gösterir.

algoritma

eiπ + 1 = 0
Algorithmist
Algoritma
Katılım
23 Eki 2020
Mesajlar
1,797
Dimitris Tsokakis' article in this issue, "Anticipating Moving Average Crossovers," introduces a new indicator and two explorations to analyze it. The formula for the indicator and the instructions for adding it to MetaStock are as follows:​
  1. In the Tools menu, select Indicator Builder.
  2. Click New to open the Indicator Editor for a new indicator.
  3. Type the name of the formula.
  4. Click in the larger window and type in the formula.
  5. Click OK to close the Indicator Editor.


TC graph

y:=Input("short MA time periods", 2, 200, 20);
z:=Input("long MA time periods", 3, 200, 30);
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
test:=If(z-y=0,-9999,z-y);
tc:=If(test=-9999, 0,
(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/test);
tc;
C​

Dimitris Tsokakis’s article, “Anticipating Moving Average Crossovers,” introduces a new indicator and two explorations to analyze it. The formula for the indicator and the instructions on adding it to MetaStock are:



To enter these indicators into MetaStock:

In the Tools menu, select Indicator Builder.
Click New to open the Indicator Editor for a new indicator.
Type the name of the formula
Click in the larger window and type in the formula.
Click Ok to close the Indicator Editor.


Name:the TC graph

Formula:

y:=Input("short MA time periods", 2, 200, 20);
z:=Input("long MA time periods", 3, 200, 30);
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
test:=If(z-y=0,-9999,z-y);
tc:=If(test=-9999, 0,
(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/test);
tc;
C


This indicator will prompt for the time periods of the two moving averages, but it defaults to the values suggested in the article.





The explorations and instruction for creating them in MetaStock are:

Select Tools >
the Explorer.
Click New
Enter a name, “SMA cross stats - ascending”
Select the Column A tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


ascxpred:=Cross(C,tc);
confascx:=Cross(may,maz);
Cum(ascxpred);


Click in the Col Name box and enter the text:“Total”.
Select the Column B tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


ascxpred:=Cross(C,tc);
confascx:=Cross(may,maz);
asctotpred:=Cum(ascxpred);
acc0ascxpred:=Cum(confascx AND Ref(ascxpred,-1));
100*(acc0ascxpred/asctotpred)


Click in the Col Name box and enter the text:“1 day”.
Select the Column C tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


ascxpred:=Cross(C,tc);
confascx:=Cross(may,maz);
asctotpred:=Cum(ascxpred);
acc1ascxpred:=Cum(confascx AND Ref(ascxpred,-2));
100*(acc1ascxpred/asctotpred)


Click in the Col Name box and enter the text:“2 day”.
Select the Column D tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


ascxpred:=Cross(C,tc);
confascx:=Cross(may,maz);
asctotpred:=Cum(ascxpred);
acc2ascxpred:=Cum(confascx AND Ref(ascxpred,-3));
100*(acc2ascxpred/asctotpred)


Click in the Col Name box and enter the text:“3 day”.
Select the Column E tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


ascxpred:=Cross(C,tc);
confascx:=Cross(may,maz);
asctotpred:=Cum(ascxpred);
uslsascxpre:=Cum(confascx AND ascxpred);
100*(uslsascxpre/asctotpred)


Click in the Col Name box and enter the text:“useless”.
Select the Column F tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


ascxpred:=Cross(C,tc);
confascx:=Cross(may,maz);
asctotpred:=Cum(ascxpred);
acc0ascxpred:=Cum(confascx AND Ref(ascxpred,-1));
acc1ascxpred:=Cum(confascx AND Ref(ascxpred,-2));
acc2ascxpred:=Cum(confascx AND Ref(ascxpred,-3));
uslsascxpre:=Cum(confascx AND ascxpred);
100-(100*(acc0ascxpred+acc1ascxpred + acc2ascxpred+uslsascxpre) / asctotpred)


Click in the Col Name box and enter the text:“false”
Click OK to close the exploration editor.


I also suggest, before closing the editor, adding the following text to the Notesfield to provide a more detailed description of the column names:



columns descriptions:

1:total ascending predictions

2:percent confirmed 1 day later

3:percent confirmed 2 days later

4:percent confirmed 3 days later

5:percent useless (confirmed same day as prediction)

6:percent of false predictions



The second exploration is added in the same manner, but the formulas and notes are different. The column names are the same. The steps to create it are:

Select Tools >
the Explorer.
Click New
Enter a name, “SMA cross stats - descending”
Select the Column A tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


decxpred:=Cross(tc,C);
confdecx:=Cross(maz,may);
Cum(decxpred);


Click in the Col Name box and enter the text:“Total”.
Select the Column B tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


decxpred:=Cross(tc,C);
confdecx:=Cross(maz,may);
destotpred:=Cum(decxpred);
acc0desxpred:=Cum(confdecx AND Ref(decxpred,-1));
100*(acc0desxpred/destotpred)


Click in the Col Name box and enter the text:“1 day”.
Select the Column C tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


decxpred:=Cross(tc,C);
confdecx:=Cross(maz,may);
destotpred:=Cum(decxpred);
acc1desxpred:=Cum(confdecx AND Ref(decxpred,-2));
100*(acc1desxpred/destotpred)


Click in the Col Name box and enter the text:“2 day”.
Select the Column D tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


decxpred:=Cross(tc,C);
confdecx:=Cross(maz,may);
destotpred:=Cum(decxpred);
acc2desxpred:=Cum(confdecx AND Ref(decxpred,-3));
100*(acc2desxpred/destotpred)


Click in the Col Name box and enter the text:“3 day”.
Select the Column E tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


decxpred:=Cross(tc,C);
confdecx:=Cross(maz,may);
destotpred:=Cum(decxpred);
uslsdesxpred:=Cum(confdecx AND decxpred);
100*(uslsdesxpred/destotpred)


Click in the Col Name box and enter the text:“useless”.
Select the Column F tab and enter the following formula.


y:=20;
z:=30;
may:=Mov(C,y,S);
maz:=Mov(C,z,S);
tc:=(y*(z-1)*Mov(C,z-1,S)-z*(y-1)*Mov(C,y-1,S))/(z-y);


decxpred:=Cross(tc,C);
confdecx:=Cross(maz,may);
destotpred:=Cum(decxpred);
acc0desxpred:=Cum(confdecx AND Ref(decxpred,-1));
acc1desxpred:=Cum(confdecx AND Ref(decxpred,-2));
acc2desxpred:=Cum(confdecx AND Ref(decxpred,-3));
uslsdesxpre:=Cum(confdecx AND decxpred);


100-(100*(acc0desxpred+acc1desxpred + acc2desxpred+uslsdesxpre) / destotpred)


Click in the Col Name box and enter the text:“false”
Click OK to close the exploration editor.


The recommended notes for this exploration are:



columns descriptions:

1:total descending predictions

2:percent confirmed 1 day later

3:percent confirmed 2 days later

4:percent confirmed 3 days later

5:percent useless (confirmed same day as prediction)

6:percent of false predictions



It should also be noted that MetaStock version 10 users can put all 12 columns, both explorations, into a single exploration. It would only require changing the column names just a bit in order to easily tell which ones are for the ascending crosses and which ones are for the descending crosses. The second exploration would then have its formulas put in columns G through L.



William Golson
Source / From:
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kayıt ol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Şimdi kayıt ol
Giriş yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş yap
Başlatan Benzer Konular Forum Cevap Tarih
algoritma A 5
algoritma S 0
algoritma T 0
algoritma H 0
algoritma T 0
algoritma P 0
algoritma W 0
algoritma Kurgusal Stratejiler - Beyin Fırtanası 0
A V 0
Bogac S 0
Bogac A 0
algoritma Matriks 0
U V 1
K D 0
algoritma Dikkat Çeken Önemli Formüller 3
algoritma # 0
algoritma Teknik Analiz Tanımlamalar 0
algoritma Teknik Analiz Tanımlamalar 0
algoritma M 0
algoritma M 0