Skip to content

Tutorial 114 (DT4) | Drawing boxes on a chart between time periods each day with text labels

t114dt4-zoomed in

The original _Tutorial 114  draws boxes across the entire chart, _Tutorial 114 DT 3 draws boxes between two start and end times each day. This modified program adds text labels to the boxes, otherwise the functionality is the same as _Tutorial 114 DT 3.

The tutorial program uses the rectangle class with several of its properties and the create class. It also uses the TextLabel class. The tutorial demonstrates the creation of a method to create the rectangles, which is called from several places in the program. Tutorial 114 DT 4 creates five boxes at different price levels in each time zone.

A user input (ExtendRight) determines whether a box that is currently under development for real time bars is extended to the right or just extended to the current bar (until the end time is reached).

In situations where the start time is greater than the end time, the program assumes that the end time occurs the next day.

Explanation of changes from previous version

TradeStation EasyLanguage technical examples included in the tutorial program

In the tutorial program there are example(s) of:

  • How to write a method with several inputs
  • How to use the rectangle class
  • How to use the TextLabel class
  • How to create a DT (DateTime) point
  • How to extend the rectangles to the right
  • Setting the end point of a rectangle
  • How to vary the transparency of the rectangles
  • How to draw historic and future rectangles on historic and real-time bars
  • Specifying and using time to seconds accuracy
  • Converting EasyLanguage legacy date and time into DateTime objects
  • Dealing with start and end times that start in one day and end in the next
Link
Tutorial 144 (DT4) applied to a 3 line break chart
Tutorial 144 (DT4) applied to a 3 line break chart
With this program it is easy to draw significant numbers of drawing objects. TradeStation has limits on the number of drawing objects that can be drawn on a chart.

Inputs

double StartTime1( 1550 ), // Start time for box 1
double EndTime1( 1800 ), // End time for box 1
double StartTime2( 1900 ), // Start time for box 2
double EndTime2( 2200 ), // End time for box 2

bool ExtendRight( False ),

double Zone1_Hi( 1.133 ), // The price level of the upper edge of the rectangle for the first rectangle
double Zone1_Lo( 1.132 ), // The price level of the lower edge of the rectangle for the first rectangle
string Zone1_Color( “Blue” ), // The color of the first rectangle
int Zone1_Shading( 0 ), // The shading pattern of the first rectangle
int Zone1_Transparency( 100 ), // The alpha value of the first rectangle (between 0 and 255)
string Text1_1( “” ),
string Text1_2( “” ),

double Zone2_Hi( 1.131 ),
double Zone2_Lo( 1.13 ),
string Zone2_Color( “Red” ),
int Zone2_Shading( 0 ),
int Zone2_Transparency( 100 ),
string Text2_1( “” ),
string Text2_2( “” ),

double Zone3_Hi( 1.129 ),
double Zone3_Lo( 1.128 ),
string Zone3_Color( “Green” ),
int Zone3_Shading( 0 ),
int Zone3_Transparency( 100 ),
string Text3_1( “” ),
string Text3_2( “” ),

double Zone4_Hi( 1.127 ),
double Zone4_Lo( 1.126 ),
string Zone4_Color( “Goldenrod” ),
int Zone4_Shading( 0 ),
int Zone4_Transparency( 100 ),
string Text4_1( “” ),
string Text4_2( “” ),

double Zone5_Hi( 1.125 ),
double Zone5_Lo( 1 ),
string Zone5_Color( “Magenta” ),
int Zone5_Shading( 0 ),
int Zone5_Transparency( 100 ),
string Text5_1( “” ),
string Text5_2( “” );

Tutorial 114 (DT4) download

Tutorial 114 (DT4) is available for IMMEDIATE download for $34.95 by clicking the ‘add to cart’ button. After download the programs can be opened, you will be able to see the program code and modify it if you wish. After purchase you will be redirected to a download page, so don’t close the browser.

The download ELD includes _Tutorial 114 (DT4) (the version that includes the text labels)AND Tutorial 114 (DT3) (the version that does not include the text labels.) Both the programs are EasyLanguage show me studies. The programs do not work with MultiCharts.

t114dt4
Link
The tutorial program applied to a Kase chart
The tutorial program applied to a Kase chart

THESE INDICATORS, SHOW ME STUDIES, STRATEGIES AND OTHER PROGRAMS HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES.

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.