Trendlines and Text: Learning EasyLanguage & PowerLanguage – Lesson 05

Learning EasyLanguage & PowerLanguage - Lesson 05: Text and Trendlines Tracking daily extremes with an indicator The goal for this lesson is to do some more programming and create a study that tracks the daily extremes of a symbol. If you haven't read the previous lessons, I suggest you start at the beginning with lesson 01, as this lesson will use basics covered in earlier sessions. As I wrote the goal is a study that is able to track the daily extremes and to display them on the chart. We want to be able to see the current extremes for the day and also show yesterday's extremes on today's data. Let's take a moment to consider what we need for this study and how we want to handle the objectives best: we need to be able to find the highest high and lowest low for each day the study should use trendlines to display yesterday's extremes we want to be able to change the appearance on the chart via inputs the study should display text on the chart that labels the lines This already gives you an idea about what we have to look at today. Besides being a useful study or framework for future modifications, drawing text and trendlines and updating them will be the focal point of this study. Multicharts and Tradestation provide functions that return the daily high and low, but for various reasons this is not what we want to use here. Instead we'll create two tracking variables that store the current highest high and lowest low. On a new day these variables need to be reset and their value will be stored in a second set of variables. [...]