[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minlist, Maxlist



PureBytes Links

Trading Reference Links

: But I still don't know how to get around the fact that the furthest value
: min-maxlist will look at is the second (second highest, second lowest).
Can
: anyone here think of a way around that? I imagine it should be possible to
: code a function for this purpose, but I haven't the foggiest idea how to
go
: about it!

I think the code snippet below will find the 3rd highest maxlist value(Max3)
for you. I haven't test it yet.

Vars: max1(0), max2(0), max3(0), i(0);
Arrays: Num[25](0)

{initialize everything}
If currentbar = 1 then begin
    Max1=1;
    Max2=Max1/2;
    Max3=Max2/2;
    end;

For i = 0 to 24 begin
    If Num[i] > Max1 then begin
        Max3=Max2;
        Max2=Max1;
        Max1=Num[1];
        end;



---