Advanced - Line- and Cloud-Paintbar

Using Advanced mode you can create paintbars that plot a line or a cloud on the chart (a "cloud" meaning two lines with a possible fill between them).

 

Line Paintbar

 

To create a Line paintbar, use the SetYValue function with a single parameter. This will result in a line plotted on the chart between the shapes that are placed at the prices specified in the SetYValue function.

 

NOTE: this function HAS to be called after SetColor or SetColorAndShape. It cannot be called by itself without calling one of those functions first!

 

NOTE: if you set the value in this function to YSkipValue then the drawing of the line/curve will stop at that point and only resume when another SetYValue is called with a value that is not YSkipValue.

 

Cloud Paintbar

 

To create a Cloud paintbar, use the SetYValue function with two parameters. The two parameters specify the two lines that define a cloud - that is, two lines on the chart with a possible color fill between them.

 

NOTE: there are three colors that need to be specified for the cloud - two of them for the lines and one (possibly) for the fill between the lines. To do that, call the SetColor function with a numeric first parameter:
 
SetColor(0, SomeColor);   // this will set the color for the first line

SetColor(1, SomeColor);   // this will set the color for the second line

SetColor(2, SomeColor);   // this will set the color for the cloud fill - between the lines

 

The translucency of the cloud fill is defaulted to 50% but can be changed in the Paintbar Parameter editor once the paintbar is placed.