0 beğenilme 0 beğenilmeme
295 kez görüntülendi
Merhaba, aşağıdaki koşulların sağlandığı ilk günü nasıl taratabilirim.

 

period:=5;
yuzde:=9;
RSIperiod:=14;
RSIplus:=0;
RSp:=RSI(C,RSIperiod)+RSIplus;
fastp:=27;
Fmult:=1.6;
slowp:=55;
Smult:=2;
w1:=2*fastp-1;
w2:=2*slowp-1;
avg1:=mov(abs(C-REF(C,-1)),fastp,e);
avg2:=mov(abs(C-REF(C,-1)),slowp,e);
smrng1:=mov(avg1,w1,e)*Fmult;
smrng2:=mov(avg2,w2,e)*Smult;
smrng:= (smrng1 + smrng2)/2;
rangefilt:=If(C > PREV,If(c - smrng < PREV,PREV,c - smrng),If(c + smrng > PREV,PREV,c + smrng));
Upward:= If(rangefilt > Ref(rangefilt, -1), If(PREV + 1, 0), If(rangefilt < Ref(rangefilt, -1), 0, PREV));
Downward:= If(rangefilt < Ref(rangefilt, -1), If(PREV + 1, 0), If(rangefilt > Ref(rangefilt, -1), 0, PREV));
STR:= rangefilt + smrng;
STS:= rangefilt - smrng;
FUB:=IF(STR<PREV OR REF(C,-1)>PREV,STR,PREV);
FLB:=IF(STS>PREV OR REF(C,-1)<PREV,STS,PREV);
TRF:=IF(PREV=REF(FUB,-1) AND C<=FUB,FUB,IF(PREV=REF(FUB,-1) AND C>=FUB,FLB,IF(PREV=REF(FLB,-1) AND C>=FLB,FLB,IF(PREV=REF(FLB,-1) AND C<=FLB,FUB,FUB))));

deneme:=c>trf and MOV(RSp,period,VAR)>MOST(RSp,period,yuzde,VAR) and c>AlfaS();

barssince(deneme)

 

barssince(deneme) yazınca sonuç genelde 0 oluyor veya 3  5 gibi sayılar çıksada karşılaştırınca 3 koşum daha önce veya daha fazla bar sonra gerçekleşmiş oluyor veya istediğim sonuçla alakasız oluyor.
Grafik kategorisinde (441 puan) tarafından | 295 kez görüntülendi

1 cevap

0 beğenilme 0 beğenilmeme
En İyi Cevap
Merhabalar,

Aşağıdaki şekilde deneyiniz,

period:=5;
yuzde:=9;
RSIperiod:=14;
RSIplus:=0;
RSp:=RSI(C,RSIperiod)+RSIplus;
fastp:=27;
Fmult:=1.6;
slowp:=55;
Smult:=2;
w1:=2*fastp-1;
w2:=2*slowp-1;
avg1:=mov(abs(C-REF(C,-1)),fastp,e);
avg2:=mov(abs(C-REF(C,-1)),slowp,e);
smrng1:=mov(avg1,w1,e)*Fmult;
smrng2:=mov(avg2,w2,e)*Smult;
smrng:= (smrng1 + smrng2)/2;
rangefilt:=If(C > PREV,If(c - smrng < PREV,PREV,c - smrng),If(c + smrng > PREV,PREV,c + smrng));
Upward:= If(rangefilt > Ref(rangefilt, -1), If(PREV + 1, 0), If(rangefilt < Ref(rangefilt, -1), 0, PREV));
Downward:= If(rangefilt < Ref(rangefilt, -1), If(PREV + 1, 0), If(rangefilt > Ref(rangefilt, -1), 0, PREV));
STR:= rangefilt + smrng;
STS:= rangefilt - smrng;
FUB:=IF(STR<PREV OR REF(C,-1)>PREV,STR,PREV);
FLB:=IF(STS>PREV OR REF(C,-1)<PREV,STS,PREV);
TRF:=IF(PREV=REF(FUB,-1) AND C<=FUB,FUB,IF(PREV=REF(FUB,-1) AND C>=FUB,FLB,IF(PREV=REF(FLB,-1) AND C>=FLB,FLB,IF(PREV=REF(FLB,-1) AND C<=FLB,FUB,FUB))));

deneme:=c>trf and MOV(RSp,period,VAR)>MOST(RSp,period,yuzde,VAR) and c>AlfaS();
deneme and ref(deneme,-1)=0

iyi çalışmalar
(31,488 puan) tarafından
tarafından seçilmiş
8,875 soru
8,818 cevap
4,914 yorum
22,173 kullanıcı