/***********************************************************************************************
Title: Candlestick Script for eSignal
By: Divergence Software, Inc.
Web: http://www.sr-analyst.com
================================================================================================
Project Description:
Current version will run in a chart or in a watchlist. When run in the chart it will display either the
pattern name or draw the icon associated with that candlestick pattern. When run in a watchlist it will
display the pattern name as well as the number of bars elapsed since the pattern was identified. The
cell background color will be based on the slope of the price action at the time the pattern was
identified.
This script will locate and highlight candlestick patterns in your price data. When the script is first
loaded, it will mark all patterns found in the historical data and, as new bars come in, it will identify
patterns as they complete.
The script can be configured to monitor up to 40 patterns. The power of this script lies in the fact that
all of the patterns are user-definable. The specific patterns that the script will search for are
controlled by a text file called CANDLES.CFG. In this text file, you can use a simple-to-use set of codes
to specify up to 40 unique bar patterns that the script will then watch for. The syntax used to define
the bar patterns is very similar to that used in programs such as TC2000.
Example:
L0>L1 && H0
0
The code above specifies that the low of the current bar must be higher than the low of the preceding bar
AND the high of the current bar must be lower than the high of the preceding bar AND the slope of recent
price action must be UP (e.g., >0 ).
For more examples and for more information on defining bar patterns, please load your copy of the
CANDLES.CFG file into any text editor and review the contents of that file.
Parameters:
The script has several parameters that can be adjusted either by clicking on the aqua-colored "Candlestick
Menu" icon that you will see at the bottom-left of your chart when the script is loaded OR by right-
clicking in the chart and selecting the "Edit Chart" option.
Look Back: This is the number of historical bars that the script
should process when it is first loaded. The default
value is 300 bars. This means that, when first loaded,
the script will process the most recent 300 bars of
historical data and will identify all patterns found
in the data. It will ignore any bars past the 300-bar
limit. The valid range is from 5 bars to 5000 bars.
This parameter is included simply to make the initial
loading of the script faster. If you really don't care
about any patterns that are more than, say, 100 bars
old, then set your Look Back to 100. The script will then
ignore any bars that are beyond the 100-bar limit and
the script initialize faster when you change symbols
in your chart.
Bars for Slope: This parameter controls the number of bars to use when
determining the slope of the recent price data (e.g.,
is the price trending up or is the price trending
down. Specifically, it is used in conjunction with the
"SLP" bar pattern code. The SLP code is used when defining
bar patterns (see the CANDLES.CFG file) to specify the
direction of recent price action. The default value is
4 (bars) and the valid range is from 1 to 100.
Show Menu Buttons? Use this parameter to toggle the display of the on-screen
menu buttons. Valid values are true or false.
Color - Menu FG The foreground color to use for the menu button.
Color - Menu BG The background color to use for the menu button.
Menu Vert Offset The vertical offset, in pixels, at which to display the button group.
Menu Horz Offset The horizontal offset, in pixels, at which to display the button group.
Menu Font Size The font size to use when displaying the button group.
Text Display: This parameter works in conjunction with the "Show Text/
Show Icons" on-screen button. The valid values are
"Regular" and "Bottom/Top". When "Regular" is seleccted
(the default) when the Show Text button is clicked, the
icons on the chart will be replaced with the pattern name,
as defined in the CANDLES.CFG file. When "Bottom/Top" is
selected, the icons will be left in place on the chart
and the pattern names will be printed in the upper and
lower margins of the chart.
Vertical Padding: This parameter controls the vertical spacing between the
symbols/text drawn by the indicator and the price bars.
For example, if you set this Vertical Padding parameter to
0.50 then all text/symbols will be offset from the price
bars by 0.50. The default value is 0 (no offset).
Font Size The font size to use when drawing the patterns on the chart.
Slope Rising
FG Color The cell foreground color to use when displaying patterns that are
identified when the slope is rising.
BG Color The cell background color.
Slope Falling
FG Color The cell foreground color to use when displaying patterns that are
identified when the slope is falling.
BG Color The cell background color.
Default FG Color The default cell foreground color to use.
BG Color The cell background color.
Alert Use Sound: Use this parameter to toggle audio alerts. When set to
true, an audio alert will be generated in realtime
when a new candlestick pattern is identified.
Alert Use Popup: Use this parameter to toggle pop-up alerts. When set to
true, a pop-up alert will be generated in realtime
when a new candlestick pattern is identified.
Alert Use Email: Use this parameter to toggle email alerts. When set to
true, an email alert will be generated in realtime
when a new candlestick pattern is identified. Email alerts
are only available when the indicator is running in a chart.
Alert WAV File: Use this parameter to set the WAV file that will be used
for audio alerts.
draw XXXXX: Use these menu options to toggle the display of an individual pattern.
Valid options are true or false. A draw XXXXX' menu option will appear
for each pattern that you have defined in your CANDLES.CFG file, up
to a total of 40.
Button Bar
Show Text This is a toggle button that allows you to quickly switch
between the display of the icons versus the display of
the pattern name.
Menu Click on this icon to display the script parameter menu.
Notes:
The CANDLES.CFG file must exist in your eSignal Formula Output directory for the script to operate. So,
when you first receive the script, copy the actual EFS file (e.g., Candlestick.efs) into any eSignal
Formula Directory and then copy the sample CANDLES.CFG file into your eSignal Formula Output Directory.
On most systems, the Formula Output Directory will be found at:
\Interactive Data\FormulaOutput\
When clicking on the Button Bar in eSignal 12, be sure that you first hold down your SHIFT key. So the
correct sequence would be to:
1. Hold down SHIFT key on your keyboard;
2. Click on the Button Bar button;
3. Release the SHIFT key;
Dislaimer: For educational purposes only! Obviously, no guarantees whatsoever and use at your own risk.
******************************************************************************************************/