PureBytes Links
Trading Reference Links
|
Hi Guys,
I have a set of 6 indicators which each take a value from 1 to 5. I'd
like to draw six horizontal parallel lines, one for each indictor, and
have their values represented by different colours.
So, indicator 1 would always be plotted on the chart as a line with a
value of 1 while its values (from 1 to 5) would be indicated by plotting
the line in different colours. Indicator 2 would be plotted with a value
of 2 and so on. Hope that makes sense.
Anyway, I came up with this brilliant piece of code. The values of each
indicator are stored in the array ar1[5]:
for val=1 to 5 begin
if ar1[val]=1 then clr=6; {red}
if ar1[val]=2 then clr=7; {yellow}
if ar1[val]=3 then clr=16; {light grey}
if ar1[val]=4 then clr=4; {geen}
if ar1[val]=5 then clr=11; {dark green}
plot1(val,"ar1",clr,5);
ar1[val]=0;
end;
But, of course, it doesn't work! It just plots a single line with a
value of 5.
Anyone any ideas...?
Ian
|