PureBytes Links
Trading Reference Links
|
> 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.
Apparently you have "update every tick" turned on. Otherwise the
indicator would only look at the value at the close of the bar,
which obviously can't be > and < at the same time.
There are a few options:
* Turn off "update every tick" so you don't get the intrabar
values. But you may want the every-tick update so this might not
be viable for you.
* Use only one plot. That way it can have only one value. If
you're using TS2k or TS6, you can use SetPlotColor to change the
plot color for the "above" and "below" cases.
* If you're on TS2k or TS6, *remove* the wrong plot when it's no
longer valid. Something like this:
if xaverage (c,x) > xaverage (c,y) then begin
plot1(L-2);
noplot(2);
end
else begin
plot2(H+2);
noplot(1);
end;
Gary
|