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

PaintBar difficulties



PureBytes Links

Trading Reference Links

I´m having trouble with PaintBar studies using Data1
and Data2.  When referencing data2 the plotting is
happening in data1, but that is expected.    

If I write a paintBar study and reference Data2, then
TS marks some but not all of the correct formations.  
If a PaintBar is written for the same EOD data on a
chart with only data1 then a lot more correct patterns
are marked. 

For instance:

condition1 = high < high[1];
condition2 = high[1] > high[2] and High[2] > high[3]
and high[3] > high[4] and low[1] > low[2] and low[2] >
low[3] and low[3] > low[4];

if condition1 and condition2 then begin
	PlotPaintBar(high,low,"xxx");
end;

for the same data, but in data2:

condition1 = high of Data2 < high[1] of Data2;
condition2 = high[1] of Data2 > high[2] of Data2 AND
High[2] of data2 > high[3] of Data2 AND 
high[3] of data2 > high[4] of data2 and low[1] of
data2 > low[2] of data2 and low[2] of data2 > low[3]
of data2 AND low[3] of data2 > low[4] of data2;

if condition1 and condition2 then begin
	PlotPaintBar(high,low,"xxx");
end;


given that the data being studied is the same, I think
that the same result should be given from each study. 
Can anyone explain what is going wrong?


Many thanks,

Jim Douglas