ChartScript Scans

A ChartScript scan is built in exactly the same way as a ChartScript indicator and can also be placed into a chart area. Typically the ChartScript scan will be placed into its own separate area so that the scan events can be clearly seen.

Here the ChartScript - AUBB (Above Upper Bollinger Band) has been placed into the lower chart area. This script is written as a scan type script meaning that it produces 1 or 0 values to indicate the presence or absence of the scan event.

The AUBB scan script looks for the condition of Close price crossing above the upper Bollinger band. When the event is discovered, a '1' value is set for the output of the scan. The chart area displays a blue triangle for the scan event with the peak centered on the bar that generated the event.

The screenshot has been annotated with a blue-arrow pointing from an event in the scan area to the bar in the chart that generated the event. You can see that the stock went from closing below the band on the previous bar to above the band on the highlighted bar.