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
Matt Kohrs
10 hours agoStocks On Edge, Crypto Plummets & Live Trading $1M || The MK Show
1,918 watching -
LIVE
jeffahern
1 hour agoMonday Madness with Jeff Ahern
775 watching -
11:45
Bearing
1 hour agoJust Stop Oil - Climate Crusaders or Eco Patsies?
7.19K11 -
11:04
Misha Petrov
18 hours agoSelf-Love or Narcissism? The Impact of Self-Help Influencers
8.06K62 -
19:01
DepressedGinger
1 day ago $0.01 earned*CRAZY* Biden-Trump NUCLEAR debate could change the Election?
31.3K63 -
26:38
Destene and Brandon
20 hours agoBrunch to celebrate the new baby! | Putting together care packages | Game Night | Pool Update &MORE
26.8K3 -
9:37
scoutthedoggie
1 day agoAirsoft Sniper on Your 12
36.9K1 -
10:56
ryanhoguepassiveincome
16 hours agoTOP 5 NICHES 🔥 Print on Demand Niche Research # 213 — (6/23/2024)
35.5K1 -
7:01
intheblues
1 day agoMy Fender Telecasters - The Same, But Different?
28.1K4 -
51:39
Kimberly Guilfoyle
3 days agoNO BORDERS BIDEN, Where We Go from Here, Live with Monica Crowley & Jaime Florez | Ep. 135
97.1K158