Account ChartsThis example will read a trading account file and display a chart for the open positions. The trading account files are stored in the C:\Ensign\Accounts folder, and are numbered beginning with 1. Our example will work with the first trading account.var Notes: The first thing we do is clear the Output window and close all open windows. The account file is ASCII text that we load into a predefined string list variable sList. Each record of the file is displayed in the Output window. The writeln(s) is not necessary, but it is informative for those who might want to do more with this example. We use GetToken to read the exit date from the 8th field in the comma delimited record. For Open positions, the exit date field will be blank. We use GetToken to read the symbol from the 3rd field, and display a chart for valid symbols. After displaying charts for all open positions, the charts are tiled vertically. This is another example of the power of ESPL reducing a task to a few statements. I hope these examples increase your awareness of powerful tools like string lists, GetToken, Trim, and menu clicks. |