Teknik Analiz Dünyasına Hoşgeldiniz

Paylaşmak Güzeldir.

  • 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 Bar Number of ..........

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

e iπ +1=0
Katılım
23 Eki 2020
Mesajlar
1,337
Puanları
48
Re: Gann Swing concepts (Fibonacci trader) in Metastock?

. To: metastock@xxxxxxxxxxxxx
. Subject: Re: Gann Swing concepts (Fibonacci trader) in Metastock?
. From: divenfish@xxxxxxxxxxxxx
. Date: Wed, 30 Dec 1998 22:51:30 -0500
. References: <368A3BEB.6F4C122E@xxxxxxxxxxxxxxxxx>
. Reply-To: metastock@xxxxxxxxxxxxx
. Sender: owner-metastock@xxxxxxxxxxxxx

Attached are 2 zipped files in case you want to import. One contains 3 system tests (one each for Fib levels .382, .5, .618) and the other is about 8 or so indicators that are needed by the tests. (They all have similar names to what is below in text.) It's not really necessary to have to do formula calls- you should be able to have all indicators in their respective test by using variables. I just haven't got to that yet. If you want to do it probably the best place to start is to organize/rename each individual indicator's variables so there are no two the same. Then it should be easy to keep things straight when dumping them into the test. It's always nice to have a test self-contained. Just don't forget to send me a copy of what you come up with...provided this stuff helps. :)

The test simply places a buy arrow if the current/most recent peak is > the previous peak and today's low <= "n" Fib level. Today's low - so set your Trade Delay to zero. I wrote it to quickly mark Fib retracements - so I wouldn't have to do it buy hand. Saves a lot of time. It should be possible to incorporate it into something more meaningful, possibly even the Gann Swing thing. These tests and indicators use the infamous Zig Zag, but there's nothing wrong using it here. I chose Zig Zag over Peak and Trough because it allows me to use points, not just percent. Since I often use back adjusted continuous contracts, it's a necessity to have that option. You'll likely want to change the Zig Zag values from the .75$ that I included. Just be sure you have all values in all referenced indicators identical. I used .75$ for Live Cattle to define the peaks/troughs. It's a fairly reasonable number but it's not etched.

Here are the indicators and test for a .382 retracement. I'm not going to paste the others in here - you'll just have to import them.

Regards,
Ken
--
mailto:divenfish@xxxxxxxxxxxxx​

BarNumber of Trade Entry day -.382 Fib .75 pts Zig
a:=If((Peak(1,Zig(H,.75,$),.1) >
(Peak(2,Zig(H,.75,$),.1))),1,0);{This sort
of defines an UPtrend, so you're only
looking to BUY dips [retracements].}
b:= (Peak(1,Zig(H,.75,$),.1) -
Trough(1,Zig(L,.75,$),.1)) * .618{.618
will plot a .382 line one the chart} +
Trough(1,Zig(L,.75,$),.1);
x:=If(a=1,Cum(H),0);{This plots a 1 ONLY when
"a" is true, otherwise it plots zero. It simply
counts all the bars (highs) loaded in chart.}
j:= a=1 AND H < (Peak(1,Zig(H,.75,$),.1))
AND x > 0 AND Cross(b,L);
BarNumber:= If(1>0,Cum(1),Cum(1));
k:= If(j,BarNumber,0);
k

BarNumber of Peaks (.75 pts Zig)
BarNumber:=If(1 > 0,Cum(1),Cum(1));
r:= If(Zig(H,.75,$) > Ref(Zig(H,.75,$),-1) AND
Zig(H,.75,$) > Ref(Zig(H,.75,$),1),H,0);
q:= If(r,BarNumber,0);
q

BarNumber of Troughs (.75 pts Zig)
BarNumber:=If(1 > 0, Cum(1),Cum(1));
q:= If(Zig(L,.75,$) < Ref(Zig(L,.75,$),-1) AND
Zig(L,.75,$) < Ref(Zig(L,.75,$),1),L,0);
r:= If(q,BarNumber,0);
r
You will want to plot this and it's Fib Level companions on the chart so you can make sure things are right.​

FIB Level .75 pts (.382%)
a:= (Peak(1,Zig(H,.75,$),.1) - Trough(1,Zig(L,.75,$),.1)) *
.618{.618 will plot a .382 line on the chart} + Trough(1,Zig(L,.75,$),.1);
a​

System Test
FIB Retracement .382 Fib .75 pts Zig YES

a:=
Fml("BarNumber of Trade Entry day -.382 Fib .75 pts Zig");

b:=
If(Fml("BarNumber of Peaks (.75 pts Zig)")>0,
Fml("BarNumber of Peaks (.75 pts Zig)"),PREV);

d:=
If(Fml("BarNumber of Troughs (.75 pts Zig)")>0,
Fml("BarNumber of Troughs (.75 pts Zig)"),PREV);

If(a>0 AND b>d ,1,0)

 

Forumda 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