Chart Scanner on Bollinger Bands

Q:  I want the scanner to tell me which symbols on the quote list has price above/below the first band in a 20 day BB study (above +1 Std , below -1 Std).

A:  This example will walk you through the steps.

1)  Create a quote page of symbols to scan.   In this example the vendor’s symbol list is used, but a custom list could have been used.  Here is the vendor list and quote page.

2) Open a daily chart for each symbol to verify the chart is complete. Refreshed the chart if needed. Charts can then be closed.

3) On one chart, put on a Bollinger band and configure it for a 20 Average and 1 multiplier. Now add a DYO configured this way to test for Close exceeding either upper or lower bands.

Variable [8] has the upper band value, [9] has the lower band value, and [3] is the flag that is True when close exceeds either band.  These 2 studies are then saved as a template named BollingerTest.

4) Open Setup | Chart Scanner, and configure the form like this.

Name this setup Bollinger and use the Save button to remember these settings after filling in the form. That way it can be retrieved.

The box to use the Vendor quote page for eSignal is checked. Load each chart with the BollingerTest template. Chart time frame is Daily.

The Criteria for adding to the report is when Variable [3] is True.  [3] was set by the DYO.

The report will have 4 columns with labels Symbol, Close, Upper, Lower. The format is caption = value.  [$S] is the token for showing the chart symbol. [$C] is the token for the Close price.  [8] and [9] are variables populated by the DYO for the upper and lower Bollinger bands.

5)  Now, click the Run Scanner button and get a report of results like this.

Of the symbols on the quote list, 7 triggered the criteria. AAPL Close is 587.45 which exceeded the Upper Bollinger band.   Here is the AAPL chart as confirmation.

The price has moved a few cents from when the scan was run and the chart image captured for this example.

Study Values in Sections

Q:  How can I have a DYO display study values at the bottom of the chart?  Basically what I want to do is instead of having the show values window appear on the left side of the chart I would like the values to be displayed in the DYO field sections of their respective DYO’s to save screen real estate.

A:   This DYO will show current study values in sections at the bottom of the chart. These are current values that will update tick by tick. They are not study values aligned for where the mouse is.

A – Read a study value and show the label with a blue background and white font. The label has |1| to indicate the location is the 1st section.

B – Read another study value and show with a brown background. The label has |2| to locate the text in the 2nd section.   [B.2] is the value from Row B formatted to show 2 decimals.

A DYO like this can show values in 7 different sections that exist at the bottom of a chart. Use the section tags |1| through |7|.

Day Session Range

Q:   I need to view the ES on an all-sessions chart.  But I would like to have a DYO start at 9:30 and end at 16:15.  I would like it to find the high and low during that time which would allow me to display the range on the message text.

A:  Use a Daily Price Lines tool to find the day session only high and low, and a DYO to calculate and show the range in the message text.

The DPL will find the Today High and Today Low, but have the Day Session box checked so these values are found using only the 9:30 to 16:15 data.  Their values are saved in the GVs as shown so the DYO can calculate and show the range.

Tick Count in a Bar’s Range

Q:  I am wanting to know the number of ticks per bar. The total count from the high to the low. (Bonds are 1/32 so they are tricky).

A:  Ensign has a value called Tick Count for each bar, but I do not think that is what you seek since you mentioned 1/32nds. The Tick Count is the number of trade ticks received for the bar. I think you are wanting to count the number of price intervals in a bar’s range. For example, if the bar’s High is 109-040 and the bar’s Low is 109-020 the answer is 4 on a ZB bond chart because the difference is 4/64ths.  ZB trades in half 32nds.

This DYO example will make the calculation and show the price count above each bar.

The BAR marker selection will post the expression result as an integer value.  The Marker Location selection used was the Above High 5 location.

Overlay Daily Bar

Q:  Can Ensign overlay a Daily bar chart on a 120-minute bar chart?

A:  Ensign does not overlay charts with different time frames. Ensign overlays would be of the same timeframe for both charts.

However, this DYO example will plot a daily bar on the intra-day chart. It is not exactly what you requested but might be sufficient for your purposes.

The DYO made the daily bars which are shown in yellow. There are 3 other DYO marker  choices that can do a Standard bar, Candlestick, and Ensign Rocket. The example shows the Flute bar style.

