Need to find last 5 days bullish close

#1
I want to find 5 days close where each day close must be higher than last day.


I have done with moving avg but that not exactly what I am looking for.

(C>Mov(C,5,S)) AND
(Ref(C,-1)>Ref(Mov(C,6,S),-1)) AND
(Ref(C,-2)>Ref(Mov(C,5,S),-2)) AND
(Ref(C,-3)>Ref(Mov(C,4,S),-3)) AND
(Ref(C,-4)>Ref(Mov(C,3,S),-4))
 

KelvinHand

Well-Known Member
#2
I want to find 5 days close where each day close must be higher than last day.


I have done with moving avg but that not exactly what I am looking for.

(C>Mov(C,5,S)) AND
(Ref(C,-1)>Ref(Mov(C,6,S),-1)) AND
(Ref(C,-2)>Ref(Mov(C,5,S),-2)) AND
(Ref(C,-3)>Ref(Mov(C,4,S),-3)) AND
(Ref(C,-4)>Ref(Mov(C,3,S),-4))
Change all Mov(C, ?, S) to ?=5 will do.
 

johnnypareek

Well-Known Member
#4
HTML:
(C>Mov(C,5,S)) AND
(Ref(C,-1)>Ref(Mov(C,5,S),-1)) AND
(Ref(C,-2)>Ref(Mov(C,5,S),-2)) AND
(Ref(C,-3)>Ref(Mov(C,5,S),-3)) AND
(Ref(C,-4)>Ref(Mov(C,5,S),-4))
 

rkkarnani

Well-Known Member
#5
I want to find 5 days close where each day close must be higher than last day.


I have done with moving avg but that not exactly what I am looking for.

(C>Mov(C,5,S)) AND
(Ref(C,-1)>Ref(Mov(C,6,S),-1)) AND
(Ref(C,-2)>Ref(Mov(C,5,S),-2)) AND
(Ref(C,-3)>Ref(Mov(C,4,S),-3)) AND
(Ref(C,-4)>Ref(Mov(C,3,S),-4))
If you are looking for the CLOSE, why are you referring to Moving Average !
For 5 days close, where each close is higher than previous days Close .
Considering today is day5 : try this :
last4:=Ref(C,-4);
last3:=Ref(C,-3);
last2:=Ref(C,-2);
last:=Ref(C,-1);
(C>last) AND (last>last2) AND (last2>last3) AND (last3>last4)

Here is a chart with this applied, Blue arrows mark the 5th day when close has been higher high for 5 consecutive days including the bar marked ! Where there are consecutive blue arrows, obviously indicates that the higher high close is continuing !

 

KelvinHand

Well-Known Member
#7
If you are looking for the CLOSE, why are you referring to Moving Average !
For 5 days close, where each close is higher than previous days Close .
Considering today is day5 : try this :
last4:=Ref(C,-4);
last3:=Ref(C,-3);
last2:=Ref(C,-2);
last:=Ref(C,-1);
(C>last) AND (last>last2) AND (last2>last3) AND (last3>last4)

Here is a chart with this applied, Blue arrows mark the 5th day when close has been higher high for 5 consecutive days including the bar marked ! Where there are consecutive blue arrows, obviously indicates that the higher high close is continuing !

Try this:
Code:
Sum( C>Ref(C,-1), 5 ) == 5
 

Similar threads