# Tutorial 60 | Looking for CCI trend line breaks

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:

1. Drawing trend lines on a CCI chart
2. Working with 2 dimensional arrays
3. 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 unprotected program for version 8.7 and above is available for immediate download for \$39.95 here:

The program works in TradeStation versions 8.7, 8.8, 9.0, 9.5, 10 and MultiCharts and is commented throughout.

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 – Part 3 – Applying the indicator to sub chart 1 or sub chart 2

The unprotected program for version 8.7 and above is available for immediate download for \$39.95 here:

The program works in TradeStation versions 8.7, 8.8, 9.0, 10 and MultiCharts. It is commented throughout.