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 Recursive Moving Trend Average & TOSC Oscillator

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
Is the name of an article in the December issue of TASC, written by DennisMeyers. In it he describes what he calls "The Recursive Moving Trend Average". I wont go into all the article right now, but here is my translationof his math (for Metastock 6.5) :​

Recursive Moving Trend Average
Lb:=Input("Look-Back Period?",3,100,21);
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+ (Alpha*Abs(C+Bot-Ref(Bot,-1)));
RMTA;
He then explains how to make an oscillator by subtracting an Exponential MAform the Recursive MA...... again here is the code:​

TOSC Oscillator I
Lb:=Input("Look-Back Period?",3,100,21);
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+ (Alpha*Abs(C+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(C,lb,E);
TOSC;
Here is the code for System Testing:

Buy Long:

Lb:=opt1;
ent:=3;
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+(Alpha*Abs(C+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(C,lb,E);
Cross(tosc,(0-Abs(ent)))

Sell short:

Lb:=opt1;
ent:=3;
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+(Alpha*Abs(C+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(C,lb,E);
Cross((0+Abs(ent)),tosc1)

Opt1 is the look- back periods, of 3 to 30, and
Opt2 is the entry value of the oscillator, 0 to 5.

Now, after all the hours spent on figuring out the code, I have discoveredthat
the RMTA plots very similar to the DEMA, oh well............
Adam Hefner.
e-mail: VonHef@itlnet.net


----- Original Message -----
From: Glen Wallace <gcwallace@xxxxxxxx>
To: MetaStock listserver <metastock@xxxxxxxxxxxxxxxxxx>
Sent: Saturday, May 08, 1999 8:44 PM
Subject: Recursive Moving Trendline system


Several months ago I adapted the Recursive Moving Trendline system described in the Dec98 issue of Technical Analysis of Stocks & Commodities to a MetaStock system. I don't recall if anyone has posted the code and I have been meaning to bring it up. In any case, I would be happy to share it if anyone is interested.

The system is basically a moving average crossover system used to identify changes in trends. It compares a Recursive Moving Trendline (which attempts to predict tomorrow's price using an exponential moving average slope calculation) to an Exponential Moving Average of the price plot. A crossover of the two lines triggers a buy or sell signal. It might make a useful addition for those who use a linear regression-based system.

Overall, it seems to identify trends and trend changes quite well, though with the weak money management capabilities of MetaStock, it is difficult to fine tune the system to avoid whipsaws during retracements.

I have attached a sample DJIA chart for the period from July to December. The green line is a 10-day RMT and the red is a 10-day EMA. In theory, one buys when the green line crosses over the red, and sells when red crosses over green.

Let me know if you want to try it out. My only condition (aye, therein lies the rub) is that you share your insights and improvements -- particularly money management enhancements -- with the group.

Regards.


Re: Recursive Moving Trendline system

·To: <metastock@xxxxxxxxxxxxx>
·Subject: Re: Recursive Moving Trendline system
·From: "VonHef" <VonHef@xxxxxxxxxxxxx>
·Date: Sat, 8 May 1999 22:19:20 -0500
·Organization: Microsoft Corporation
·References: <01dd01be99bd$b83c97c0$5f1c4118@xxxxxxxxxxxxxxxxxxxxxx>
·Reply-To: metastock@xxxxxxxxxxxxx
·Sender: owner-metastock@xxxxxxxxxxxxx

Glen,
Looks like you did some good work! I had worked on this some.....but ended-up making an oscillator out of it (subtracting the ema from the rta). If you wish to try "tuning" it in MetaStock, you could try different entry levels from the oscillator....for example go long when TOSC crosses from below -2, or Short when crosses from above +2. Anywise here is the code I came up with if you wish to compare them to each other:​

TOSC Oscillator II
Lb:=Input("Look-Back Period?",3,100,21);
Ty:=Input("1=C 2=H 3=L 4= Median Price",1,4,1);
Tv:=If(Ty=1,C,If(Ty=2,H,If(Ty=3,L,MP())));
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,Tv,PREV))+Tv;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,Tv,PREV)) + (Alpha*(Tv+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(Tv,lb,E);
TOSC;​

NOTE: this code will work slowly because of all of the "PREV" functions.


Best wishes,
Adam Hefner.
VonHef@xxxxxxxxxxxxx​
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 E 1
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 R 0