Premium Only Content
 
			EasyLanguage Tutorial 185 | Changing the TradeStation DataTip when hovering over drawing objects
Tutorial 185 is built around a TradeStation EasyLanguage PaintBar study (_Tutorial185-Paintbar) that analyzes a chart searching for rectangles that have been drawn by the user using the chart drawing tools. The program modifees the datatips dialog to add the values of the number of bars in the rectangle and the price difference between the upper price and lower prices in the rectangle. These values are only displayed when hovering over bars that are encompassed by the rectangle. The same techniques could be modified and used with other drawing objects to display other values.
The paintbar study includes a method called PlotVals( ). This method goes through the rectangles on the chart and extracts the information that needs to be plotted. It stores it in Appstorage with the key values being the number of each bar within the rectangle being analyzed. The method then throws and exception which causes the program and the data to be reloaded. The method runs when a rectangle drawing object is created or clicked. The method uses another Method (DTtoBN) to convert Datetime values to Barnumber.
In this program the exception is thrown using a macro called using Runcommand. This requires that the ‘Enable runcommand EasyLanguage keyword…’ check box is selected in the format-analysis dialog box. See Quicktip 53 for information about using RunCommand and this macro: https://markplex.com/free-tutorials/tradestation-easylanguage-quicktips/quick-tip-53-how-to-modify-tutorial-116-to-reload-the-data-at-intervals/
For every bar on the chart the program checks to see whether there is a value stored in AppStorage for that bar, if so the number of bars in the rectangle and the price difference between the top and bottom of the rectangle are parsed using a TokenList and then plotted.
Appstorage
==========
AppStorage is a Dictionary of name-value pairs that is persistent when an analysis technique is re-verified, has its
inputs modified, or re-runs for another reason (such as when it is disabled by the user temporarily, and then enabled again). This means that when the exception is thrown the values persist in the Appstorage and can be plotted.
Values that are stored in AppStorage are saved when the workspace is saved.
More information can be found about Appstorage in Tutorial 119. See https://markplex.com/free-tutorials/tutorial-119-storing-chart-data-appstorage/
For more information about this tutorial, visit: https://markplex.com/free-tutorials/tutorial-185-changing-the-tradestation-datatip-when-hovering-over-drawing-objects/
- 	
				 LIVE LIVELara Logan8 hours agoSHOTS FIRED: The Tyranny of Big Pharma Exposed with Dr. Sherri Tenpenny | EP 42 | Lara Logan281 watching
- 	
				 LIVE LIVESean Unpaved1 hour agoRavens' Resurrection Night: Lamar Buries Miami, NFL/CFB Spooky HC Shifts, & Kalshi's Week 9/10 Odds!91 watching
- 	
				 LIVE LIVEFilm Threat1 day agoHALLOWEEN HORROR + BACK TO THE FUTURE RERELEASE + MORE REVIEWS | Film Threat Livecast88 watching
- 	
				 1:21:16 1:21:16Steven Crowder3 hours ago10th Annual Halloween Spooktacular: Reacting to the 69 Gayest Horror Movies of All Time156K101
- 	
				 57:39 57:39The Rubin Report2 hours agoKamala Gets Visibly Angry as Her Disaster Interview Ends Her 2028 Election Chances16K40
- 	
				 LIVE LIVEDr Disrespect2 hours ago🔴LIVE - DR DISRESPECT - ARC RAIDERS - DANGEROUS ADVENTURES (LEVEL 12)1,640 watching
- 	
				 LIVE LIVELFA TV16 hours agoLIVE & BREAKING NEWS! | FRIDAY 10/31/252,582 watching
- 	
				 LIVE LIVEThe Mel K Show2 hours agoHunters Become the Hunted: A Reckoning Is Finally Coming - 10/31/25888 watching
- 	
				 1:02:41 1:02:41Outspoken with Dr. Naomi Wolf2 hours ago"The Devil His Due"4.93K
- 	
				 1:02:27 1:02:27VINCE4 hours agoA Very Trump Halloween | Episode 159 - 10/31/25139K98