Premium Only Content
 
			Tutorial 180 | Text Objects Basics | Part 2
TradeStation EasyLanguage Tutorial 180 demonstrates how to draw a line, a rectangle and a text label by specifying a start date, time and price and an end date, time and price. The times can be specified to the second. The tutorial uses Parse method of the DateTime class to convert user input strings (in mm/dd/yyyy hh:mm:ss format) into DateTime objects. These values are combined with user input prices to create DTPoint objects using DTPoint.Create. These DTpoints are then used to create a trendline, a rectangle and a text label.
Additional functionality is included so that the rectangle is drawn even if the end date time is not currently visible on the chart. This is achieved by checking the current BarDateTime at the beginning of each bar. If it is less than the LineEndTime then the rectangle has its end time set to the most right display datetime. This is repeated as each new bar is added to the chart, until the bar DateTime is equal to or greater than the end time.
Technical lessons covered in this tutorial include:
– Drawing lines, rectangles and text objects
– Using DateTime.Parse to convert a string to a DateTime object
– Using methods to create and update drawing objects
– Using ‘Composite Formatting’ to print data
– Ensuring a rectangle is visible even if the end datetime is not currently on the chart
This tutorial does not work with MultiCharts.
https://markplex.com/free-tutorials/tutorial-180-text-objects-basics/
- 	
				 LIVE LIVEGraham Allen39 minutes agoSCARY: Kamala Had MELT DOWN Over Trump!! Does LSU Hate Charlie Kirk?! + Top Halloween Movies Of ALL TIME!!11,905 watching
- 	
				 LIVE LIVEWendy Bell Radio4 hours agoAmerica Deserves Better4,396 watching
- 	
				 DVR DVRChad Prather12 hours agoStanding Holy in a Hostile World13K9
- 	
				 LIVE LIVELFA TV12 hours agoLIVE & BREAKING NEWS! | FRIDAY 10/31/253,404 watching
- 	
				 1:04:43 1:04:43Crypto Power Hour11 hours ago $5.83 earnedCrypto Price Swings Explained — What Every Investor Needs to Know21.6K6
- 	
				 21:31 21:31Clownfish TV21 hours agoOG YouTube is Officially ENDING! Employees Offered BUYOUTS?! | Clownfish TV8.51K24
- 	
				 5:54 5:54Gun Owners Of America18 hours agoThe Virginia Election Could Shift The Balance of Power Nationwide9.72K5
- 	
				 2:00:02 2:00:02BEK TV1 day agoTrent Loos in the Morning - 10/31/20258.41K1
- 	
				 LIVE LIVEThe Bubba Army23 hours agoIs Killing The New Trend??! - Bubba the Love Sponge® Show | 10/31/251,377 watching
- 	
				 2:25:16 2:25:16Demons Row14 hours ago $4.31 earnedEx Hells Angels MC President: Charles “Peewee”Goldsmith (Full Interview)15.6K4