The following ESPL example will plot GREEN circles when the Study Average is rising, and RED circles when the Study Average is falling. This chart has an Ergodic study and the ESPL study applied.
The GetStudy statement references for 1st line, 2nd line, 3rd line, and 4th line refer to the various Lines that can be plotted by a Study.
- The 1st line is the main study line.
- The 2nd line is most often the Average of the main study line.
- Sometimes there isn’t a 3rd line for a study….sometimes there is.
- The 4th line is most often the Spread line values.
The example below is testing the GetStudy 15 value…. (Is the 2nd line Rising?)
Classes, Graphics, Controls, Forms, Dialogs;
iHandle := FindStudy(eERG);
for i := BarBegin to BarEnd do
if GetStudy(iHandle,15,i) then
if ESPL=100 then CheckErg;
Click ESPL button 100 to apply and run the ESPL study on the chart.