Skip to playerSkip to main contentSkip to footer
  • 4/3/2025
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.

https://markplex.com/free-tutorials/tutorial-215-alert-when-macd-crosses-a-line-drawn-on-chart/

Recommended