Skip to content

Tutorial 42 – Drawing lines and text objects on a chart

Welcome to Markplex tutorial 42 in this collection of tutorials designed to help you learn TradeStation EasyLanguage programming skills. EasyLanguage is a programming language that was developed for the TradeStation trading platform that can be used to write programs to help in the technical analysis and trading of foreign exchange, commodities (e.g. the Dow e-mini), options and stocks.

Please join our email mailing list if you have not already done so and we will let you know when we release new tutorials or programs.

This is a beginner level video tutorial designed to demonstrate how to draw text objects on a chart.

If you want to try the program used in the video, the code is as follows:

{ THIS INDICATOR 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 NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION IS AT YOUR OWN RISK.
THIS INDICATOR AND ASSOCIATED TECHNIQUES IS AN EXAMPLE ONLY, AND HAS BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX COPRORATION DOES NOT RECOMMEND 
THAT YOU USE ANY SUCH TRADING STRATEGIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS 
(OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF THIS INDICATOR DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.} 


If D <> D[1] then
Begin
Value1 = TL_New( D, T, HighD(1), D, SessionEndTime(1, 1), HighD(1) );
Value2 = Text_New( D, T, HighD(1), NumToStr( HighD(1),2));
Value5 = Text_New( D, T, HighD(1) - 0.1, NumToStr( Value1, 0 ) );
Value6 = Text_New( D, T, HighD(1) - 0.2, NumToStr( Value5, 0 ) );
Text_SetColor( Value5, Red );
End;

If D = CurrentDate and Value1 > 0 and Value2 > 0 and BarStatus(1) <> 1 then
Begin
Value11 = TL_SetEnd(Value1, D, T, HighD(1) );
Text_SetLocation( Value2, D, T, HighD(1) );
Value5 = Text_New( D, T, HighD(1) - 0.1, NumToStr( Value1, 0 ) );
Value6 = Text_New( D, T, HighD(1) - 0.2, NumToStr( Value5, 0 ) );
Text_SetColor( Value5, Red );
End;

{Value3 = TL_New( D, T, Lowd(1), D, SessionEndTime( 1, 1 ), LowD( 1 ) );
Value4 = Text_new( D, T, LowD(1) – 0.1, NumToStr( Value3, 0) ); }

{ ** Copyright (c) 2019 Markplex Corporation. All rights reserved. ** 
  ** Markplex Corporation reserves the right to modify or overwrite this analysis technique 
     on its https://markplex.com Web site. ** }

Make sure that whenever you try and modify and existing drawing object that you make sure that the drawing object actually exists, otherwise you will get a drawing object error.

This is a beginner level tutorial that uses a simple show-me to demonstrate the programming techniques.

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.

Tutorial 42 Video – Drawing text objects on a chart

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.