Need afl to scan yesterdays low and high

hmsanil

Active Member
#1
Need Indicator to scan yesterdays low and high

Hi all,

Can anybody share a scanner indicator to scan yesterdays high and yesterdays low.


Thanks

Anil
 
Last edited:
#2
Code:
Daba = Param("Days Back", 1, 1, 10,1);
H0   = TimeFrameGetPrice("H", inDaily, 0);
L0   = TimeFrameGetPrice("L", inDaily, 0);
H1   = TimeFrameGetPrice("H", inDaily, -Daba);
L1   = TimeFrameGetPrice("L", inDaily, -Daba);

Filter = Status("lastbarinrange");

AddColumn(H0, "High of today", 1.4, colorGreen, colorBlack, 95);
AddColumn(L0, "Low of today", 1.4, colorRed, colorBlack, 95);
AddColumn(H1, "High of prev day", 1.4, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", 1.4, colorOrange, colorBlack, 95);
 

hmsanil

Active Member
#3
Thanks DETWO for your reply

But the result must show me the scripts trading at yesterday low and yesterday high with identification showing these are the scripts trading at yesterday low and yesterday high

Thanks


Anil
 

Rajvir

Active Member
#4
TimeFrameSet(inDaily);
H1 = HHV(H, 1) ;

H2= Ref(H1,-1)< .001*C;

L1 = LLV(L,1) ;


L2 = C-Ref(L1,-1) < .001*C ;



Filter = H2 OR L2 ;

TimeFrameRestore() ;

SetOption("NoDefaultColumns", True);

AddTextColumn(Name(), "Symbol");
AddColumn(DateTime(), "Date", formatDateTime);
AddColumn(C, "CMP", 1.2);

AddColumn(H2, "H2", 1.2);

AddColumn(L2, "L2", 1.2);
 

hmsanil

Active Member
#6
Hi detwo

During Intraday(TODAY) , i need to scan stocks which are trading very near to yesterdays low and yesterdays high. And the indicator should show me the results like which stocks at present is trading at yesterdays high and yesterdays low


Means i want to know that which stocks during today(CMP) is trading near to Yesterday High And Yesterday Low

Thanks


Anil
 
Last edited:
#7
Hi detwo

During Intraday(TODAY) , i need to scan stocks which are trading very near to yesterdays low and yesterdays high. And the indicator should show me the results like which stocks at present is trading at yesterdays high and yesterdays low


Means i want to know that which stocks during today(CMP) is trading near to Yesterday High And Yesterday Low

Thanks


Anil

Code:
Daba = Param("Days Back", 1, 1, 10,1);
H0   = TimeFrameGetPrice("H", inDaily, 0);
L0   = TimeFrameGetPrice("L", inDaily, 0);
H1   = TimeFrameGetPrice("H", inDaily, -Daba);
L1   = TimeFrameGetPrice("L", inDaily, -Daba);

H2   = IIf((H1-C) < .001*C AND C < H1, C, 0);
L2   = IIf((C-L1) < .001*C AND C > L1 , C, 0);

Filter = Status("lastbarinrange");

format = 1.2;

AddColumn(H0, "High of today", format, colorGreen, colorBlack, 95);
AddColumn(L0, "Low of today", format, colorRed, colorBlack, 95);
AddColumn(H1, "High of prev day", format, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", format, colorOrange, colorBlack, 95);
AddColumn(H2, "C near prev High", format, IIf(H2, colorPaleGreen, colorBlack), colorBlack, 95);
AddColumn(L2, "C near prev Low", format, IIf(L2, colorOrange, colorBlack), colorBlack, 95);
 
Last edited:
#8
Or

Code:
Daba = Param("Days Back", 1, 1, 10,1);
H0   = TimeFrameGetPrice("H", inDaily, 0);
L0   = TimeFrameGetPrice("L", inDaily, 0);
H1   = TimeFrameGetPrice("H", inDaily, -Daba);
L1   = TimeFrameGetPrice("L", inDaily, -Daba);

H2   = IIf((H1-C) < .001*C AND C < H1, C, 0);
L2   = IIf((C-L1) < .001*C AND C > L1 , C, 0);

Filter = LastValue(H2) > 0 || LastValue(L2) > 0 AND Status("lastbarinrange");

format = 1.2;

AddColumn(Daba, "Lookback", 1, colorLightGrey, colorBlack, 60);
AddColumn(H0, "High of today", format, colorBrightGreen, colorBlack, 95);
AddColumn(L0, "Low of today", format, colorRed, colorBlack, 95);
AddColumn(H1, "High of prev day", format, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", format, colorOrange, colorBlack, 95);
AddColumn(H2, "C near prev High", format, IIf(H2, colorPaleGreen, colorBlack), colorBlack, 95);
AddColumn(L2, "C near prev Low", format, IIf(L2, colorOrange, colorBlack), colorBlack, 95);
 
Last edited:

hmsanil

Active Member
#9
Hi Detwo,

Thanks a lot. This is what i was looking for.

Can you Just add one more thing along with this in this indicator

Can you add C near Today Low And C near Today High





Daba = Param("Days Back", 1, 1, 10,1);
H0 = TimeFrameGetPrice("H", inDaily, 0);
L0 = TimeFrameGetPrice("L", inDaily, 0);
H1 = TimeFrameGetPrice("H", inDaily, -Daba);
L1 = TimeFrameGetPrice("L", inDaily, -Daba);

H2 = IIf((H1-C) < .001*C AND C < H1, C, 0);
L2 = IIf((C-L1) < .001*C AND C > L1 , C, 0);

Filter = Status("lastbarinrange");

format = 1.2;

AddColumn(H0, "High of today", format, colorGreen, colorBlack, 95);
AddColumn(L0, "Low of today", format, colorRed, colorBlack, 95);
AddColumn(H1, "High of prev day", format, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", format, colorOrange, colorBlack, 95);
AddColumn(H2, "C near prev High", format, IIf(H2, colorPaleGreen, colorBlack), colorBlack, 95);
AddColumn(L2, "C near prev Low", format, IIf(L2, colorOrange, colorBlack), colorBlack, 95);




Thank You

Anil
 
#10
Hi Detwo,

Thanks a lot. This is what i was looking for.

Can you Just add one more thing along with this in this indicator

Can you add C near Today Low And C near Today High


Thank You

Anil
Why don't you try it yourself according to what there is in the code. Just do the same for today's high and today's low. It's simple. If you always let others do the job you will never learn it yourself.
 

Similar threads