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

Trade Filter



PureBytes Links

Trading Reference Links

How do I turn this code into a flag which prohibits trades? This is the
Ross Congestion paintbar.Thanks in advance.

Inputs:Option(1);
Vars:x(0),Counter(0),BarBack(0),Str("");

Counter=0;
For x=0 to 3 begin
        If Option<=1 Or Option>3 then begin
{Refer the closes in
the condition}
                If (C[x]>=L[BarBack]) and (C[x]<=H[BarBack]) then
Counter=Counter+1;
        end;
        If Option=2 then begin
{Refer the opens in the
condition}
                If (O[x]>=L[BarBack]) and (O[x]<=H[BarBack]) then
Counter=Counter+1;
        end;
        If Option=3 then begin
{Refer both in the condition}
                If (C[x]>=L[BarBack]) and (C[x]<=H[BarBack]) and
(O[x]>=L[BarBack])
and (O[x]<=H[BarBack]) then Counter=Counter+1;
        end;
end;
If Counter=4 then begin                         {If the condition is
true
plot the congestion
bars}
        For x=0 to 3 begin
                Plot1[x](H[x],"H");
                Plot2[x](L[x],"L");
        end;
end;
If Counter=4  then Barback=BarBack+1 else BarBack=4;            {If the
condition
is true use the engulfing bar as reference}