The only line that is plotting is Line K.   Lines A, B, C, F and G which are not necessary for the example are included so that you can check their Show boxes and add more content to the visual, such as bands showing the day developing and High/Low values above the daily bar.

The core of the example is Line E, H, I, J, K.   Lines H through K are the 4 values needed by Line K’s marker which draws the Flute bar. Line E controls when the bar is drawn.

Arms’ Ease of Movement Value

The Arms’ Ease of Movement Value (EMV) is an indicator based on Momentum which qualifies volume and price changes and tries to determine the ease the price is to move up or down.

An optimized moving average crossing above zero is a buy trigger (and is highlighted in green) and crossing below zero is a sell trigger (and highlighted in red).

The DYO uses a simple moving average with a period of 9.

If the EMV exceeds 60% then there is ‘Extreme Optimism’ in the ease. If EMV drops below 40% then there is ‘Extreme Pessimish’ in the ease. Black dots in the sub-window signify these areas.


EMV = ((High+Low)/2 – (Prior High+Prior Low)/2) / Volume / (High – Low)

A – Define period for the moving average on Line F.
B – Define a multiplier to counter the magnitude of the volume division on Line D.
D – Implement the EMV formula.
E – Rescale the EMV result by the multiplier. Optionally plots the EMV as a blue line.
F – Create a Simple Moving Average of the EMV and plot as a red line.
H, I – Show the Buy and Sell triggers for when the Average crosses zero.
J, K – Show when the Average is above 60 percent or below 40 percent of the scale.

This study as a template can be downloaded in Ensign 10 from the Ensign web site using the Package feature.

Credits:   Richard W. Arms, Jr.

McClellan Summation Index

The McClellan Summation Index is this formula on the $ADD chart.


Summation Index = 1000 + (10%Trend – 5%Trend) – ((10 x 10%Trend) + (20 x 5%Trend))

= 39-day EMA of (Advancers-Decliners)
10%Trend = 19-day EMA of (Advancers-Decliners)

The symbol for the Advancers-Decliners is delayed but is available through IB as $ADD.  

The formula is implemented with this DYO, and available on the Ensign web site using the Ensign 10 Package feature to download it.

A – Create the 39 period average.
B – Create the 19 period average.
C – Calculate the first half of the formula:   1000 + (10%Trend – 5%Trend)
D – Calculate the 2nd half of the formula:  10 * 10%Trend + 20 * 5%Trend
E – Subtract the two halves.  Plot this result which is the Summation Index.

William’s Variable Accumulation Distribution

The Williams Variable Accumulation Distribution (WVAD), developed by Larry Williams, is a volume-weighted price momentum indicator.  It measures the buying and selling pressure by calculating the relationship between the number of points the market has moved from the open to close relative to the period’s entire range.  Short positions are taken for a negative moving average value, and Long positions for positive average values.


WVAD = (( Close – Open ) / ( High – Low )) * Volume

The formula can be implemented with a DYO, as shown.   This is available as a package to download from the Ensign web site using the Package feature in Ensign 10.

A – Period for Moving Average (Line D)
B – Implements the formula.    WVAD = (( Close – Open ) / ( High – Low )) * Volume
C – Plot the formula values.  This statement is used because it will plot values that equal zero, whereas plotting directly from line B would not.
D – Simple Moving Average of the WVAD.  Plotted in Red.
F – Mark where the average crosses above zero.  This is the Long signal.
G – Mark where the average crosses below zero.  This is the Short signal.

Weekly Range on a Daily Chart

Q:  I want to overlay a weekly bar over the daily bars.  Any suggestions?

A:   This clever DYO that will show a weekly range on a daily bar chart.

On the first bar of each week, ie Monday, the DYO will look in the forward direction for the other bars in the week, find the Maximum High and Minimum Low, and plot these values. The key to this is the Offset used for the comparison. For example,  Line C compares the current bar’s high on the top row with Offset = 0 with the High on the 2nd row of the entry boxes where Offset = 1.  The +1 offset references tomorrow’s bar. High[2] is the High 2 bars in the future from the evaluation bar, and High[3] is 3 bars into the future.

5-Minute Bar Sets Hourly High or Low

Q:  How do you design an alert when a 5 minute bar is either the high for the last hour or the low for the last hour?

A:  Here is an example where the high and low of the last twelve 5-minute bars is found and then tested to see if the current bar is setting that value.   12 bars were used on the 5-minute chart because that amounts to the last hour.