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

RE: unwanted simultaneous plots2



PureBytes Links

Trading Reference Links

Philip,

No idea what's causing your problem - some kind of crazy EL quirk.  Here's
what I would do to try to get around it:

vars x1(0), x2(0);
x1 = xaverage(c,x);
x2 = xaverage(c,y);
if x1 > x2 then plot1 (l-2) else
  if x1 < x2 plot2 (h+2);

This is more efficient code since each xaverage is only calculated once, and
the else clause ought to guarantee that only one branch can be taken in any
given bar.  I take it that if the two are equal you want nothing to plot at
all - otherwise you could eliminate the second if statement

  Merlin

-----Original Message-----
From: Shraga(Feivi-Philip) [mailto:shraga@xxxxxxxxxxxx]
Sent: Monday, November 18, 2002 8:44 AM
To: omega-list@xxxxxxxxxx
Subject: unwanted simultaneous plots2


Hi everyone,

I know what the problem is, I just don't know how to solve it...

if xaverage (c,x)> xaverage (c,y) then plot1 (l-2);
if xaverage (c,x)< xaverage (c,y) then plot2 (h+2);

The problem is that sometimes xa1 will be both > and < than xa2 intrabar,
and I'll get two plots for the same bar. Is there anyway around this. Maybe
a code that makes the indicator refresh on its own?

TIA

Philip