Using ESPL in Ensign WindowsEnsign Windows allows you to program your own studies, draw tools, custom symbols, and Trading Systems. ESPL programs are saved in ASCII text files and can be loaded into the ESPL Editor screen. An ESPL program file must be loaded and compiled before the custom programs can be run. You can manually open the ESPL Editor screen by clicking on the ESPL button on the main toolbar.
The ESPL Editor window will open. The last program that you loaded will be displayed. You can load a new ESPL file by clicking on the 'Open' file button, or by clicking the TABS at the bottom of the Editor screen. Click the 'New' button to start a new ESPL program. The sample ESPL programming code below contains code for a simple Chart study that connects the Highs, Lows, and Closing prices. You can COPY and PASTE this code into the ESPL Editor window if you want to try it out yourself. {********************************************} for i:=BarBegin to BarEnd do {**********Main Program**********} To run the 'DrawLines' chart study, open a chart, and then click the ESPL RUN button. Click button 51 to apply the study on the chart.
Ensign Windows can automatically load and compile an ESPL program file, whenever Ensign Windows runs. Select 'Set-Up | ESPL' from the main menu to open the ESPL Setup screen. You can specify which ESPL file to load. The example below will load a file named 'MyPrograms.spt' from the \ENSIGN\ESPL folder.
Using this set-up screen allows you to load and compile your ESPL file each time that Ensign Windows runs. The ESPL programs will then be available to run at anytime (without requiring you to manually open the ESPL Editor screen, load the file, and then run it). |