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

Re: Better Method



PureBytes Links

Trading Reference Links

> Is there a better way to check for a series of similar events?
> I know this works, but I can't believe it's the best way to do
> it...... any help would be appreciated.
> If C > C[1] and C[1] > C[2] and C[2] > C[3] and C[3] > C[4]
> ........{etc. out to 7, 9, 17, or 23 days ago.....}

A loop is probably the easiest way to do this:

Vars: Idx(0);

Condition1 = True;
for Idx = 0 to Length-1 begin
  Condition1 = Condition1 AND C[Idx] > C[Idx+1];
  end;

{ Now Condition1 is True if you had Length consecutive rising closes }

Gary