O'Reilly logo

Designing Stock Market Trading Systems: With and without soft computing by Tobias Hahn, Bruce Vanstone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendices

Script segments

Chapter 3

Script Segment 3.1: Exporting results for statistical analysis

{$NO_AUTO_EXECUTE}

// Modify the following two lines

const SeriesName = ‘PER’;

const FileName = ‘C:\CSVExportByStudents.csv’;

// INFORMATION ONLY

// The file will be of the following format

// SYMBOL, VALUE, STARTDATE, ENDDATE, BUYDATE, SELLDATE, BUYPRICE, SELLPRICE

// HIGHEST, LOWEST, MFE, MAE, RETURN

// ——————————————————————————————————————-

// DO NOT MODIFY SCRIPT BELOW

// ——————————————————————————————————————-

function FormatDate(Bar: integer): string;

begin

Result :=

IntToStr(GetYear(Bar)) + ‘/’ +

IntToStr(GetMonth(Bar)) + ‘/’ +

IntToStr(GetDay(Bar));

end;

var SeriesHandle : integer = FindNamedSeries(SeriesName); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required