Design Your Own™
The Design Your Own (DYO) study feature can be used to implement Boolean
logic and mathematical equations. The feature can be used to create
and plot custom indicators, or show special visual effects. The variety
and complexity of the things being created by customers with the DYO feature are
truly amazing.
| Add DYO to a Chart
With a chart showing, click on the Study
button and select Design Your Own on the drop down list. This adds
a DYO study to the chart's collection of studies, alerts and draw tools.
|

|
| DYO Property Form
Press CTRL-O to show the Chart Object
list. Double click on the Design Your Own entry on the
list.
The DYO property form will be displayed so properties can be set.
The following picture is an example.
|

|

| Study Name
Change the Study Name field to give your DYO a custom
name. This name will show on the Chart Objects list and be used as the
label in a sub-window. The Study Name can be up to 15 characters in
length.
Study Location
This selects the panel where the Markers and Labels will be
displayed.
|

|
| Color Band Positions
The Color Band Positions selection would be None to plot a curve at a
value.
The other positions can be used to place markers on the chart at a
particular position, such as in rows along the Top or Bottom of the
panel.
The selections of Last, Above High, Below Low, Open, and Midpoint
will use that position on the chart's bar. |

|
| Study Scale
Use the Study Scale selection to pick the scale that is appropriate
for the data to be plotted.
Chart prices plotted on the chart would typically use Chart Scale.
Data plotted in an existing sub-window would typically use the
sub-window's scale.
The Data Set selection will determine the scale from the data by
looking for the highest high and the lowest low value in the data set.
The Fixed Range selection will show additional boxes to enter a
custom scale.

Data 0 Centerline will balance the scale so zero plots at
the center of the panel.
Data 50 Centerline will balance the scale so 50 plots at
the center of the panel.
0 to Max Data will use 0 as the scale low and determine
scale high from the data set.
The last four selections are similar to those
described. The scale range is increased to create a 5 percent margin
at both the top and bottom of the range.
|

|
| Message Location
Ensign Windows has a sub-window at the bottom of the chart that is
divided into seven Sections. This area can be used to show
messages, study and chart values.
The DYO can display a message in one of the seven Sections. Select None to disable the section
feature.
|

|
| Line Logic
The Line Logic selection identifies which DYO Line controls
the Section background color. When the Line Logic is True, the
section background will use the True color. When the Line Logic is
False, the background will be colored the False color. The message
text will show in the Font color.
Line A through Line J can be a Boolean result that will control the
Section color and the message is from the Message Text edit box.
Selections 'A & B Labels' through 'I & J Labels' will use the
Boolean logic of the two lines as a pair. Which ever line of
the pair was most recently True is the line whose label will be
displayed in the Section as the message text. The Section
background color will be the Line's Show color.
'A Label True' through 'J Label True' will show the label from these
lines only when the Line evaluates to a true. When the Line is a
False, nothing is done.
'A or B or Blank' through 'I or J or Blank' will show the Line's
label when either Line evaluates to True and use the Line's Show color. When both lines are
False, the Section is Blank and colored using the False color.
|

