Skip to content

Tutorial 215 | Alert when MACD crosses a line drawn on chart

Tutorial215-3

Tutorial 215 is a tutorial for Tradestation EasyLanguage that demonstrates how to calculate and plot the value of the Moving average convergence-divergence value (MACD), the average of the MACD and the difference between the MACD and the average of the MACD. This difference is plotted as an histogram (like to the standard TradeStation program). The tutorial 215 program does not include Radarscreen specific functionality that is included in the standard program. Also, it uses color object names rather than the legacy colors included in the standard program.

When a horizontal line is drawn on the chart, using the drawing tools, tutorial 215 changes the color and thickness of the horizontal line and stores its value. If the line is moved, its color is changed until the mouse button is released when it is returned to its original color. The program then alerts when the MACD line crosses this horizontal line. The date and time of the cross are printed in the print log.

The tutorial includes a method that converts the color of a color object into a legacy color that can be used in a plot statement. Another method is used to ‘scrape’ the details of drawing objects manually drawn on the chart into a vector. Once stored in the vector the color and weight of the drawing object (horizontal line) can be modified. The tag property of the horizontal line is used to record whether the horizontal line is currently active.

Various print statements are included to help the user better understand the functioning of the program.

Showing the moment when the MACD has crossed th euser drawn horizontal line
Showing the moment when the MACD has crossed th euser drawn horizontal line

Explanation of tutorial 215

Explanation of tutorial 215 Part 2

Download the tutorial 215 indicator

If you wish to save yourself some typing, the tutorial is available for immediate download by clicking the ‘add to cart’ button below. You may pay using PayPal or a credit card. The price is $19.95

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.