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 Cyclical MA Projection by Andrew Tomlinson

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
Hi traders,
I am trying to modify Jose's Centred MA that extends the last MA value to the last trading date.
I hope to replace the extended part of the MA using an estimated curve or a straight line with last few MA values.
As shown below, I calucalate the difference of the last 2 MA values (maybe a +ve or -ve difference) and then add the difference to the last MA values recursively.
But i failed to show the desired result after a number of trials.
Could you kindly advise on the algorithm. Thanks in advance for the help.
Chu
==========================================
{ Centered MA - v2.0 }
{ Uses forward-referencing to center Mov Avg.}
{ Copyright 2005 Jose Silva
For personal use only.
http://www.metastocktools.com }
{ User inputs }
pds:=Input("MA periods",1,2600,10);
type:=Input("[1]EMA [2]SMA [3]TmSr [4]Tri [5]Var [6]Vol [7]
Wght",1,7,2);
{ Choose MA type:
1 - Exponential MA
2 - Simple MA
3 - Time Series MA
4 - Triangular MA
5 - Variable MA
6 - Volume adjusted MA
7 - Weighted MA }
ma:=
If(type=1,Mov(C,pds,E),
If(type=2,Mov(C,pds,S),
If(type=3,Mov(C,pds,T),
If(type=4,Mov(C,pds,TRI),
If(type=5,Mov(C,pds,VAR),
If(type=6,Mov(C,pds,VOL),
Mov(C,pds,W)))))));
{ Forward-reference MA }
center:=LastValue(Int(pds/2));
fwd:=Ref(ma,center);
{ Extend plot into null zone }
xtend:=LastValue(fwd+PREV-PREV);
{******* the line i add **********}
{extending using a straight line}
xtend:=If(xtend=Ref(xtend,-1),Ref(xtend,-1)*2-Ref(xtend,-2),xtend);
{ Restrict invalid initial MA plot }
ma:=Ref(Ref(xtend,pds-1),-pds+1);
{ Plot MA on price chart }
ma
===========================================
This is one possible projection solution that we came up with a few weeks ago with help from Jose and Roy. Its hard wired for a 9-day average, but gives one idea of how to do it. Like any projection its less reliable the further out it goes.
Andrew​

Cyclical MA Projection (9)
{with help from Jose & Roy}
P1:=9;
Pr:=(O+H+L+C)/4;
MA:=Mov(Pr,P1,TRI);
Shift:=Round(p1/2);
center:=LastValue(Shift);
CMA:=Ref(MA,center);
y:=LastValue(CMA+PREV-PREV);
CMA:=If(y>0,y,Pr);
CMA1:=Ref(Mov(Pr,P1-1,TRI),center-1);
y:=LastValue(CMA1+PREV-PREV);
CMA1:=If(y>0,y,Pr);
CMA2:=Ref(Mov(Pr,P1-2,TRI),center-2);
y:=LastValue(CMA2+PREV-PREV);
CMA2:=If(y>0,y,Pr);
CMA3:=Ref(Mov(Pr,P1-3,TRI),center-3);
y:=LastValue(CMA3+PREV-PREV);
CMA3:=If(y>0,y,Pr);
CMA4:=Ref(Mov(Pr,P1-4,TRI),center-4);
y:=LastValue(CMA4+PREV-PREV);
CMA4:=If(y>0,y,Pr);
CMA5:=Ref(Mov(Pr,P1-5,TRI),center-5);
y:=LastValue(CMA5+PREV-PREV);
CMA5:=If(y>0,y,Pr);
CMAP:=
If(Cum(1)=LastValue(Cum(1)-center+1),CMA1,
If(Cum(1)=LastValue(Cum(1)-center+2),CMA2,
If(Cum(1)=LastValue(Cum(1)-center+3),CMA3,
If(Cum(1)=LastValue(Cum(1)-center+4),CMA4,
If(Cum(1)=LastValue(Cum(1)-center+5),CMA5,CMA)))));
CMAP;

Andrew,
thanks a lot for your help.

Chu

Source / From:
EquisMetastock[at]yahoogroups[dot]com

 

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