Find Answers/MarketDelta Charts/Technical Indicators

Paint Bars

Trevor Harnett
posted this on June 05, 2010 22:05

The Description

The Paint Bars indicator is a powerful tool for highlighting individual bars or groups of bars within a traditional bar chart. Normally, the bars in a traditional bar chart are drawn in one of two colors: an up color (typically green) and a down color (typically red). When a bar closes above the close of the previous bar, the bar is drawn using the up color, otherwise the bar is drawn in the down color.

When a Paint Bars indicator is added to a traditional bar chart window, you can elect to paint the actual bars or highlight the normal bars with specific background color(s) if some "condition" is true. The "condition" is specified by selecting a particular scan, trading signal, or custom indicator. For each bar in the chart, a scan or trading signal is either TRUE or FALSE. You can choose specific colors for both the true condition and the false condition. If a custom indicator is chosen as the painting criterion, then the custom indicator has an arithmetic value corresponding to each bar in the chart. Thus, three color choices are provided for positive, negative, and zero values of the indicator.

Here is a simple example. Suppose you wanted your intra-day bar charts to highlight periods of time during which the instrument is trading above the moving average of closing prices for the preceding 10 periods. First, create a "scan" named "Above MA" with the RTL formula:

CL > MA

Where the MA moving average token is defined as a 10 period simple moving average.

Open an intra-day bar chart of some instrument and add a "Paint Bars" indicator to the chart. Setup the paint bars indicator to use the scan named "Above MA" created above. Specify "Paint Background" using the menu at the bottom of the Paint Bars setup window. Place a check mark in the box to the left of the "TRUE" condition color box, then click on the color and pick a highlighting color for the TRUE condition. You could also specify a different color for the FALSE condition, but in this example, leave the checkbox to the left of the FALSE condition color box unchecked. Then click OK to add the Paint Bars indicator to the bar chart. You will see all bars that closed above the moving average are highlighted with the TRUE color chosen above.

To change the settings for a paint bars indicator, click the Edit Chart Element button on the charting toolbar and select the "Paint Above_MA" graph element. The setup window for the paint bars indicator will appear. Change the menu to read "Paint Bars" instead of "Paint Background". Change the TRUE condition color if you like to something different than the normal up/down colors you see in the chart, e.g. blue. Then click the Apply button to observe the effect (without closing the settings window). Notice that now the bars themselves are painted blue whenever the close is above the MA while other bars are painted normally using the up/down colors.

If you click the "Add Technicals to Chart" button, MarketDelta® will determine which technical indicators are being used by the paint bar criterion. In this example, the MA technical indicator used in the "Above MA" scan will be added to the chart so you can verify visually that the highlighted bars do indeed close above the moving average.

Note that only one Paint Bars indicator should be added to a chart pane. If you add more than one, the first one will be used. To change the scan, signal, or custom indicator used to paint the bars, first delete the existing paint bars indicator, then add a new one using a different scan, signal, or custom indicator.

If you revise the meaning of a particular scan, signal, or custom indicator that is currently being used to paint bars in one or more bar chart windows, the chart will update dynamically to reflect the revised meaning. In our example above, if you open the scan "Above MA" (using the Open: Scan command) and revise the MA token, changing it from a ten period to a twenty period moving average, and click the Save button, the chart window will re-paint automatically to highlight the bars closing above the 20-period moving average.

The Presentation - more on Charts

Paint_Bars.png

Above is a bar chart with a Paint Bar indicator applied to the actual bars and in the lower pane is the volume breakdown indicator plotting cumulative delta. The VB indicator is there to help show what the paint bar was meant to do in this example.

The Preferences

Paint_Bars_-_prefs.png

  • Paint Using... - You can base the bar painting on either a Scan, a Trading Signal, or a Custom Indicator. The list below allows you to pick the specific Scan, Signal, or Custom Indicator.
  • View - This button will bring up the appropriate window to view or edit the object in the list to the left.
  • New - This button will allow you to create a new object based on whether you have Scan, Signal, or Custom Indicator chosen above.
  • If value > 0 (TRUE) - If this check box is checked, the bars will be drawn in the corresponding color when the expression above evaluates to a value of greater than 0. Since TRUE is the equivalent of a
    numerical 1, TRUE is included in this group.
  • If value <= 0 (FALSE) - If this check box is checked, the bars will be drawn in the corresponding color when the expression above evaluates to a value of less than or equal to 0. Since FALSE is the equivalent of a numerical 0, FALSE is included in this group.
  • Paint Bars / Paint Background - You may choose to either paint the bars themselves, or paint the background behind the bars.
  • Add Technicals to Chart - This button will add the technical indicators involved in the scan, signal, or indicator expression, to the chart.

RTL Token - more on RTL