Scan High Low - Please Help

aggy

Active Member
#1
Can anyone please modify these 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(H0/C < 1.001 AND C < H0, C, 0);
L2 = IIf(L0/C > 0.999 AND C > L0 , C, 0);

H3 = IIf(H1/C < 1.001 AND C < H1, C, 0);
L3 = IIf(L1/C > 0.999 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(H2, "C near Today High", format, IIf(H2, colorGreen, colorBlack), colorBlack, 95);
AddColumn(L2, "C near Today Low", format, IIf(L2, colorRed, colorBlack), colorBlack, 95);
AddColumn(H1, "High of prev day", format, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", format, colorOrange, colorBlack, 95);
AddColumn(H3, "C near prev High", format, IIf(H3, colorPaleGreen, colorBlack), colorBlack, 95);
AddColumn(L3, "C near prev Low", format, IIf(L3, colorOrange, colorBlack), colorBlack, 95);


can anyone please make some modifications in these code as it shows the result alphabetically i wanna it shows the result by high low value. Any scrip whose makes new high/new low comes on TOP automatically.

Thanks in advance.
 

KelvinHand

Well-Known Member
#2
Can anyone please modify these 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(H0/C < 1.001 AND C < H0, C, 0);
L2 = IIf(L0/C > 0.999 AND C > L0 , C, 0);

H3 = IIf(H1/C < 1.001 AND C < H1, C, 0);
L3 = IIf(L1/C > 0.999 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(H2, "C near Today High", format, IIf(H2, colorGreen, colorBlack), colorBlack, 95);
AddColumn(L2, "C near Today Low", format, IIf(L2, colorRed, colorBlack), colorBlack, 95);
AddColumn(H1, "High of prev day", format, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", format, colorOrange, colorBlack, 95);
AddColumn(H3, "C near prev High", format, IIf(H3, colorPaleGreen, colorBlack), colorBlack, 95);
AddColumn(L3, "C near prev Low", format, IIf(L3, colorOrange, colorBlack), colorBlack, 95);


can anyone please make some modifications in these code as it shows the result alphabetically i wanna it shows the result by high low value. Any scrip whose makes new high/new low comes on TOP automatically.

Thanks in advance.
add this command

SetSortColumns(-3,-4); //High of today then Low of today
 

KelvinHand

Well-Known Member
#5
hey kelvin it's not working mate kindly see the link below

http://imageshack.us/f/855/seepb.jpg
The script is working according to your description.
Adding the Status Column for you to check the "New Low" & "New High"
that break the "High of prev day" & "Low of prev day".

Up to you to do the modification.

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(H0/C < 1.001 AND C < H0, C, 0);
L2 = IIf(L0/C > 0.999 AND C > L0 , C, 0);

H3 = IIf(H1/C < 1.001 AND C < H1, C, 0);
L3 = IIf(L1/C > 0.999 AND C > L1 , C, 0);

Filter = Status("lastbarinrange");

format = 1.2;


nh = WriteIf(H0>H1, "New High", "");
nl = WriteIf(L0<L1, "New Low", "");


Stat = nh+" , "+nl;



AddTextColumn(stat, 
     "Status", format, colorGreen, colorBlack, 140);


AddColumn(H0, "High of today", format, colorGreen, colorBlack, 95);
AddColumn(L0, "Low of today", format, colorRed, colorBlack, 95);



AddColumn(H2, "C near Today High", format, IIf(H2, colorGreen, colorBlack), colorBlack, 95);
AddColumn(L2, "C near Today Low", format, IIf(L2, colorRed, colorBlack), colorBlack, 95);
AddColumn(H1, "High of prev day", format, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", format, colorOrange, colorBlack, 95);
AddColumn(H3, "C near prev High", format, IIf(H3, colorPaleGreen, colorBlack), colorBlack, 95);
AddColumn(L3, "C near prev Low", format, IIf(L3, colorOrange, colorBlack), colorBlack, 95);
SetSortColumns(-3); //High of today then Low of today
 

HULK

Active Member
#6
Can anyone please modify these 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(H0/C < 1.001 AND C < H0, C, 0);
L2 = IIf(L0/C > 0.999 AND C > L0 , C, 0);

H3 = IIf(H1/C < 1.001 AND C < H1, C, 0);
L3 = IIf(L1/C > 0.999 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(H2, "C near Today High", format, IIf(H2, colorGreen, colorBlack), colorBlack, 95);
AddColumn(L2, "C near Today Low", format, IIf(L2, colorRed, colorBlack), colorBlack, 95);
AddColumn(H1, "High of prev day", format, colorPaleGreen, colorBlack, 95);
AddColumn(L1, "Low of prev day", format, colorOrange, colorBlack, 95);
AddColumn(H3, "C near prev High", format, IIf(H3, colorPaleGreen, colorBlack), colorBlack, 95);
AddColumn(L3, "C near prev Low", format, IIf(L3, colorOrange, colorBlack), colorBlack, 95);


can anyone please make some modifications in these code as it shows the result alphabetically i wanna it shows the result by high low value. Any scrip whose makes new high/new low comes on TOP automatically.

Thanks in advance.
After Scan just clik or tap on top of the column ,I think it will show you the result what u are looking

HULK
 

Similar threads