Realtime Scanner Problem

Questions about MultiCharts and user contributed studies.
fibdax
Posts: 155
Joined: 03 Jan 2011
Has thanked: 10 times
Been thanked: 6 times

Realtime Scanner Problem

Postby fibdax » 28 May 2012

Hello. I wrote an indicator for the scanner, where I indicates the breakdown of the low.
It does not work. I tried with Highest / lowest and maxlist / minlist.
this code

Code: Select all

VARS:HIGH3D(-99999999),LOW3D(99999999);
HIGH3D=maxlist(HIGHD(0),HIGHD(1),HIGHD(2));
LOW3D=MINLIST(L,L[1],L[2]);

if low<LOW3D then begin
SetPlotBGColor(3,red);
plot3("High3","L3");
end;

if High> HIGH3D then begin
SetPlotBGColor(4,green);
plot4("Low3","H3");
end;

But if you mean the first working day
it' ok

Code: Select all

VARS:HIGH3D(-99999999),LOW3D(99999999);
HIGH3D=maxlist(HIGHD(0),HIGHD(1),HIGHD(2));
LOW3D=MINLIST(L,L[1],L[2]);
plot3("-","L3");
plot4("-","H3");

if low<LOW[1] then begin
SetPlotBGColor(3,red);
plot3("High3","L3");
end;

if High> HIGH[1] then begin
SetPlotBGColor(4,green);
plot4("Low3","H3");
end;
I was wrong to write the code?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Realtime Scanner Problem

Postby TJ » 28 May 2012

Hello. I wrote an indicator for the scanner, where I indicates the breakdown of the low.
It does not work. I tried with Highest / lowest and maxlist / minlist.
this code


VARS:HIGH3D(-99999999),LOW3D(99999999);
HIGH3D=maxlist(HIGHD(0),HIGHD(1),HIGHD(2));
LOW3D=MINLIST(L,L[1],L[2]);

if low<LOW3D then begin
SetPlotBGColor(3,red);
plot3("High3","L3");
end;

if High> HIGH3D then begin
SetPlotBGColor(4,green);
plot4("Low3","H3");
end;


But if you mean the first working day
it' ok

VARS:HIGH3D(-99999999),LOW3D(99999999);
HIGH3D=maxlist(HIGHD(0),HIGHD(1),HIGHD(2));
LOW3D=MINLIST(L,L[1],L[2]);
plot3("-","L3");
plot4("-","H3");

if low<LOW[1] then begin
SetPlotBGColor(3,red);
plot3("High3","L3");
end;

if High> HIGH[1] then begin
SetPlotBGColor(4,green);
plot4("Low3","H3");
end;


I was wrong to write the code?
regarding this snippet

Code: Select all

HIGH3D=maxlist(HIGHD(0),HIGHD(1),HIGHD(2));
LOW3D=MINLIST(L,L[1],L[2]);

if low<LOW3D then begin
LOW can never get below LOW3D.

Can you see why?

if not, draw a diagram to see.



ps. please use code tag when posting codes. I have done it for you in your post.

fibdax
Posts: 155
Joined: 03 Jan 2011
Has thanked: 10 times
Been thanked: 6 times

Re: Realtime Scanner Problem

Postby fibdax » 28 May 2012

tj thank you very much

Code: Select all


test code tag


User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 302 times

Re: Realtime Scanner Problem

Postby Stan Bokov » 28 May 2012

Also, please use the Thanks button to let people know you appreciate their input.

fibdax
Posts: 155
Joined: 03 Jan 2011
Has thanked: 10 times
Been thanked: 6 times

Re: Realtime Scanner Problem

Postby fibdax » 30 May 2012

ok thanks


Return to “MultiCharts”