How to fill the area between two lines with a solid color

This example shows how to fill the area between Bollinger Bands with a solid color.

To plot areas filled with solid color it is necessary to use styleCloud style:

To display a new indicator - do the following:
- Analysis -> Formula Editor
- enter:
 

Plot
Close"Price"colorBlackstyleCandle); 

btop BBandTop(Close);
bbot BBandBot(Close);
Plotbbot "BBot"colorGreenstyleThick);
Plotbtop "BTop"colorGreenstyleThick); 

PlotOHLCbtopbtopbbotbbot""colorYellow,styleCloud );


 
 
- Tools -> Apply Indicator

4 Responses to “How to fill the area between two lines with a solid color”

  1. Derek
    August 17th, 2007 | 10:29 pm

    Hi,

    How do fill area between 2 price line over a fixed time duration(between 2 different time)?

    Regards,

  2. joerg
    August 21st, 2007 | 2:25 pm

    What shall i do if i want to fill the area between two EMAs with two different colors depending wether the longer EMA is above or below the shorter EMA. So the “cloudcolor” will change from red to green e.g.
    Thanks in advance

  3. Tim
    October 14th, 2007 | 1:52 am

    Great job! To further improve it, is it possible to make the filled solid color transparent so that one can still read other indicators, such as Moving average, in the filled area?

  4. RGC
    October 17th, 2007 | 6:47 am

    Makes BBs more colorful. But solid color covers the vertical quote selection line that appears when you click on price chart. With wide BBS, it becomes unclear which day is being referenced since the line disappears from view under the BB. Is there a way to cause the solid color to appear behind this selection line?
    RGC

Leave a reply