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

Re:Line and PaintBar colors?



PureBytes Links

Trading Reference Links

> Subject:         Line and PaintBar colors?
>   Date:         Mon, 20 Dec 1999 10:36:21 -0800 (PST)
>   From:         Larry Wright <lwright@xxxxxxxxxx>
>     To:         Omega List <omega-list@xxxxxxxxxx>
>
>I'd like to paint a hilo bar one of several colors, depending on certain 
>conditions. What is the easiest way to do that within one study?
>
>I'd like to draw a series of lines, each in a different color, where the
>color depends on certain conditions. Each line is in a different location,
>drawn between calculated number pairs. What is the easiest way to do that
>within one study? 
>
>Thanks much,
>
>Larry

The time-honored way is to use an indicator plot for each condition, and
set the plot style to point or tic (you can vary the colors).  This
avoids the problem of using the line style, where if there is a large
1-bar change (say your value changes from $25 to $35) a line-style plot
will draw the line from 25 to 35 between the bars.  

The problem is that lines (defined as line-style) are continuous.  Even
if they are not plotted, the next time they appear (plot condition met)
the new plot will be connected to the last plot.  A "line" made of dots
is not drawn between bars.  Usually a line of dots will be compact
enough to appear as a line.   However, if your bar spacing is very short
you will be able to see the dots. You can't always win.  (It seems that
Omega could have modified the plotting mechanism to allowing making
lines discontinuous, instead of giving us the horribly-complicated,
programmer-ese TL functions.)

If you want four colors/conditions, you would code all four plots with
the same value, but plot only one at a time (different colors).  

Do not think that this a less-than-satisfactory method.  Numerous
third-party add-ons used this method - because it was the only method
before TS 4.0!

I have tried to convert some of my line-drawing indicators to the TS 4
trendline tool, but it is a lot of work for little benefit.   It is a
very complex programming task.  Others have reported that the line
drawing doesn't work well.

donc