Program 35 (XML version) uses TradeStation XML (Extensible Markup Language) objects to transfer horizontal line levels from one chart to another (or from one chart to several others). The program is similar to Program 35 (GlobalVariable.dll version) but has the advantage that levels are stored in an XML file stored on the user’s computer. If the sending chart is turned off, or the status of the sending program is set to ‘off,’ and then the program’s status is turned back to ‘on,’ the data is reloaded. If a line is moved on the sending chart, the corresponding line is also moved on the receiving chart (see the video below for a demonstration).
The techniques in the program will be useful if you wish to create an analysis technique in which you store data in a structured format for later retrieval by another TradeStation analysis technique or other program. The two programs are available for immediate download. I have also created a bonus video, at no additional cost, to show some aspects of the technology used in these programs.
Program 35 (XML version) consists of two programs:
- _Program35-XML
- _Program35-XML-Read
A user input: UniqueName enables the user to input a word that will be used as the key between the sending and retrieving charts. For example, if the user set UniqueName to List for both _Program35-XML (on the sending chart) and _Program35-XML-Read (on the receiving chart), then the levels on the sending chart will be replicated on the receiving chart. If the unique name were set to something different and subsequently changed back to List, then the levels that were set when this level was applied to the chart before are reapplied to the chart. See the demonstration video below for more information.
The idea behind the program is that a user could determine levels or zones on the sending chart using whatever methodology he prefers, and that those same levels would become automatically available on the receiving chart.
Both UNPROTECTED programs (i.e. the TradeStation EasyLanguage sender and receiver show-me studies) DEVELOPED FOR TRADESTATION VERSION 9.5 and higher are available for immediate download for $49.95. Click the ‘add to cart’ button to pay using Credit card or PayPal. Gold Pass members are eligible for 20% off this price when they type in their special discount code (see //markplex.com/gold-pass-content/ to get the latest DISCOUNT code. Make sure you are logged in).
Video demonstration of program 35 (XML version)
Bonus video for Gold Pass members
This content is for members only.How program 35 (XML version) works
When the sending chart initializes the sending program calculates the highest and lowest prices visible in the current window. It divides the difference of these two values by ten and then draws lines at the lowest value plus multiples of this calculated value to draw ten evenly spaced throughout the window. The values of the lines are drawn on the right of the lines (depending on the horizontal line settings). If the XML file does not exist, one is created and if the node for the specific UniqueName does not exist, one is created.
The horizontal lines are colored based on the user inputs: Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8, Color9, and Color10. The text pertaining to a particular lines is drawn in the same color as the line. The sending and receiving programs both have the color inputs so that they can be coordinated with each other or used in some different way.
The program use the new TradeStation drawing objects. On the sending charts the program knows when a particular drawing object is clicked and dragged. When this event occurs the data stored in the XML file is updated. The receiving program uses the TradeStation timer to check for updates to the line levels stored in the XML file. When it detects a change it moves a line or changes its color as appropriate. The data is stored in the XML file.
The receiving program can be applied to more that one ‘receiving’ chart.
TradeStation EasyLanguage technical lessons
This program is well commented and will provide useful lessons in the use of XML documents to store and retrieve information, as well as storing information in vectors and the use of drawing objects. The program demonstrates a way to recognize which horizontal line has been clicked using both the HorizontalLine drawing object and the Chartinghost.
Gold Pass members have access to an additional video that highlights some of the ways in which the program works. See the Gold Pass area below.
An example of the XML file created by Program35-XML
User inputs
The sending program: _Program35-XML
int Color1( Red ), // Color of line 1
int Color2( Yellow ), // Color of line 2
int Color3( Magenta ), // Color of line 3
int Color4( Cyan ), // Color of line 4
int Color5( Green ), // Color of line 5
int Color6( DarkRed ), // Color of line 6
int Color7( DarkGreen ), // Color of line 7
int Color8( Black ), // Color of line 8
int Color9( DarkGray ), // Color of line 9
int Color10( Green ), // Color of line 10
string UniqueName( “List” ), // Unique name used for node in XML file. Make sure this is the same string as used in the receiving chart
string xmlFileName( “C:\XMLTests.xml” ); // Name and location of XML file
The receiving program: _Program35-XML-Read
int Color1( Red ), // Color of line 1
int Color2( Yellow ), // Color of line 2
int Color3( Magenta ), // Color of line 3
int Color4( Cyan ), // Color of line 4
int Color5( Green ), // Color of line 5
int Color6( DarkRed ), // Color of line 6
int Color7( DarkGreen ), // Color of line 7
int Color8( Black ), // Color of line 8
int Color9( DarkGray ), // Color of line 9
int Color10( Green ), // Color of line 10
string UniqueName( “List” ), // Unique name used for the node in the XML document. Make sure this is the same string as used in the sending chart
string xmlFileName( “C:\XMLTests.xml” ), // Name and location of XML file
int lineMoveInt( 500 ); // The program checks to see if changes have been made to the XML every this number of milliseconds
Both UNPROTECTED programs (i.e. the TradeStation EasyLanguage sender and receiver show-me studies) DEVELOPED FOR TRADESTATION VERSION 9.5 and higher are available for immediate download for $49.95. Click the ‘add to cart’ button to pay using Credit card or PayPal. Gold Pass members are eligible for 20% off this price when they type in their special discount code (see //markplex.com/gold-pass-content/ to get the latest code).
Q & A about Program 35 (XML Version)
A client asked whether it were possible to send data from several sending charts to one receiving chart.
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.