Keeping text objects at a constant pixel value from low when scrolling or resizing a window
The last tutorial, tutorial 124, demonstrated a technique for maintaining a text label on a chart, a specific number of pixels from a price, irrespective of how the chart scaling changes. Typically this occurs when the chart scaling range is set to automatic. For a more detailed explanation of this with images, see the tutorial 124 description page.
The original version was designed for later versions of TradeStation and used object oriented features (such as vectors, non-legacy drawing objects, the timer and the charting host), extensively. A Gold Pass member asked if it would be possible to create something that had similar functionality but would work with MultiCharts (the non MultiCharts .Net version).
The tutorial program is available for download with both ELD and PLA files included. Additionally, Gold Pass members can download the program for free.
Programming lessons in _Tutorial124 | MultiCharts
The tutorial demonstrates how to:
- Use the Hammer function
- Add legacy text label drawing objects to the chart
- Determine the highest and lowest prices on a chart
- Detect when the chart height changes
- Use a while loop to loop through the legacy drawing objects
- Find the position of all the text label drawing objects on the chart
- Change the position of a text label
- Change the string in a text label
How _Tutorial124 | MultiCharts works
When first applied to a chart, _Tutorial124 | MultiCharts measures the difference between the high and the low of chart and clears the print log.
The program searches for Hammer candlestick patterns, when it find one it draws a text label a user input, NumTcks ticks price difference below the low of the pattern. The text label takes the price level of the label, converted to a string.
The tutorial program then checks, every time a tick occurs, whether the difference between the high and the low of chart looks has changed since it was last checked. If the price difference has changed it lops through all the legacy text objects on the chart and adjusts their positions. It also updates the text label string to reflect its new position.
Unlike the program in tutorial 124, this new program does not detect whether the window has been resized nor does it detect a change between ticks.
See the video and notes below for more information.
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.
Video explanation of tutorial 124
Gold Pass area
Gold pass members, make sure that you are logged in to download the tutorial 124 MultiCharts version program for free.
This content is for members only.
Please let me know if you spot any bugs or errors or have questions.
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.