|
| Message Text
The Message Text can be shown in a Section at the bottom of a chart.
Text to be shown on multiple lines is separated by a comma character.
The text can contain a message to show when the Line Logic is True
and a message to show when the Line Logic is False. Separate the
two messages with a vertical line character.
The example illustrates a 3 line message with insertions at the [..]
references.
[A] through [J] will insert the DYO's Line value. Add a $
suffix to format the value as a price using the chart's
scale. Add a ' character suffix to format the value as a
degree (integer). Examples: [A$] and
[A']
[0] through [255] will insert a Global Variable value.
Boolean flags will show 'True' or 'False'.
The following Chart and Bar values can be inserted.
| [$S] |
Chart symbol |
| [$O],[$H],[$L],[$C] |
Bar Open, High, Low, Close |
| [$V],[$T] |
Bar Volume, Tick Count |
| [$N],[$R] |
Bar Net, Range |
| [$A],[$B] |
Ask Volume, Bid Volume |
| [$E],[$F] |
Ask Ratio, Bid Ratio |
| [$J],[$K] |
Buy Pressure, Sell Pressure |
| [$W],[$X] |
Buy Ratio, Sell Ratio |
| [$%] |
(C - L) / (H - L) |
| [$2] |
(H + L) / 2 |
| [$3] |
(H + L + C) / 3 |
| [$4] |
(O + H + L + C) / 4 |
| [$I] |
Bar Index |
| [$M] |
Chart time frame |
| [$Z],[$Y] |
Tick Size, Tick Size / 2
|
| [$Q] |
Tick field from Symbol Properties.
|
| [$G] |
Min. Grid from Symbol Properties.
|
| [$P] |
Leverage to convert points to $ |
| [$D] |
Bar time in format of hhmm
or date in format of yyymmdd |
| [$<],[$>] |
Day session Open, Close time hhmm |
| [$(],[$)] |
2nd session Open, Close time hhmm |
The following Sim-Broker values can be inserted.
| [@P] |
Position: {Long, Short, Flat} |
| [@Q] |
Open Position Quantity |
| [@E] |
Open Position Entry Price |
| [@O] |
Open Position Profit/Loss |
| [@C] |
Closed Positions Profit/Loss |
| [@$] |
Total Profit/Loss |
| [@W] |
Win Trades Profit/Loss |
| [@L] |
Loss Trades Profit/Loss |
| [@T] |
Number of Total Trades |
| [@B] |
Buy Stop Price |
| [@S] |
Sell Stop Price |
| [@R] |
Stop and Reverse Price |
The following Quote record values can be inserted.
| [^O],[^H],[^L],[^C] |
Open, High, Low, Close |
| [^V],[^I] |
Volume, Open Interest |
| [^N],[^Y] |
Net, Yesterday's Close |
| [^A],[^D],[^E] |
Ask, Ask Size, Tick Vol at Ask |
| [^B],[^F],[^G] |
Bid, Bid Size, Tick Vol at Bid |
| [^%] |
(C - L) / (H - L) |
| [^2] |
(H + L) / 2 |
| [^3] |
(H + L + C) / 3 |
| [^4] |
(O + H + L + C) / 4 |
| [^R] |
(H - L) Range |
| [^S] |
True Range |
| [^T],[^Z] |
Tick Volume, Between Bid Ask |
|
Example Section display:

|
| Edit Buttons
Use the edit buttons to manage the DYO's Line A through Line
J. The first step is to click on a line in the Category
field. The line will be selected and the letter by this line
will be changed to a darker color.
Click the Insert Line button to insert a blank line above the
selected line.
Click the Delete Line button to delete the selected line.
The Swap Lines and Copy To buttons need two lines to be
identified. Step one is to click on a line in the Category
field. Step two is to click on a second line in the Category
field.
Clicking the Swap Lines button will swap these two lines.
Clicking the Copy To button will copy the first line to the second
line. The content of the second line will be lost. The
content of the first line will remain unchanged.
|


|
| Line A through Line J
Use the DYO Lines to implement logic and math operations. The
lines will be evaluated in sequence from Line A through Line J. The
first step is to select a category, which then displays appropriate
additional control boxes.
Study Value - Study values that are present on a chart can be
read. Select the Study from the 2nd drop-down list. Select
the particular study's value from the 3rd drop-down list. For
example, you could select the 'Stochastic' study from the 2nd list, and
then select the '%D Value' from the 3rd list.
Study Flag - Studies that are placed on the chart will report a
variety of conditions. These conditions are Boolean flags that can
be used in an implementation. Select the Study from the 2nd
drop-down list. Select the desired Study Flag from the 3rd
drop-down list. For example, you could select 'Stochastic' from
the 2nd list, and select '%D Rising' from the 3rd list.
Always True - This Line will always execute. Possibly it is
showing a Marker.
|

|
| Number Field - A fixed numeric value can be entered.
The number field can reference a Global Variable value by enclosing the
GV number in square brackets. Example: [5] will get
the number value from GV[5]. Permitted GV references are [0]
through [255].
The same bar, Sim-Broker, and quote values that can be inserted in a
text message can be referenced in the Number field, except [$S]. See the
Message Text section above for a full list of the available reference
notations.
Example: To reference a bar's close in the number field,
use [$C].
Bar Offset - A Bar Offset can be specified to
reference earlier bar data. For example, a Bar Offset value of
-1 would read data from the prior bar. A value of -5 would
indicate 5 bars back. An offset of zero is the current bar.
|
 |
| Read GV and Write GV - Global Variables can be read and
written using these spinner boxes. Click this link for more
information about Global Variables.
|
 |
|
Show Marker and Label - Each DYO Line can show a Marker in the selected color and a Label. The
Label can include the same [..] insertion references as documented for
the Message Text. Labels will show in the margin to the right of
the last bar on the chart at the Color Band Position.
Double click in the Label field to erase the label and reset the Show
checkbox to being unchecked. The Marker is removed and the Color
is reset to white.
Click this link for an example
of using DYO logic to select the marker color.
The Label text can contain a prefix that specifies a Section window
for the label. The prefix is in the format of |x|
where x is the number of the Section window in the range of
1..7. Example: |1|Last=[$C] will
put Last=1325.50 in Section 1.
Click this line for an example
of using the 6 Section windows as a Ticker.
When showing a Label in a Section, if the Line evaluates to True, the
True color is used for the Section background. If False, the False
color is used for the Section background. See the Line
Logic section for setting these 2 colors.
Do Next IF - Use this category selection to conditionally
execute or skip the next DYO Line. If the Boolean test
evaluates to a True, the next DYO Line is executed. The next
DYO Line is skipped if the text evaluates to a False.
Abort IF False - Further execution through the DYO Lines is
aborted if the Boolean text evaluates to a False. Execution
continues when the test is True.
|
 |
| Global Action
Value[#] = 0 will fill a set of GVs with zero.
Value[#] = True will fill a set of GVs with the True flag.
Swap(Value,GV(#)) will exchange the contents of Value and the
GV whose index in the Number field.
Shift Right[#] will copy a set rightward. The last value in the
original set is lost. Example set values: 6, 7,
8, 9 becomes 6, 6, 7, 8 when shifted
right.
Shift Left[#] will copy a set leftward. The first value
in the original set is lost. Similar to right shift, but moves
values in the set in the other direction. Example:
6, 7, 8, 9 becomes 7, 8, 9, 9
Rotate Right[#] is similar to Shift Right, with the exception that
the last value is moved to the first position.
Rotate Left[#] is similar to Shift Left, with the exception that the
first value is moved to the last position.
Line A through Line J = # will assign the Number value to the Line's
array of values. This is one way for a Line to change another
Line's values.
Beep( # ) will make a Windows message sound based on the Number
value:
The wav file associated with each selection can be changed on the
Windows Control Panel. Select Sounds and Audio Devices, then click
the Sounds tab.
If Flag then Plot # will read the GV Flag, and when True will
plot the # value using the marker selection. When the marker is one of the
2 curve
selections, the line will connect a prior point with the current point even
though several bars may separate these two plot points. IF(
expression, True Value, False Value) Statements with
this general format will return the 2nd parameter's value when the
expression is True, and return the 3rd parameter value when the
expression is False.
PriceFinder™ - The PriceFinder selections in the Global
Action category are very powerful features that will evaluate a Boolean
Flag and return the price where the Flag will be True, False, or Change
states. For example, PriceFinder can determine the price
that would make two moving averages cross, or cause CCI to cross zero,
or make a bar reach a channel band. |
| Number |
Beep Sound |
| 1 |
Asterisk |
| 2 |
Exclamation |
| 3 |
Critical Stop |
| 4 |
Question |
| all others |
Default Beep |
|
|
|