Welcome to tutorial 60 in this series of tutorials designed to help you learn TradeStation EasyLanguage.
The tutorial demonstrates how to draw a trend line on a CCI chart by joining pivots. The program draws trend lines and searches for places where the CCI crosses the trend line. Hopefully this basic idea may have application in some of your own technical analysis.
The tutorial shows some of the following techniques:
- Drawing trend lines on a CCI chart
- Working with 2 dimensional arrays
- Looping through points between 2 pivots to check that the CCI value is less than or greater then the line drawn between the 2 points.
In the video below I demonstrate how we look for pivots, checks that the CCI has not crossed the line that joins the pivots while between the pivots and then draws a line, storing the line reference in an array. For each bar, the program goes through the array to see if the CCI has crossed any of the trend lines stored in the array. For top pivots the second pivot must be lower than the first pivot and we are looking for the CCI to cross from below to above the trend line. For bottom pivots we are looking for the second pivot to be greater than the first and the CCI to cross the trend line from above.
The image below shows the program applied to a 1 minute GBPUSD chart. In order to limit the number of drawing objects on the chart, the program deletes old trend lines after the array is full such that there a maximum of 5 top trend lines and 5 bottom trend lines on the chart at any one time. The program also draws a cross on the chart every time a new cross is discovered.
Three in depth videos, below, explain the tutorial in detail.
The program works in TradeStation versions 8.7, 8.8, 9.0, 9.5, 10 and MultiCharts and is commented throughout.
I have also included an additional video that goes into more detail about using alerts.
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.
Tutorial 60 Video – CCI trend line breaks – part 1
Tutorial 60 Video – CCI trend line breaks – part 2
Tutorial 60 Video – Part 3 – Applying the indicator to sub chart 1 or sub chart 2
The program works in TradeStation versions 8.7, 8.8, 9.0, 10 and MultiCharts. It is commented throughout.
I have also included an additional video that goes into more detail about using alerts.
Tutorial 60 Video – Part 4 – Changing the symbol once the program is applied to sub chart
Setting up tutorial 60 in MultiCharts
If you see any errors in this tutorial – or we have not made something clear, we would be most grateful if you could please let us know. E-mail us at: tutorials@markplex.com. Also, let us know if you have any ideas for new tutorials.
EasyLanguage is a programming language that is part of the TradeStation trading platform. It can be used to write programs to help in the technical analysis and trading of foreign exchange (forex or FX), commodities (e.g. the Dow e-mini, S&P e-mini etc), options, and stocks.