- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
Bollinger
Kod:
Periods := 20; {Bollinger Bantı Periyodu}
Multiplier := 2; {Standart Sapma Çarpanı}
OrtaBant := Mov(C, Periods, S);
UstBant := BBandTop(C, Periods, s,Multiplier);
AltBant := BBandBot(C, Periods, s,Multiplier);
{Bollinger yön belirleme}
OrtaBantYonu := If(OrtaBant > Ref(OrtaBant, -1) AND Ref(OrtaBant, -1) > Ref(OrtaBant, -2), 1,
If(OrtaBant < Ref(OrtaBant, -1) AND Ref(OrtaBant, -1) < Ref(OrtaBant, -2), -1, 0));
UstBantYonu := If(UstBant > Ref(UstBant, -1) AND Ref(UstBant, -1) > Ref(UstBant, -2), 1,
If(UstBant < Ref(UstBant, -1) AND Ref(UstBant, -1) < Ref(UstBant, -2), -1, 0));
AltBantYonu := If(AltBant > Ref(AltBant, -1) AND Ref(AltBant, -1) > Ref(AltBant, -2), 1,
If(AltBant < Ref(AltBant, -1) AND Ref(AltBant, -1) < Ref(AltBant, -2), -1, 0));
{Koşullar}
KapanisOrtaBantGecis := Ref(C, -1) <= Ref(OrtaBant, -1) AND C > OrtaBant;
Uzaklik := (C - OrtaBant) / OrtaBant * 100;
UzaklikKosulu := Uzaklik >= 0 AND Uzaklik <= 5;
OzelKosul := (UstBantYonu = 1) AND (OrtaBantYonu = 1) AND (AltBantYonu = -1);
{Sonuçları filtreleme}
KapanisOrtaBantGecis AND UzaklikKosulu