Skip to content

Tutorial 101 | Drawing a mark at a specified place on a chart

Drawing a mark at a specified place on a chart every bar

Welcome to Markplex tutorial 101 in this collection of tutorials designed to help you learn TradeStation EasyLanguage programming skills. Please join our email list if you have not already done so and we will let you know when we release new tutorials or programs.

This tutorial applies to TradeStation (but not MultiCharts).

Tutorial 101 programs applied to chart. The small marks are placed at the level of the exponential moving average.
Tutorial 101 programs applied to chart. The small marks are placed at the level of the exponential moving average.

It is sometimes useful to be able to draw a mark on a chart, at a specific level. For example, when creating and debugging programs you might want to be able to visualize where a value such as a stop loss or profit target is located. Before the new drawing objects became available I would often just add a text symbol (e.g. “*”) or a latter (e.g. “x”)  to the chart. Text has the advantage that it is easy to draw and can be drawn for a specific bar, as opposed to a trendline which must be drawn between two bars (at least to be visible). It has the disadvantage that it is not necessarily positioned at the exact price level (for example, a quotation mark is at a higher level than a comma).

Tutorial 101 demonstrates how to use the ellipse drawing object to place a small mark on the chart at an exact price level. The technique is built into a function so that it can be reused in other programs. The tutorial may also be useful to you if you want to learn some basics of using the new drawing object tools.

Inputs to the function determine the inner color of the ellipse, the outer color and the size. The function is called using the following syntax:

Value1 = _Tutorial101( XAverage( C, 14 ), 4, “AliceBlue”, “MidnightBlue” );

The first input is the price value, the second input is the weight (this can be 0, 1, 2, 3, or 4) and the last two inputs are the inner and outer colors of the ellipse. Note that the colors are expressed as text in double quotes. A list of possible colors in included lower down this page.

See the video below to understand how the program works.

This tutorial program is available for immediate download for only $19.95. 

Gold pass area

Gold pass members can cut and paste the function in the following section:
This content is for members only.

Tutorial 101 video

For best results, watch this video in full screen HD mode.

This tutorial program is available for immediate download for only $19.95. 


Gold Pass members get an additional 20% discount off all program and tutorial prices. If you are a Gold Pass member make sure you enter the special coupon code to get 20% discount off these prices. You can find the coupon code on the Gold Pass page.

Available colors

AliceBlue
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
Burlywood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Cyan
DarkBlue
DarkBrown
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
Dark Magenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuschia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
PowderBlue
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
Seashell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow
YellowGreen

TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.

ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.

If you see any errors in this tutorial – or we have not made something clear, we would be most grateful if you could please let us know. E-mail us at: tutorials@markplex.com. Also, let us know if you have any ideas for new tutorials